Skip to main content
gamedev.net
🔒 Locked

mac developers

Started by _walrus Nov 27, 2003 at 12:24 PM 1 replies 750+ views
Original Post
_walrus
_walrus
Hey guys do u find that the Apple Cocoa documentation (especially the OGL based class documentation) are really scant? Are there any good books that you would recommend? We have lots of Cocoa books here in the office, but none that have much stuff on GL and there all based on Jaguar as opposed to Panther. Thx
Oluseyi
Oluseyi
quote:
Original post by _walrus
...Jaguar as opposed to Panther.
There''s that much of a difference?

Have you checked out the Apple Developer Connection? I haven''t, but I figured we might as well cover all bases.
_walrus
_walrus
Hey thanks for the replay. Ur right theres not much of a differnece, but There are is some new stuff with the Panther that i''m trying to work with (APPLE_PIXEL_BUFFER extesnion). I''m using the Cocoa classes to create a pixel Buffer (NSOpenGLPixelBuffer which is new to Panther), various other classes have been modifed to support pixel buffers (NSOpenGLContext and NSOpenGLPixelFormat). Anyways i''m running into some odd results. I''ve found Apples Cooca stuff kindof buggy in the past, i''m not sure if its me or if its something to do with there API, so that''s why i wanted to confirm with the documentation first. Anyways i''ve serached through ADC and haven''t come up with much, and in the process of posting on their mailing lists.



NSOpenGLPixelFormatAttribute attribs[] = {
NSOpenGLPFADoubleBuffer,
NSOpenGLPFAPixelBuffer,
NSOpenGLPFAClosestPolicy,
NSOpenGLPFAOffScreen,
NSOpenGLPFAAccelerated,
NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute) 24,
NSOpenGLPFAAlphaSize, (NSOpenGLPixelFormatAttribute) 8,
NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute) 24,
nil
};

NSOpenGLPixelFormat * pformat = [[NSOpenGLPixelFormat alloc] initWithAttributes: attribs];

context = [[NSOpenGLContext alloc] initWithFormat: pformat shareContext: mainContext];


[context setPixelBuffer: projectedTextureBuffer
cubeMapFace: 0
mipMapLevel: 0
currentVirtualScreen: 0 ];



the pformat returns NULL when i specify NSOpenGLPFAPixelBuffer/NSOpenGLPFAOffScreen in the attribute list and i get:

invalid pixel format attribute
invalid pixel format

on the console when i call the constructor for the NSOpenGLPixelFormat (even though the documentation says that these are valid attributes). Anyways this stuff is new to Panther so either i''m missing something or its a bug. Chances are i''m missing something or screwed something up, but because the documentation is a scant i''m not sure (there is a carbon example on the ADC that uses pbuffers). On Apple''s extensions guild they say specs are still pending for the extension. I guess i''ve just been spoiled with Sun''s Java documentation in the past but any help would be appriciated. Oh yeah sorry this is on the general discussion board, and if it''s kind of OT ot my Original post.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.