Archived

This topic is now archived and is closed to further replies.

sky box

This topic is 5044 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im wanting to render a sky box, currently i disable depth buffering, and make it so it always passes glDisable(GL_DEPTH_TEST); glDepthFunc(GL_ALWAYS); but if i draw something outside of the sky box it gets cropped, so this isnt the right effect im after. I want the sky box to be rendered, but pushed right back to max depth of the depth buffer. how is this done?

Share this post


Link to post
Share on other sites
disable writing to the depth buffer when rendering the skybox with "glDepthMask(GL_FALSE);" (be sure to turn it back on afterwards). then everything else will appear in front of the skybox, no matter how far away.

Share this post


Link to post
Share on other sites
glDepthMask(GL_FALSE);
results in a white screen o.0

and my current method uses:
glDisable(GL_DEPTH_TEST);
glDepthFunc(GL_ALWAYS);

but this doesnt go all the way back to the end of the depth buffer.

Share this post


Link to post
Share on other sites
yeah i know ;p
when i tried it the first time and ran it i got a white screen and thought "this doesnt work" but the second time i relised i was building in release mode, and when it ran, there were no textures to load

Share this post


Link to post
Share on other sites