• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OpenGL and CoreImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenGL and CoreImage


  • Subject: Re: OpenGL and CoreImage
  • From: "Corey O'Connor" <email@hidden>
  • Date: Fri, 6 Apr 2007 09:57:28 -0700

On 4/6/07, Fen Soares <email@hidden> wrote:
Is it possible to render an OpenGL view and then apply a Core Image Filter
to it?

I's possible, but you'll have to do some extra work: Render your OpenGL scene to an offscreen buffer. I don't recommend using the – setOffScreen:width:height:rowbytes: message of NSOpenGLContext as that will not be accelerated. Use pixel buffers with NSOpenGLPixelBuffer instead or frame buffer objects. I think frame buffer objects are now the prefered method, but I haven't used them myself.

Once you've created your NSOpenGLPixelBuffer. Create a NSOpenGLContext
associated with this pixel buffer. Draw your scene into this context.
(Here begins stuff I haven't done myself) I think you can take the
texture you used to create the pixel buffer initially and create a
CIImage from it. These is a initWithTexture message to use. Create a
CIContext for your onscreen context. Then the filters you apply to the
CIImage should be rendered into your onscreen context.

A bit odd when I first heard about it. Made more sense to me when I
thought about the process as a pipeline.
Good luck,
-Corey

This may seem a trivial question given the amount of sample code and
documentation available, but
I can't seem to arrive at the "helloworld" stage.

My attempts at creating a Core Image based on the current context, i.e. my
drawRect method of in NSOpenGLView subclass is not yielding much.

Thanks.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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




-- -Corey O'Connor _______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >OpenGL and CoreImage (From: "Fen Soares" <email@hidden>)

  • Prev by Date: Re: OpenGL and CoreImage
  • Next by Date: re: pointer address changes for no reason
  • Previous by thread: Re: OpenGL and CoreImage
  • Next by thread: WebService requests returning nil
  • Index(es):
    • Date
    • Thread