I have written a few games in C++ with OpenGL, and I am working on another one now, its my biggest project. Everything works really great on my computer, but whenever I move my executable to another computer, the depth testing completely stops working.
I have no idea what causes this problem, my code works great on my pc, so I don't know what the problem is on other pcs. Is this a problem with the version of OpenGL I am using? That's all I can think of. Has anyone else seen this before?

so, you're just taking an EXE, all by itself, and trying to run it on the new computer?

if so, maybe you should try compiling from source on the new computer and see how it works.

i think youre going to need to build a distribution kit if you want to, well, distribute it.

I'm not trying to distribute it. just test it. and i have actually compiled it from source on other machines, its the same problem.

All the machines are Windows XP. Although some are kind of older computers. Non-gaming/work computers. Thats why I'm thinking its a version issue.

OpenGL has strict video card requirements. it's a longer process to get drivers certified for "OpenGL", and thus video cards that have been fully qualified are more expensive than normal "gaming" video cards.

You typically will find such cards in engineering workstations, not so much in average "gaming" computers, and probably pretty rarely in run of the mill workstations.

Ok, that explanation would make sense. I thought depth testing was all software though. The computer that it runs best on is my laptop, which just has what could be considered a "gaming" video card. Its a decent card, not the best, not anymore at least, but even so, none of the other video cards on the other machines would even compare to it, so that's a plausible explanation. Thanks. I'll look into it.

im just making a semi-informed guess.

the lines are definitely blurred between "gaming" video cards and 3D graphic workstation cards these days, and the info im drawing from (recollection, mostly) is a couple years old

also, openGL may well work on some cards, even though the card is not officially "certified" for open GL...

its a common issue. its almost random as to which video card/OS combo will work, and which ones won't. most of the times, the ones that "don't work" will work partially, but with some negative effects (choppiness, etc.)


.

Well, my laptop is a couple of years old, and the other machines are more than a couple years old. So I'm sure the info you are drawing from is valid.
You are probably more informed than I am, thanks for the help.

Ok, I found the problem. The problem was that my near clipping plane was too close to the viewer. gluPerspective(45,1,0.01,1) where before it was around 0.0001. I discovered this because I noticed that depth testing WAS working in some parts but not in others.

commented: thanks for coming back and giving an update on that! :) +3

good job. you must be happy you stuck with it instead of giving up.

and I'm glad you posted the update, it might help someone else later.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.