lazyatom
2003.05.05, 11:40 AM
Hi
Bit of a newbie question here, but i'm having some trouble getting depth buffers to work in my app. To add complications, i'm using an interesting blend of tools to get it to work (Ruby, it's opengl extension, RubyCocoa and finally Cocoa).
Basically - is there anything special I need to do to enable the depth buffer in the Cocoa GLView component? I'm clearing the DEPTH_BUFFER bit, and enabled GL_DEPTH_TEST, but it still doesn't seem to work. When I use the same GL code, but in a GLUT context rather than a Cocoa one, I need to add this call to make it work:
GLUT.InitDisplayMode(GLUT::DOUBLE | GLUT::RGB | GLUT::DEPTH);
any ideas anyone?
(as an aside, NSOpenGLView's setNeedsDisplay(true) doesn't seem to do anything for me either :(
Bit of a newbie question here, but i'm having some trouble getting depth buffers to work in my app. To add complications, i'm using an interesting blend of tools to get it to work (Ruby, it's opengl extension, RubyCocoa and finally Cocoa).
Basically - is there anything special I need to do to enable the depth buffer in the Cocoa GLView component? I'm clearing the DEPTH_BUFFER bit, and enabled GL_DEPTH_TEST, but it still doesn't seem to work. When I use the same GL code, but in a GLUT context rather than a Cocoa one, I need to add this call to make it work:
GLUT.InitDisplayMode(GLUT::DOUBLE | GLUT::RGB | GLUT::DEPTH);
any ideas anyone?
(as an aside, NSOpenGLView's setNeedsDisplay(true) doesn't seem to do anything for me either :(