PDA

View Full Version : Depth Buffer and OS X



Nobody
08-26-2000, 12:16 PM
I an using an NSOpenGL view in OS X and drawing works perfectly except, it appears as though the Depth Buffer is not there, and I really mean NOT THERE.

I call glEndable(GL_DEPTH_TEST), however, objects are displayed in front of each other based on their draw order.

I have gone so far as to setup my own pixel format setting NSOpenGLPFADepthSize = 32 bits and re-initializing the NSOpenGLContext with my pixel format. This seems to have to affect.

Do I need to set something with the NSOpenGLContext? and if so, what and how?

Nobody

Nobody
08-26-2000, 12:30 PM
Find my problem in a post back on 05-12-2000. I was setting up my pixel format wrong!

for some reason when I read the docs on how to set the pixel format attributes, I thought every attribute had to have a corresponding value. Wich is WRONG. The boolean attributes only need to be put in the attribute list.

so basically:
NSOpenGLPixelFormatAttribute attribs[] = {NSOpenGLPFAAllRenderers,NSOpenGLPFADoubleBuffer,G L_FALSE,NSOpenGLPFADepthSize,32,0};
is WRONG!

and:
NSOpenGLPixelFormatAttribute attribs[] = {NSOpenGLPFAAllRenderers,NSOpenGLPFADepthSize,32,0 };
is CORRECT!
Works great now!

Nobody
08-26-2000, 01:54 PM
Find my problem in a post back on 05-12-2000. I was setting up my pixel format wrong!

for some reason when I read the docs on how to set the pixel format attributes, I thought every attribute had to have a corresponding value. Wich is WRONG. The boolean attributes only need to be put in the attribute list.

so basically:
NSOpenGLPixelFormatAttribute attribs[] = {NSOpenGLPFAAllRenderers,NSOpenGLPFADoubleBuffer,G L_FALSE,NSOpenGLPFADepthSize,32,0};
is WRONG!

and:
NSOpenGLPixelFormatAttribute attribs[] = {NSOpenGLPFAAllRenderers,NSOpenGLPFADepthSize,32,0 };
is CORRECT!
Works great now!

Nobody
08-29-2000, 09:16 AM
How did you get OpenGL anyway? If you worked at Apple, you wouldn't need to post the question, and Mac OS X is only in alpha release

08-30-2000, 11:57 PM
mac os x has been in beta for a long while now. mac os x dp4 has been out for a few months. and mac os x Public beta is coming out sept. 13th
in dp4 you have access to opengl.