Skip to main content
gamedev.net
🔒 Locked

ignoring the depth buffer?

Started by Krokus 1 reply 200+ views
Original Post
Krokus
Krokus
Hi all!!! i have what i assume is a fairly easy question for you guys, but for me (i am a bit of a beginner), it is not! ok: in my 3d app i first draw a skybox. then after this i draw lots of objects (trees, buildings etc...). however, some of these objects are drawn behind the skybox (because their coordinates are behind it), but i do not want them to! i want these objects to be drawn on top of the skybox (if you think of the screen as a 2D flat surface). is there an easy way of thus clearing the back buffer before these other objects are drawn? would that help? or is there an easier way? i am using directx v. 8! thanx for your time, and hope someone can help! regards Krokus
ababkin
ababkin
use m_d3dDevice->SetRenderState(D3DRS_ZENABLE, 0)
before u draw skybox
and m_d3dDevice->SetRenderState(D3DRS_ZENABLE, 1)
right after rendering the skybox

and remember to draw the skybox first thing, everything else after




Alex
Alex BabkinAlias|WavefrontResearch Department
Krokus
Krokus
great!

that did the trick alex!

thankyou

Topic Locked

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

Sign in to reply to this topic.