Rendering onto a window created by GLUT

Can Panda3d render onto a window created with glut, so that it doesn’t open a second window?

Not really. But glut’s window creation is so limited. Why would you want to use glut to create a window instead of Panda?

David

Then can GLUT be used inside a window created by Panda?

Not really, no.

Both Glut and Panda work on a similar model: they create a window, create a graphics context within the window, and then maintain the event loop required to service the window and draw into it. Neither is designed to integrate with another library that’s doing the same thing.

But again, each also duplicates the salient features of the other. So there’s not really a reason to use both of them at once, unless you’re integrating with some existing application that already uses Glut and you want to add some Panda functionality to it. But if that’s the case, you might be better off to remove the dependency from Glut on the original application and just use Panda. Glut is designed to be small and simple, a lightweight toolkit that allows you to create a no-frills window without getting in your way. There’s not a lot of value that Glut itself adds beyond that, and Panda adds that much value too.

David

So there is no way to use them both (in one window)?
EDIT: Can anyone explain how to do this for me? [url]Panda and GtkGLExt: using an existing GL window]

Perhaps it would help if you explained what you’re trying to achieve, in the big-picture view.

As I’ve said twice already, there’s not really any reason to use Glut and Panda together, unless you’re integrating with existing code. But if you are integrating with existing code, there might be better ways to do whatever it is you’re trying to do.

The post you linked refers to using window-reparenting to create a window that is a child of another window. This is useful, for instance, to put a Panda3D window within a wxPython frame. But it’s not the same thing as rendering directly to a window created by Glut.

David