View Full Version : 2D Sprites?
I don't know if it's possible with OpenGL but is it?
What I want to do is, create bitmaps in the front and have 3D objects in the background. The bitmaps must not zoom and change angle with the 3D objects of course...
So I'm asking where do I begin to study in order to create this effect.. Thanks in advance. ^^
11-30-2004, 05:40 AM
first render all of your 3D geometry using a standard perspective projection matrix.
after that switch over to an orthographic (screen aligned) projection and draw your sprites on top (texture mapped quads for example)
//assumes the perspective matrix has been set up
glPushMatrix(); //save perspective matrix
//setup an ortho projection with dimensions
glLoadIdentity(); //clear any transformations
Draw2DStuff(); //draw sprites on top
glPopMatrix(); //restore perspective matrix
that's more or less it.
thanks, it helped a lot. I've come across a few solutions as well and it pointed in the same direction. ^^
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.