Skip to end of metadata
Go to start of metadata
So, you want to create an OpenGL Plugin?!?

First, I would like to thank "Prompt" for his "My trick for have OpenGL rendering" (http://groups.google.com/group/firebreath-dev/browse_thread/thread/1ad3145a31604737) in the firebreath-dev group and Dutchmeat for his threading help.

Second, I recommend you to read all "Getting Started" articles. It really covers the most important Requirements for "Getting Started"... So! RTFM ;-)

Also I have to mention that this is just an example and not ready to use in a productive environment. You still have to add "onWindowDetached" and clean up the Plugin resources after DetachEvent.

The OS

Of course, OpenGL is Platform independent! BUT! OpenGL needs a Rendering Context to draw on. And responsible for creating the Rendering Context is the OS, which is completly different on Linux, Mac and Windows.

So, if you still want to create a OpenGL Plugin for these three Operating Systems, you need to know a little more about how the Operating Systems creates the Render Context.

Windows:

1. Create a new Project with fbgen named: threadedOpenGLTestPlugin

2. Open the Project in Visual Studio

3. Get the example Source from here:

   threadedOpenGLTestPlugin.cpp: http://pastebin.com/MY3tFSFf

   threadedOpenGLTestPlugin.h: http://pastebin.com/mGXtYSEE

4. Add "opengl32.lib" to the "Additional Dependencies" and compile the Project.

5. Try to understand the code

Mac:
 - todo!

Linux:

 - todo!

  • No labels