View Full Version : BG texture in ortho perspectives
umm, maybe im not looking in the right spots for information, but is it possible to have a backround texture in an ortho perspective, or rather to make it appear as a backround?
Just draw the background (textured) quad near the far clipping plane first. Then draw everything else after it.
You can even disable depth testing while drawing the background (which will make things faster) b/c you know it's supposed to be behind everything else.
Lemme know if you want an example ...
10-18-2000, 01:01 PM
Would you mind posting that sample, just to
make sure I'm doing it right?? I'm getting
some funky results... http://www.opengl.org/discussion_boards/ubb/frown.gif
For a background, you can also disable depthwrites, and not only depthtest. This way you save even more speed, and then you can draw the quad wherever you like http://www.opengl.org/discussion_boards/ubb/rolleyes.gif
Some code would probably look something like this.
glOrtho(0, 1, 0, 1, -1, 1);
Maybe you have to tweak the coordinates to get the texture right...
[This message has been edited by Bob (edited 10-19-2000).]
10-19-2000, 02:00 AM
To make it even more faster: You must only clear the depth buffer:
The color buffer is overwritten completely with every frame when you got a background texture.
10-19-2000, 05:41 AM
To speed things up even more draw the background with Z-testing disabled.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.