Problems with different PC setups

I’m a quite new when it comes to OpenGL coding but me and a friend are currently trying to develop a small game with an editor. Our problem now is that the editor/game looks horrible at some computers. The computers we work at are Intel Celerons 800 with Geforce DDR cards and on those comps it looks fine of course. The computers we have found it NOT working properly on are:

  • Athlon 800 with Geforce 2 MX
  • Thunderbird 900 with GeForce 4 Ti4200
  • Another computer with GeForce DDR (not sure of CPU)
  • Celeron 800 with Diamond fire GL
    The first 3 comps running on WinXP, the last on Win2000

It will probably look strange on other computers too. I’m just showing this list as there seem to be no connection between the problem and the setup of the platform but i don’t know.
Please take a look at these two screenshots and see if you know the solution to our problem.
This is how it’s supposed to look:

And this is how it looks on those other computers:

Thanks in advance for any help, this is driving us crazy!

It seems to be related to the ZBuffer. Doesn’t look like Z-fighting, but maybe you should check the values you use for the ZNear/ZFar planes. Other than that, i’d say it looks like you don’t have Z-testing (and/or Z-writes) enabled, and the triangles are overwriting the color buffer every time…


Thanks for answering.
I can’t seem to find anything about either Z-testing or Z-writes on, could you point me to a page where i can learn how to enable this? or even give me an example?

The RedBook ->


I’d say you’re seeing z-fighting. When you really fudge the z-buffer precision it can look like this. Push your near plane out. If that doesn’t help bring the far plane in. If that doesn’t help request a 24-bit depth buffer.

First, make sure you request a 24 bit Z buffer (not 32 !)

Second, note the difference in FPS. I think you’re running in software in the non-working case. Chances are, that machines that have been upgraded to Windows XP didn’t get working OpenGL drivers (thanks, Microsoft!) and you need to go download new drivers for your grahpics card and install them on your non-working machines.

What I do is assert that the RENDERER string does not contain the word “Microsoft” on start-up; this quickly finds problem systems :slight_smile:

harsman, by far plane or near plane you mean the last two parameters in this line right?

gluPerspective(45.0f, (GLfloat)res_x/(GLfloat)res_y, 0.01f, 1000.0f);

Is the 0.01f too much as the near plane? should i just set it to 1.0f maybe?

That looks pretty weird. If you have polygons poping in and out as you move closer or farther, then for sure its z-fighting.

far=1000 or so is fine

or better yet determine those vallues dynamically. you certainly can for what you have there.