Skip to main content
gamedev.net
🔒 Locked

Depth Buffer

Started by FERNANDO-BRASIL Aug 10, 2002 at 9:30 AM 4 replies 500+ views
Original Post
FERNANDO-BRASIL
FERNANDO-BRASIL
Hi Guys! I would like to know if there is a way, to indicate OpenGL, that I only want to draw the subsequent operations with the depth Buffer, for example, setted to the maximun depth value possible (1.0f I think)... It''s because I want to draw a Full Screen Image, but I don''t want it overfronting the existents objects in the screen. So, I think I could do it by drawing all my objects, and after it, draw this image, with the depth value greatest thant the other objects. Is it possible? Thank you Fernando
Kamil
Kamil
You can do something like this:
disable depthbuffer
draw your image
enable depthbuffer
draw your objects
FERNANDO-BRASIL
FERNANDO-BRASIL
Thank you Kamil! This is like I'm doing in moment, but I think the drawing could have a best speed rating, If I do it in the opposite way... Do you know if it's possible?

[edited by - FERNANDO-BRASIL on August 10, 2002 10:47:50 AM]
Kamil
Kamil
quote:
Original post by FERNANDO-BRASIL
I think the drawing could have a best speed rating, If I do it in the opposite way...
[edited by - FERNANDO-BRASIL on August 10, 2002 10:47:50 AM]

I don''t think so, probably code what turns depthbuffer on/off is faster then code what writes to it (becaues it has to compare values). But I didn''t test that.

FERNANDO-BRASIL
FERNANDO-BRASIL
Ok! I think I''ll use this way then. Thank you a lot Kamil.

Fernando
_the_phantom_
_the_phantom_
turning off zbuffer writes is ALWAYS going to be faster than filling the zbuffer with a value because your not accessing memory at all with the turn off method

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.