I’d like to use OpenGL (in the form of Xith which bases on JOGL in my case) to draw 2d sprites for a fast game, so that it’s all HW accelerated and I can use 8bpp alpha blending, blended zooming and rotating etc.
For example all objects contain a planar rectangle (or 2 triangles) in a Shape3D with a texture. Let’s call this sprite. The sprite’s Z value is zero (usually).
A Xith user suggested not to use perspective projection because then it’s difficult to control the zoom factor, but to use PARALLEL_PROJECTION. Then use scaling for zoom effects. This works.
However, I couldn’t figure out how to set the rectangles/triangles vertex coordinate dimension compared to the texture and screen resoltion, so that on screen one pixel of the texture maps to one pixel on screen. Is this possible somehow?
Is there a beginner’s guide how to use 2d (with or without Parallel_Projection) with Jogl/Xith/Java3d maybe? Thanks!
Part b) of the question: Many textures. I intend to use many textures because most of the sprites will be animated. What would be the fastest and most VRAM efficient method to swap textures in OpenGL (for an animated 2d sprites) ?
PS: Since this question probably applies to Jogl, Java3d and Xith, I posted it here.