is it possible to display a background image ?

is it possible to replace the background color by an image, loaded from any bitmap file for instance or from a HBITMAP created elsewhere ? i mean, without having to load a texture from a bitmap of a 2power-dimension and to put it far on the Z-axis …

Yes, use the “glDrawPixels” function to write the image data to the frame buffer.

(In the event that you wanted to use a texture, you could switch to an ortho-graphic projection [2D view] so you don’t need to put it “far” on the Z-axis. “glOrtho” or “gluOrtho2D” can create ortho-graphic projections).

…and remember to either disable depth buffer writing when you draw the quad, or clear the depth buffer after drawing it.

No, there’s no specific OpenGL concept of a background image. But as Guest points out, it’s a really easy thing to do yourself.

Have you researched glOrtho2D? has a good tutorial on it - you’ll get much, much, much faster performance if you draw a textured quad in ortho mode than if you use glDrawPixels. The only drawback is you have to play around a bit with depth testing and depth masking to get it to work. My city demo kind of does that at - check DoOrthoModeRendering in main.cpp. I had code in there to draw a quad on the screen that’s commented out.