Use Core Image to filter an FxTexture in FxPlug
Use Core Image to filter an FxTexture in FxPlug
- Subject: Use Core Image to filter an FxTexture in FxPlug
- From: "Jim George" <email@hidden>
- Date: Tue, 19 Aug 2008 19:37:24 -0700
Hello,
I'm fairly new to FxPlug and Core Image and am confused by what I
think should be something simple
I want to render simply create a core image with the FxTexture, filer
it, and then draw the contents back onto the output image. For my
example, I've removed the filter so I'd just like to understand how to
render the core image back onto the output texture.
I could be way off, but here goes:
CIContext *myCIContext;
NSOpenGLPixelFormatAttribute attr[] = {
NSOpenGLPFAAccelerated,
NSOpenGLPFANoRecovery,
NSOpenGLPFAColorSize, 32,
(NSOpenGLPixelFormatAttribute) 0 };
NSOpenGLPixelFormat* pixelFormat = [[[NSOpenGLPixelFormat alloc]
initWithAttributes:attr] autorelease];
myCIContext = [CIContext
contextWithCGLContext:renderInfo.sharedContext
pixelFormat:[pixelFormat CGLPixelFormatObj] options:nil];
CGRect rect;
rect.origin.x = 0;
rect.origin.y = 0;
rect.size.width = [inTex width];
rect.size.height = [inTex height];
CIImage *imageBuffer = [[CIImage alloc] initWithTexture:[inTex
textureId] size:rect.size flipped:NO colorSpace:nil];
Thanks!
--
- Jim
_______________________________________________
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