Panda and GtkGLExt: using an existing GL window

You can’t create a GL context externally to Panda; Panda needs to control the context creation. But that doesn’t mean you can’t render onto some other window created outside of Panda.

When you create a Panda window, you use a WindowProperties to control the size, position, whatnot of the window. The WindowProperties structure has a set_parent_window() parameter. Store the HANDLE to an existing window here (on Win32), or the pointer to an existing window here (on OSX), in either case cast to a size_t. Then Panda will create its window as a child of the window you specify, meaning it will appear to be rendering directly on top of your other window.

David