I’m doing a 2D graphics project for a class. Is
it reasonable to use OpenGL? I’ve got it working
OK for drawing, but I need an inverse transform
(viewport to worldspace). This is indeterminate
in a 3D-2D projection, is there some way around
it?
Exactly, you have complete control over the projection matrix and the viewport.
If you draw primitives on an x y plane where z is constant this can work even with a glFrustum call made to set up the projection.
If you go drawing 3D stuff and expect to infer the position from a 2D screen then the solution is not actually indeterminate, is a 3D solution i.e. a point in teh screen defines a world space vector from the eye and a rectangle on the screen is a frustum.
Doing basic 2D is very straightforward, you have all the tools for this in OpenGL.