Hello, I’m currently developing my own engine based on OpenGL as rendering api, everythings going fine, but today testing, I created a glu sphere and it looked like this after enabling lighting:
As Im pretty new to OpenGL, maybe this is a common or known problem but as said, I havent got nailed all the opengl problems I could get yet.
I can think of one thing… normals, although seems like a z-ordening problem or something related to this.
about the fog, looks like my scales were very very small, i’ll scale up everything. or use GL_FOG_START and END to fix the “scales”… although im testing with just a sphere on screen, not a good idea!.. i’ll make a flipped cube to test the fog… that sounds better.
Hmm, I suppose there’s a typo in your last post, as these are the same values as before. Anyway, I think I remember a post here a few years ago that said that it’s not a good idea to have a big difference between zNear and zFar. Maybe it would be better to have them like 50-1000 or something. It probably has to do with perspective division and (you guessed it!) z-buffer precision. Also don’t forget, that once you start increasing your zNear you might want to double check where you draw your sphere. Once, the near plane clipped my sphere and I was seeing the inside, so be careful. Cheers