Skip to main content
gamedev.net
🔒 Locked

Help!!

Started by ogl Oct 10, 2000 at 6:12 AM 4 replies 350+ views
Original Post
ogl
ogl
I have a cuboid - why does the back face block the front when you look directly at it but disappear when you zoom out and look from above - also why are some of the sides missing or transparent - I did apply [ccode]glCullFace (GL_BACK); glEnable (GL_CULL_FACE);[/ccode] which took away the top and back faces of all the objects rather than just the one I wanted so I removed the line and now the back face of cuboid overlap with the front face when rotating the scene Any ideas? Thanx
drBones
drBones
hi... I had the same... backface culling is solution, but also z-buffer ( set it to 32 bit ) or change glPerspective parameters to set near and far clipping so it fits to 16bit float numbers ( again z-buffer )

or you can check my prev posts ( answer is there ) named : strange

hope I helped
Pet
Pet
ogl
ogl
I''ve checked your previous post ''strange'' - there''s only 2 replies and they don''t seem very helpful - could you expand on your explanation?

Thanx
Forneiq
Forneiq
Are your normals facing the right direction?

I don''t know much 3D Programming, but I know if you declare vertices in the wrong order it messes up your normals. The program deletes all faces whose normals point away from the viewer, so if they are backwards . . .

Worth checking into.
Several billion trillion tons of superhot exploding hydrogen nuclei rose slowly above the horizon and managed to look small, cold and slightly damp.-The Hitchhiker's Guide to the Galaxy by Douglas Adams
Strylinys
Strylinys
Hmm... Might want to try glCullFace(GL_FRONT)... Instead of back... Also check the windings of your triangles/quads. You may have your normals backwards, but that would only change the lighting on the scene... This problem is usually with the depth buffer bit... Check to make sure you didn''t change anything in the DepthFunc or other functions dealing with depth... That''s all I''ve got.

S.
ogl
ogl
I checked the polygon windings and worked the normals out
I was just wondering if it was

glDepthFunc(GL_LEQUAL);
I added this when I was doing the backface culling what effect does it have and how do I remove it / if I delete it
I get a blank screen - but I already have glEnable (GL_LIGHTING) AND glEnable(GL_DEPTH_TEST)

THANX

Topic Locked

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

Sign in to reply to this topic.