I would like to write a library that draws some opengl on a given window handle.
How can I initialize an opengl-context inside a given window? Is it possible to do that platform independent using SDL or some other library?
I would like to write a library that draws some opengl on a given window handle.
How can I initialize an opengl-context inside a given window? Is it possible to do that platform independent using SDL or some other library?
Qt provides a very good, cross platform mechanism for opening an OpenGL context and drawing into it. For details, see QtOpenGL.
You could use Open Producer or the OpenSceneGraph to do it as well.