Jump to content
  • Advertisement
Sign in to follow this  
RexHunter99

OpenGL [Solved] FPS Gun over the scene

This topic is 3021 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

Hey again all, now I've come a ways along since my last two topics (yes amazing innit?) Now the title can't quite cover the scope of my questions so I'll say it straight. What I need to do is draw a mesh over the entire scene, the mesh currently is so large that it protrudes out and passes through the world geometry, the mesh I'm speaking of is a gun FYI. Now in D3D all I had to do was clear the depth buffer to 1.0f again, this produced the exact effect I desired as seen in this screenshot: Now in my OpenGL implementation of the renderer (which uses the same functions and function call order), in my function Hardware_ZBuffer(bool bl); I replaced the D3D clear call to an OpenGL clear call... but nothing, absolutely nothing happened that was different. I tried 1.0f and 0.0f, there was no difference, next I tried glDepthMask(GL_FALSE); to disable depth buffer writes (yes I was stupid enough to bother, I hadn't been thinking too clearly at the time) but of course... that failed (geometry that wasn't supposed to be seen was drawn over the top of other geometry) and finally I tried disabling depth testing... disabling depth testing and masking the buffer resulted in this: (not at the same time, they individually looked the same though) Now I've probably overlooked something and one of you guys will point it out (and I will feel completely stupid over it) but the help is greatly appreciated. [Edited by - RexHunter99 on March 16, 2010 8:35:19 AM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!