Depthtest problems! Help!

Hello, I have a problem with Tao and the simpleOpenGlControl. I already posted a thread on gamedev.net, but the only advice I got, was to check gl_error but that didn't clear the problem, because the result of this function was always 0 which means that OpenGl is not aware of an error.

Here is the problem:
Even though I explicitly call the following code -

Gl.glHint(Gl.GL_PERSPECTIVE_CORRECTION_HINT, Gl.GL_NICEST);
Gl.glShadeModel(Gl.GL_SMOOTH);
Gl.glEnable(Gl.GL_DEPTH_TEST);
Gl.glClearDepth(1.0f);
Gl.glDepthFunc(Gl.GL_LESS);

- the depthtest doesn't work correctly and it looks as if the coordinates, that are farer away, "win".
On this screenshot you will see what I mean:

http://mountlogan.gwebspace.de/bild/simpleopenglcontrol.JPG

The red box is inside of the grey box, but it is visible.
Has anyone an idea where the problem could be located?
Or can someone show me how the typical use of the simpleOpenGlControl class looks like? Or is there an alternative?

Theme by La Boite a site | Powered by Drupal