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. ^^

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)

pseudocode:

 
//assumes the perspective matrix has been set up
//already
DrawScene()
{
   glMatrixMode(GL_MODELVIEW);
   Draw3DStuff();
   glMatrixMode(GL_PROJECTION);
   glPushMatrix(); //save perspective matrix
   //setup an ortho projection with dimensions
   //800x600
   glOrtho(0,800,0,600,1,-1);
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity(); //clear any transformations
   Draw2DStuff(); //draw sprites on top
   glMatrixMode(GL_PROJECTION);
   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. ^^