Re: How can you get an FxBitmap and display it to an open gl context
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com On Jul 25, 2008, at 4:58 PM, Brad Wright wrote: Darrin -- Darrin Cardani dcardani@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... I'm trying to read an FxBitmap and then render it as a texture to the open gl context instead of writing it to the output image. Is this at all possible to get fcp to ignore the output image and just display to the open gl window? I need the raw bitmap data to do analysis of that I can't do with an fxtexture. Brad, What are you actually trying to do? It's certainly possible to send the image data from an FxBitmap to a texture, but in most circumstances you wouldn't want to. You say in your description above that you need to work on a bitmap because you can't do your analysis on the GPU. Why do you then want to upload the bitmap to a texture? If you don't need to do any additional work on it, it may make more sense to simply return a bitmap to FCP. FCP is more efficient at working with bitmaps than Motion, so it may actually be slowing you down if you then upload the bitmap to a texture to work on it. However, if you do need to do so, you can do something along these lines (from memory, not compiled or tested): UInt8* baseAddr = [bitmap dataPtr]; glTexImage2D (GL_TEXTURE_RECTANGLE_EXT, 0, GL_BGRA, [bitmap width], [bitmap height], 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, baseAddr); This email sent to site_archiver@lists.apple.com
participants (1)
-
Darrin Cardani