Jump to content
  • Advertisement
Sign in to follow this  
GamerSg

Zbuffer issues on nVidia Cards(zip file link included)

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

Ive been working on a graphics framework for several months on and off, and decided to send a sample to my friends to test. All of those who were using nVidia cards had an OpenGL Error: invalid Operation and showed ztesting problems. It runs fine on my Radeon 9600Pro and OpenGL shows no errors. So i would like nvidia users to help me test it out. Also anyone who has experienced such a problem exclusively on nvidia hardware, please tell me about what im doing wrong. Ive looked through my code and cant find any problems with it. PS. If any of you have GLIntercept, please help me test it with your nvidia card so that i can know where the problem is. Download Del key rotates camera around model.

Share this post


Link to post
Share on other sites
Advertisement
It seems you compiled it in debug mode, as it wants MSVCP71D.dll. I don't have that, and you included the release versions :(

Share this post


Link to post
Share on other sites
Hmmm... the program doesnt run on my machine at all. The MainCode window comes up, but its all black, and i get the "MainCode.exe has encountered a problem and needs to close blablabla" and asks me if i want to send an error report to MS. Im running (or trying to) this on my Dell Inspiron 500m on Windows XP. The graphics card is one of those onboard intel ones.

Share this post


Link to post
Share on other sites
Ok, now what are your zNear and zFar clipping plane values set to?

Since each vertex is projected into a canonical view, which allows Z coordinates to take on a value between -1 and +1, if your near and far values are too far apart, you're going to run into some floating-point precision problems, which might be responsible for the artifacts evident in the screenshot posted above.

Share this post


Link to post
Share on other sites

This is with my heavily overclocked 6800GT using 77.77 drivers. The bottom right corner is just fraps, which is a FPS monitoring program I usually have running.

Dunno if the face is supposed to look like that (not a result of OCing after checking). One thing I found odd was that vsync didnt kick in. I have my card set to globally vsync instead of application controlled so it should have capped at 75 FPS and not 4254, wouldnt know why that is happening. Dunno if any of that can help, good luck. I did not get any errors however.

Share this post


Link to post
Share on other sites
It runs in a window, can't have VSync on then.

To me it looks like the Z Buffer isn't even on, and the polygons are being drawn in the wrong order. The black thing you see on the persons face is part of the hair.

Share this post


Link to post
Share on other sites
I'm dead sure thats because your depth testing is off, try glDepthMask( GL_TRUE ) and/or glEnable( GL_DEPTH_TEST ) followed by glDepthFunc( GL_LEQUAL ) (call just before rendering your mesh)

EDIT: interesting, i just fired up gDEBugger and well, your depth tests/masks are all enabled, few things:
  • a little obscure you have your depth func as GL_LESS, tried GL_LEQUAL?

  • your GL_DEPTH_BITS is 0... seems your depth buffer is likely not part of the requested pixel format, check this!


  • Cheers
    -Danu

    Share this post


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

    • Advertisement
    ×

    Important Information

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

    GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

    Sign me up!