Strange, works on Linux, but not windows

Hi, I am making a OPenGL program…
I had been doing it on Linux Mandrake and it works fine on that. But when I compile it on windows its all messed up, like parts of my objects seem to be covered up by some mysterious black shapes…and when I move my object around it gets worse until the point that you cant see anything on the screen anymore.

I have made other OPenGL programs on windows work with VC++ 6.0 so I don’t get whats up…
any ideas?

It seems like you have an error in your code that is only visible in Windows. To narrow the error should I try to disable/enable the tests you have. Like depth buffer, alpha testing, culling,…

The accumulation effect also seems to indicate that you are not clearing something each frame that should be cleared.

If it seems to be OK in linux should mean that it is depending on some variables that is not set properly. It can be that they just happens to have the “right” values in linux.

void init(void)
glClearColor(0.0, 0.0, 0.0, 0.0);

----Problem is with one of these--------
----But I don’t know how to fix it------
----If I remove glEnable(GL_DEPTH_TEST)—
----it displays something, but its all messed up, if I leave it there nothing
is displayed -----------------------------

glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient); // set up the ambient light
glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse); // Set up the diffuse light
glLightfv(GL_LIGHT1, GL_POSITION, LightPosition); // Position the light

glEnable(GL_LIGHT1); // Enable light one

Use glClear(GL_DEPTH_BUFFER_BIT | … ) before you draw your scene.

Thanks, I got it to work

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.