Question

Does anyone know of any resources/examples for setting up an NP web plugin on Mac with a NSOpenGLView? I've tried modifying some of the samples in the WebKit SVN, but it doesn't load the GLView. The way I have it setup is storing off the NSOpenGLView layer into the main plugin layer, much like the sample stores off the Quartz composer layer.

If anyone has any tips or suggestion for where to actually find documentation on doing this (google searches haven't helped so far), it'd be greatly appreciated.

Was it helpful?

Solution

You can't use any type of NSView with an NPAPI plugin; there is no host for an NSView that you can use inside an NPAPI plugin (well, there are some hacks for older carbon-based browsers, but they were never supported or supportable and break in all 64 bit browsers).

What you can do is use CoreAnimation and InvalidatingCoreAnimation, which allows you to use a CAOpenGLLayer, and FireBreath has an example called BasicMediaPlayer that has sample code to do that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top