Re: FxPlug: Invalid Context with NSString drawInRect
Re: FxPlug: Invalid Context with NSString drawInRect
- Subject: Re: FxPlug: Invalid Context with NSString drawInRect
- From: Christoph Vonrhein <email@hidden>
- Date: Mon, 09 Jul 2012 12:19:13 -0400
It's part of the rendering.
I'm working on some FxPlug plugins for Motion 5 / FCP X. One thing I
want to do is to render text into the plugins output. Imagine that I
want to create something like a "Lower 3rd" or a "Timecode Overlay"
plugin. I already have the text as a NSString, but it can also be a
simple CString.
I was trying to draw the text to the regular output image buffer with
the regular [NSString drawInRect: withAttributes:] (or drawAtPoint:)
method:
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/
ApplicationKit/Classes/NSString_AppKitAdditions/Reference/Reference.html
The code compiles, but when it runs I get lots of CGL errors (invalid
context 0x0) in the console for each call of the drawInRect method. I
don't get any crashes... just the error messages in the console.
I know how to use the drawInRect method. I did it many times in my
other applications. It just does not want to work in a FxPlug plugin.
When using a pBuffer, does glGetError() return anything? Have you
tried running with OpenGL Profiler?
The error happens when the drawInRect method is called... and not when
any of the PBuffer commands are called.
Is there a better way to render text to a FxPlug plugin's output?
Christoph
On Jul 9, 2012, at 11:35 AM, Darrin Cardani wrote:
Can you give some more details? I don't understand where you're
trying to draw the string using [NSString
drawInRect:withAttributes:]. Is this in a custom parameter, or as
part of rendering?
When using a pBuffer, does glGetError() return anything? Have you
tried running with OpenGL Profiler?
Darrin
On Jul 7, 2012, at 9:40 AM, Christoph Vonrhein wrote:
Hello Darrin (and everybody else),
I am trying to draw some text on the screen in a FxPlug plugin with
the [NSString drawInRect: withAttributes] method. In continuously
wind up with lots of "invalid context 0x0" error messages in the
console.
This also happens when I try to draw text to a pBuffer.
Any ideas?
Christoph Vonrhein
---
OSX 10.6.8
FCP X
Motion 5
_______________________________________________
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
_______________________________________________
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