Re: QCView openGLContext
Re: QCView openGLContext
- Subject: Re: QCView openGLContext
- From: Lorenzo <email@hidden>
- Date: Fri, 14 Mar 2008 20:56:12 +0100
David,
In my application I have several openGLViews running in turn their drawRect
method at 60 FPS. So in the drawRect method of each openGLView I set the
current context to the openGLView context. These openGLViews have nothing to
do with the QCView.
Well, when I call [qcView reanderAtTime...
I get a freeze all the time. I have to reboot my machine.
I guessed that there was a conflict between the openGLView current context
and the qcView context when I called renderAtTime. So I tried to set the
qcView context as current before calling renderAtTime. And this worked.
The bug has gone. I have built a small project to verify that. I can send it
to you. Let me know.
Of course I can't use this solution on Tiger because [qcView openGLContext]
is available on 10.5 or higher. I mentioned that because the compiler, when
building against 10.4 SDK, doesn't advise me, unlikewise it does when I try
to use other APIs reserved for 10.5. I supposed that this was an XCode's
minor bug, so I mentioned it here in order to get some feedback about it. If
other developers confirm that, I will file a bug.
I run XCode 3.0 - Xcode IDE: 921.0 - Xcode Core: 921.0 - ToolSupport: 893.0
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.
Thanks for your support.
Best Regards
--
Lorenzo
email: email@hidden
> From: David Duncan <email@hidden>
> Date: Fri, 14 Mar 2008 10:49:18 -0700
> To: Lorenzo <email@hidden>
> Cc: email@hidden
> Subject: Re: QCView openGLContext
>
> On Mar 13, 2008, at 4:53 PM, Lorenzo wrote:
>
>> If I comment this line below
>> [[qcView openGLContext] flushBuffer];
>> my app launches and runs well, but of course I can't see the QCView
>> contents
>> properly. I have seen that this API is available in 10.5 and later.
>> Anyway
>> my compiler doesn't protest when I build my app against 10.4 SDK.
>> This a
>> part, how can I make this work on Tiger too? Any workaround?
>
>
> To answer the original question however, a QCView doesn't respond to
> the -openGLContext message until 10.5, so that is why on 10.4 you get
> that message. You shouldn't need to flush the buffer for your content
> to appear correctly however, so you might want to elaborate more on
> what issue your having specifically.
> --
> 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