PBuffer_Create and compatible pixel format
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com CGLError error = kCGLNoError; steve _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... I'm not sure if it's better to ask here or on the OpenGL list, so please point me there if this is off-topic. I'm using PBuffer_Create and friends in a plugin (included in EffectHelpers.m in the FxPlug samples). It works fine except on one of our test computers that contains multiple graphics cards and displays. For that case it fails with the stock code when calling CGLCreateContext. I've ended up modifying it as follows and now works on all of our computers. pbuffer->pixelFormat = CGLGetPixelFormat(sharedContext); if (pbuffer->pixelFormat == NULL) { // do the stock pixel format setup here //... error = CGLChoosePixelFormat(pixelFormatAttributes, &pbuffer-
pixelFormat, &numPixelFormats);
} if (error == kCGLNoError) { error = CGLCreateContext(pbuffer->pixelFormat, sharedContext, &pbuffer->pbufferContext); //... } The problem is that I need to add a couple of attributes to the pixel format. If I were to use the stock code, it'd be no problem: just add it to the list. However on our problem computer, the shared context's pixel format has two virtual screens, so I'm unsure how to get ahold of all of the attributes, add the new ones, and then create a new pixel format. Is this possible or am I going off in the wrong direction? This email sent to site_archiver@lists.apple.com
participants (1)
-
Steve Christensen