FxPlug OpenGL shared context with FTGL
FxPlug OpenGL shared context with FTGL
- Subject: FxPlug OpenGL shared context with FTGL
- From: Ardo Avancena <email@hidden>
- Date: Fri, 18 Oct 2013 08:18:02 -0700
I created a context and I think I am drawing to it but I don't know exactly how to make it appear in Motion.
I don't exactly know how to use the [FxHostCapabilities glContextPixelFormatAttributes] to create a pixel format attribute for my new context since I can't C-style cast it to a CGLPixelFormatAttribute. So instead I printed the NSArray values out and wrote them down to get the integer values, then created a pixel format by referring to the CGLPixelFormatAttribute enumeration to find the integer equivalent and wrote them down, so I ended up with this:
CGLPixelFormatAttribute pixelFormatAttributes[] = {
kCGLPFANoRecovery,
kCGLPFAAccelerated,
kCGLPFAWindow,
kCGLPFAAllowOfflineRenderers,
kCGLPFADepthSize, (CGLPixelFormatAttribute)24,
(CGLPixelFormatAttribute) 0
};
Then I called, to generate the pixel format:
CGLChoosePixelFormat(pixelFormatAttributes, &pixelFormat, &numberOfPixels);
Then I created the new context using this:
CGLCreateContext(pixelFormat, renderContext, &childContext);
I have been switching around the renderContext value from renderInfo.sharedContext and the CGLGetCurrentContext(); but havent got the output I was hoping for.
Then when Im rendering,
I switch contexts
CGLSetCurrentContext(childContext);
call FTGL to draw my text
at this point i'm hopefull that I can view the context in motion, but it hasnt.
Any thoughts on this? I tried making a buffer in the childContext but I had no clue how to output it in a different context.
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden