Computer Science Canada

always on top

Author:  AsianSensation [ Sat May 29, 2004 1:14 pm ]
Post subject:  always on top

in OpenGL,

when I draw a picture, How do I make sure it's always on top, regardless of other object's Z distance? I want to have it such that the object is never covered up by another, even when I zoom in on the other objects.

and another thing, is there a command that will tell me a position relative to the screen? Such as maxx and maxy in turing?

Author:  Catalyst [ Sat May 29, 2004 1:46 pm ]
Post subject: 

q#1

draw everything else first
code:

glDisable (GL_DEPTH_TEST);

draw
code:

glEnable (GL_DEPTH_TEST);


q#2

use what the position is in GL coords (-1->1) then use that w/ the size of the window to calculate it

Author:  AsianSensation [ Sat May 29, 2004 1:52 pm ]
Post subject: 

Very Happy
thanks Catalyst.


: