Re: QCView openGLContext
Re: QCView openGLContext
- Subject: Re: QCView openGLContext
- From: Lorenzo <email@hidden>
- Date: Fri, 14 Mar 2008 22:37:00 +0100
Thanks David,
> As for the garbage, it is likely that your QC Compositions are missing
> a Clear Patch. Adding one should prevent the garbage.
I already clear the color buffer with glClear.
If you meant something different, please let me know.
NSOpenGLContext *cContext = [NSOpenGLContext currentContext];
[[self openGLContext] makeCurrentContext];
glClear(GL_COLOR_BUFFER_BIT);
[mRenderer renderAtTime:time arguments:nil];
[[self openGLContext] flushBuffer];
[cContext makeCurrentContext];
The qc-openGLView is nested within a series of NSSplitViews. I don't get the
garbage when I resize the splitView "A" (left-right), instead I get the
garbage when I resize the splitView "B" (up-down). Maybe the trouble comes
from the
splitView resizeSubviewsWithOldSize
Of the splitView "B", which redraws the openGLView too earlier.
I will investigate on this issue.
As far as the multiple contexts, I already share the context when I initiate
the 2nd, the 3rd... openGLViews
self = [self initWithFrame:frame]
NSOpenGLContext *aContext = [[NSOpenGLContext alloc]
initWithFormat:pixelFormat shareContext:[m1stGLView
openGLContext]];
[self setOpenGLContext:aContext];
[aContext setView:self];
I get a new context for each new openGLView, I suppose.
Do you think it is right?
P.S. I didn't know you were from the DTS Animation and Printing. Great!
Best Regards
--
Lorenzo
email: email@hidden
> From: David Duncan <email@hidden>
> Date: Fri, 14 Mar 2008 13:39:42 -0700
> To: Lorenzo <email@hidden>
> Cc: email@hidden
> Subject: Re: QCView openGLContext
>
> On Mar 14, 2008, at 12:56 PM, Lorenzo wrote:
>
>> I will file a bug.
>> I run XCode 3.0 - Xcode IDE: 921.0 - Xcode Core: 921.0 -
>> ToolSupport: 893.0
>
> Please file it, its always good to know what will help our
> developers :).
>
>> Actually I have adopted the solution posted by Sam, here in the list.
>> I render the qc composition into an openGLView using a timer.
>> It works well. I still get some garbage when resizing this view, but
>> I hope
>> to fix it soon with the reshape and update APIs.
>
>
> From what it sounds it seems like thats a good solution, although I'd
> also wonder why you have multiple GL contexts in a single window, as
> this is not the best route for performance. You might want to look
> into merging all of your OpenGL content into a single context instead
> of the multiple contexts you have.
>
> --
> David Duncan
> Apple DTS Animation and Printing
> email@hidden
>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden