Easy background image method?

I’m using MSVC++ and OpenGL, and I’m trying to put a set background image in my window. Is there an easy way to do this without slapping a texture on a poly?

No! that is the way I would do it.

Originally posted by drummerboy_2002:
I’m using MSVC++ and OpenGL, and I’m trying to put a set background image in my window. Is there an easy way to do this without slapping a texture on a poly?

[This message has been edited by nexusone (edited 02-22-2002).]

Using the textured quad is likely going to be the best solution. Otherwise uploading a bitmap to the framebuffer can be comparatively expensive.

Ignoring the extra expense, how would I go about loading a bitmap into the frame buffer. I ask because the I haven’t decided whether to use Ortho or Perspective and am constantly switching between the two. I assume the textured poly would just give me more things to adjust in the switch.

BTW, the only tools I have at the moment is GLUT.

[This message has been edited by drummerboy_2002 (edited 02-22-2002).]

You use glDrawPixels to upload a rectangle of pixels (i.e. raw bitmap).

Originally posted by drummerboy_2002:
Ignoring the extra expense, how would I go about loading a bitmap into the frame buffer. I ask because the I haven’t decided whether to use Ortho or Perspective and am constantly switching between the two. I assume the textured poly would just give me more things to adjust in the switch.

Drummerboy,

You do not have to choose between perspective and orthographic projection. You can use both!

Just make sure you know what projection you need when your drawing each part of your scene. For instance, my rendering loop typically looks like this:

push projection matrix
set orthographic projection
draw background at z=max and depthTest( GL_ALWAYS), automatically clearing depth buffer
pop projection matrix
draw other interesting stuff
push projection matrix
set orthographic projection
draw console text/score/fps and other stuff
pop projection matrix

HTH

Jean-Marc.

Ah, very helpfull. I didn’t even think to try that.
Thanks