Inverted 3d Cube

Hi,

I got something very weird going on.
When I load a 3DS model or create a cube with the ofx3DUtils addon, the cube looks ‘inverted’ somehow. It doesn’t look like the faces are flipped, but rather that the order of rendering of the faces is wrong. Does anybody know what’s going on and/or how to fix this?

[attachment=0:3h9e19ac]SS-2010-05-07_15.38.47.png[/attachment:3h9e19ac]

As I haven’t tried too much 3D modeling yet I am not far at this but I remeber that you should enable gl Depth testing

glEnable(GL_DEPTH_TEST)

would be the command to enable.

enabled
disabled

Images are taken from http://wiki.delphigl.com/index.php/Tiefentest (a german wiki about opengl programming with delphi (although it has very good tutorials on openGL in general))

Greets
Snoogie

Thanks! That did the trick!