🔒 Locked
Strange problem
Advertisement
Original Post
When I draw some triangles/quads/anything, OpenGL draw them Front-To-Back instead of Back-To-Front.
1½ week before everything was ok. I played Black and White and today I start again to code and this strange problem appeared..
I have a Voodoo Banshee with driver 1.04.00 (lastest driver I think)
Can someone help me?
OpenGL draws polygons in the order *you* send them to it!
Check that you haven''t forgotten to enable the depth buffer AND the depth buffer test, and that your depth function is the default one (GL_LESS), that should be enough to get rid of your problems, but maybe I am misunderstanding the thing?
Check that you haven''t forgotten to enable the depth buffer AND the depth buffer test, and that your depth function is the default one (GL_LESS), that should be enough to get rid of your problems, but maybe I am misunderstanding the thing?
If it draws your primitives front to back, then it shouldn''t be rerendering the aame pixels, hense getting you a better time on your card. Privided its Z buffering, if not I can see it being strange putting things in abnormal sequences. Is this problem occuring in your development quests, or in commercial games, or both?
/*Vince*/:
Yes I enabled the depth buffer AND the depth buffer test like this:
glDepthFunc(GL_LEQUAL);
glEnable(GL_DEPTH_TEST);
glClearDepth(1.0);
When I put glDepthFunc(GL_LESS) nothing appear...
---
Sulgurth:
Yes it's Z buffering or Z sorting... something like that (dont remember the name).
Only in development.. All my games work fine.. B&W, CS, Half-Life, etc
--
I took some screenshot.. (i actived back face culling to see better)
http://template.free.fr/tmp/1.jpg
http://template.free.fr/tmp/2.jpg
http://template.free.fr/tmp/3.jpg
http://template.free.fr/tmp/4.jpg
It's just a straight line of 4 'prismes à base carré' rotating on the y axis
thank for your help everybody
Simon
Edited by - SaF on April 21, 2001 11:49:00 AM
Edited by - SaF on April 21, 2001 11:56:34 AM
Edited by - SaF on April 21, 2001 12:04:33 PM
Yes I enabled the depth buffer AND the depth buffer test like this:
glDepthFunc(GL_LEQUAL);
glEnable(GL_DEPTH_TEST);
glClearDepth(1.0);
When I put glDepthFunc(GL_LESS) nothing appear...
---
Sulgurth:
Yes it's Z buffering or Z sorting... something like that (dont remember the name).
Only in development.. All my games work fine.. B&W, CS, Half-Life, etc
--
I took some screenshot.. (i actived back face culling to see better)
http://template.free.fr/tmp/1.jpg
http://template.free.fr/tmp/2.jpg
http://template.free.fr/tmp/3.jpg
http://template.free.fr/tmp/4.jpg
It's just a straight line of 4 'prismes à base carré' rotating on the y axis
thank for your help everybody
Simon
Edited by - SaF on April 21, 2001 11:49:00 AM
Edited by - SaF on April 21, 2001 11:56:34 AM
Edited by - SaF on April 21, 2001 12:04:33 PM
yes it just you
.... but only for those:
http://template.free.fr/tmp/1.jpg
http://template.free.fr/tmp/2.jpg
the brown quad make shit...
but those are ok
http://template.free.fr/tmp/3.jpg
http://template.free.fr/tmp/4.jpg
just to show that isn't every poly that bad "z-buffered"
Those are the worst (some without back face culling). It's supposed to be closed box and they are all the same size and at the same height.
http://template.free.fr/tmp/5.jpg
http://template.free.fr/tmp/6.jpg
http://template.free.fr/tmp/7.jpg
http://template.free.fr/tmp/8.jpg
For exemple, in 5.jpg (back face culling on) the little boxes that seem to be on top are in reallity behind all boxes. I didnt misplaced them: when it rotate, we can see they are correct..
why is it only happening to me???
Edited by - SaF on April 21, 2001 5:48:20 PM
http://template.free.fr/tmp/1.jpg
http://template.free.fr/tmp/2.jpg
the brown quad make shit...
but those are ok
http://template.free.fr/tmp/3.jpg
http://template.free.fr/tmp/4.jpg
just to show that isn't every poly that bad "z-buffered"
Those are the worst (some without back face culling). It's supposed to be closed box and they are all the same size and at the same height.
http://template.free.fr/tmp/5.jpg
http://template.free.fr/tmp/6.jpg
http://template.free.fr/tmp/7.jpg
http://template.free.fr/tmp/8.jpg
For exemple, in 5.jpg (back face culling on) the little boxes that seem to be on top are in reallity behind all boxes. I didnt misplaced them: when it rotate, we can see they are correct..
why is it only happening to me???
Edited by - SaF on April 21, 2001 5:48:20 PM
Here is my prog's source and the Windows init source (it's in delphi but very easy to understand) but i'm sure it's not that..
On another forum someone said me to change my video card driver...
thank
Edited by - SaF on April 22, 2001 12:55:42 PM
On another forum someone said me to change my video card driver...
thank
Edited by - SaF on April 22, 2001 12:55:42 PM
Try disabling the face culling and see if the cubes go inside-out. If they do, it's a z buffer problem. If not, I'd blame the model matrix. Is it just upside down and your interpreting it inside out and upside down?
I don't know delphi, btw.
Edited by - smart_idiot on April 24, 2001 12:36:59 PM
I don't know delphi, btw.
Edited by - smart_idiot on April 24, 2001 12:36:59 PM
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement