Calling opengl functions from a plugin

Started by
1 comment, last by floatingwoods 11 years ago

Hello,

I have an application that creates a rendering window and renders to it. That works fine.

The application loads at start-up various plugins. Now I would like to allow the plugins to render some of their stuff into the rendering window of the main application.

But it doesn't work. I proceed as following: once the main application has set-up everything for rendering, I callback the plugins, that call some openGl functions, typically rendering a triangle.

What am I doing wrong?

I suspect that the plugins are loading the openGl library a second time into memory.

How can I achive what I want to achieve?

Any help is appreciated!

Advertisement

An OpenGL context is tied to a thread, so as long as OpenGL calls are made from the thread that has the context active it shouldn't matter where in the logical structure of your application the call is coming from. I would start by ensuring that there are no threads that mess up the active context and that the rendering context is indeed active inside your plugin.

Oops, you are totally right, I made a mistake.

Thanks a lot Brother Bob!

This topic is closed to new replies.

Advertisement