FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Z-Fighting anyone?

3 posters

Go down

Z-Fighting anyone? Empty Z-Fighting anyone?

Post  jj Wed Nov 19, 2008 10:39 pm

Hi,

I am having an issue where my solid cylinder object appears to be "see-through". There's little specs of inside material showing, when it should be a solid cylinder "shell".

From what I can tell this issue is called z-fighting, and happens in OpenGL.

Has anyone experienced this when rendering sio2 objects? Are there any solutions?

Thanks in advance

jj

Posts : 77
Join date : 2008-09-24

Back to top Go down

Z-Fighting anyone? Empty Re: Z-Fighting anyone?

Post  sio2interactive Thu Nov 20, 2008 1:59 am

Code:


         // Enable polygon offset to avoid zfighting
         glEnable( GL_POLYGON_OFFSET_FILL );

         // If you are using the simulator theses values
         // will do.
         glPolygonOffset( -2.0f, 2.0f );
                  
         // Setup the polygon offset, on the device polygon
         // offset require extreme value in order to work
         // correctly. Try setting the optimal combination
         // proper to your application. The following value
         // will work but are not optimized...
         //glPolygonOffset( -10.0f, -10.0f );
...
...

         // Disable polygon offset
         glDisable( GL_POLYGON_OFFSET_FILL );

sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Z-Fighting anyone? Empty Re: Z-Fighting anyone?

Post  meteors Thu Nov 20, 2008 7:01 am

You should also check that your model's normals are correct.


Best,
-j
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

Z-Fighting anyone? Empty Re: Z-Fighting anyone?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum