Reputation: 137
I was looking through the header files and I saw the openGL drawing model, so I was busy switching everything in my plugin from CoreGraphics when I saw online that, apparently, the openGL drawing model doesn't actually exist and never will...
Can any of you help me out or link me to a good tutorial or resource that will help me do it?
Thank you!
Upvotes: 0
Views: 694
Reputation: 14324
The only supported way to use OpenGL w/ a Mac NPAPI plugin is to use the CoreAnimation drawing model with CAOpenGLLayer.
You'll probably want to read Stuart Morgan's blog post on the topic of Mac drawing models.
Note that on Safari you'll use CoreAnimation and on other browsers you'll use InvalidatingCoreAnimation; it's going to work about the same way, but with Invalidating you need to call NPN_InvalidateRect each time.
FireBreath has an example of drawing in all of these models; it was cludged into the BasicMediaPlayer example. Even if you decide not to use FireBreath you may find the code or the docs instructive.
Hope that helps
Upvotes: 2