Notice the odd strip of gunk on the right? How can I prevent this?

I've got [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateRenderView:) name:NSViewFrameDidChangeNotification object:renderView];


What does the updateRenderView method do?

For some of our code, we grab the openGL context and tell opengl to resize its viewport, like this:

-(void) updateVisView:(NSNotification*)note
{
        NSRect  frame = [visView frame];
        CGLContextObj cgl_ctx = [_context[0] CGLContextObj];

        //Notify the OpenGL context its rendering view has changed
        [_context[0] update];

        //Update the OpenGL viewport
        glViewport(0, 0, frame.size.width, frame.size.height);
}

Note that _context[0] is an NSOpenGLContext, which can be had from a QCView via the -openGLContext method.

Make sure you #import <OpenGL/CGLMacro.h> for this to work (you've probably got that already, but just incase)

Hopefully this helps. (We've used this with QCRenderers attached to CVDisplayLinks, not QCViews, but it hopefully works out the same way).

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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]

Reply via email to