[osg-users] OpenGL

David Heitbrink david-heitbrink at uiowa.edu
Mon Jul 24 06:57:32 PDT 2017

yes this is possible, but I am afraid its likely not going to be simple, depending on how much integration between the two you are looking for. 

Most likely the easiest path for you is to just create a OSG program, and create your python program, and use sockets (https://docs.python.org/2/howto/sockets.html), to have your python program tell your OSG program what to do. 

Other than that you can setup your c++ program to compile to a DLL, then call the C++ dll from Python, and have it create your OSG window, and handle everything OSG. Or you can progress further and look at say the MFC OSG example, assuming you are working in windows, and look at how the device context are used, and look to pass the DC between your python and c++ sides. 

I would just recommend making two separate programs, particularly if you are new to programming, or at least just to start with.

Read this topic online here:

More information about the osg-users mailing list