Thats note is really more, bare bones, get something on the screen. Most dev
examples either subclass drawRect, or use a timer/CVdisplay link to draw
multiple frames at a video like framerate. If you only need to draw one frame,
that method could work, but re-sizing your view you require a redraw, etc. What
is your goal with this app?
On May 30, 2010, at 2:53 AM, Rick Mann wrote:
> Yet the docs clearly show the QCRenderer being initialized and then
> immediately drawing to the view, which you wouldn't do in a drawRect method,
> so what gives?
>
> On May 29, 2010, at 23:52:50, vade wrote:
>
>> "As with other views, you use your OpenGL view’s drawRect: method to draw
>> the content of your view. When your drawRect: method is invoked, the
>> environment is automatically configured for drawing using the OpenGL
>> graphics context associated with your view."
>>
>> "To use an OpenGL view in your program, you create a subclass of
>> NSOpenGLView and add that view to your window, either programmatically or
>> using Interface Builder."
>>
>> file:///Developer/Documentation/DocSets/com.apple.adc.documentation.AppleSnowLeopard.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/CocoaDrawingGuide/QuartzOpenGL/QuartzOpenGL.html#//apple_ref/doc/uid/TP40003290-CH211-BAAECJDJ
>>
>> On May 30, 2010, at 1:46 AM, Rick Mann wrote:
>>
>>>
>>> On May 29, 2010, at 17:17:26, vade wrote:
>>>
>>>> Is that code in your NSopenGLView, and are you rendering in drawRect? when
>>>> is that actually happening? In init? In awake from nib? You probably want
>>>> to move the rendering to drawRect in your NSOpenGLView, but without more
>>>> details its hard to know.
>>>
>>> No, I do this call once, when I create the renderer (which is after the
>>> user chooses a couple of files for processing).
>>>
>>> This is straight from the QCRenderer reference doc overview. Nothing tells
>>> me I have to subclass the view and do this in the drawRect method, and I
>>> don't think that is necessarily the right way to do this (is it?).
>>>
>>>>
>>>> On May 29, 2010, at 8:07 PM, Rick Mann wrote:
>>>>
>>>>> I tried my first stab at rendering a simple composition with QCRenderer:
>>>>>
>>>>> NSOpenGLContext* glCTX = self.outputFrameView.openGLContext;
>>>>> if (mQCRenderer == nil)
>>>>> {
>>>>> NSOpenGLPixelFormat* pixelFormat =
>>>>> self.outputFrameView.pixelFormat;
>>>>> mQCRenderer = [[QCRenderer alloc] initWithOpenGLContext: glCTX
>>>>> pixelFormat: pixelFormat
>>>>> file: mCompositionPath];
>>>>> }
>>>>>
>>>>> bool success = [mQCRenderer renderAtTime: 0.0 arguments: nil];
>>>>> [glCTX flushBuffer];
>>>>>
>>>>> But nothing appeared in my GL view. success was true.
>>>>>
>>>>> Any suggestions? Thanks!
>>>>>
>>>>> --
>>>>> Rick
>>>>>
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Quartzcomposer-dev mailing list ([email protected])
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.com
>>>>>
>>>>> This email sent to [email protected]
>>>>
>>>
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]