PDA

View Full Version : Specifying background (image) in a viewport?



BigShooter
07-28-2003, 02:00 PM
How can I load a .bmp or .jpg image and set it as background for OpenGL viewport?
Thank you,
Luke

JanHH
07-28-2003, 02:40 PM
this you can do the following way:

- load your background image as a texture

- before rendering a frame, change to orthographic projection and render a quad that is exactly screen sized at a distance from the viewer that is nearly the far plane of the viewport

- then, change to normal perspective mode again, and render the scene.

Jan

BigShooter
07-28-2003, 04:47 PM
Sweet, thank you.
Luke