Using the viewer in existing app

Hello everyone,

I’m currently in a project that would need to have a visual representation of a cylinder with a texture on it’s inside. So the camera is inside de the cylinder and the user can navigate using mouse/keyboard inside the cylinder using a predefined axis.

I know how to to this in Panda3D since I already did a game on it. But this time, it’s not a game…

But I would like to know if it’s possible to add the main window of Panda3D inside an existing application.

I see 2 possibilities:

  1. I will have a control on my application that will hold the view of panda3D.

  2. My application will launch the viewer of panda3d in a new window and this windows will keep the focus until it’s closed and come back to my application.

Is this possible? If not, do you know any 3D engine that I could use for this easy task?

Any help would be greatly appreciated :slight_smile:

Thanks!

DarkJaff

I think you’re talking about window-parenting, where the Panda3D window is attached to your application window, giving the appearance that Panda is rendering directly to your application window. This is quite easily done using WindowProperties.setParentWindow() or the parent-window-handle Config.prc variable. There are many examples of this; try searching the forums.

David

Hi again,

I tried to use Panda3D in my C++ MFC project but it was realy painfull. In fact, there is no dll and lib from panda3D in debug mode and we only work in debug except when we create a release for the client. I also read in the documentation that if we manage to be able to use the release dll in debug mode it would crash. My team and I just don’t want to go back to the time when we needed to put message box to debug an application.

So thanks for the answer but since what we need to do in 3D is very simple (Point cloud), I think I will go with something realy simple like VL or VTK.

Thank you!

If you want to get a debug build of Panda3D, the easy way to do it is to download the source and built it yourself. It’s actually quite easy to do, and this way you avoid many of the common issues of working with C++ DLL’s, since you have built Panda in the same environment that you are building your application.

But, if you don’t have a lot of heavy 3-D needs, there’s nothing wrong with going with a simpler solution as well. :slight_smile:

David