site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com On Oct 17, 2008, at 5:56 PM, George King wrote: On Oct 17, 2008, at 5:12 PM, Darrin Cardani wrote: On Oct 17, 2008, at 5:10 PM, George King wrote: glClearColor(1,1,1,1); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); How are you creating the NSOpenGLContext? Yes, that's correct. 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 think the above is your problem. Since colors in OpenGL are already premultiplied, I think you want to use: glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); That fixes my test case, but unfortunately it introduces a similar problem elsewhere. Now my lines are getting white 'feathers' instead of black. Below is a screenshot from my project; I'll have to work at a better test case. Without knowing how you drew what's in the screenshot, it's hard to say what the problem could be. Remember that using (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) works fine in a fresh NSOpenGLContext. I'm not sure what you mean about premultiplication. My limited understanding of that term is that when a function requires premultiplied color data, the color must multiply each color component by the alpha component ahead of time. So the quadruple for 100% red at 50% transparency is (.5, 0, 0, .5). When I want that color in OpenGL I call glColor4f(1, 0, 0, .5). Please let me know if I am misunderstanding the concept. I think you're understanding it correctly. I was under the impression (though I may be wrong) that you specify colors using straight alpha, but internally, OpenGL premultiplies them. Maybe I'm wrong about that. Needless to say, though, Motion and FCP do expect your plugin to produce premultiplied output, and they give you premultiplied input. This email sent to site_archiver@lists.apple.com