So here’s a general question for the Panda experts in here.
I’m working at a company where we need to create an editor tool that will be shipped as an actual product and uses Panda for 3d visualization. Think of something like Maya or 3d Studio Max. So that means a lot of properties windows, special toolbars, menus, etc all organized under the same main window. If you needed to pull something like that off, what is the best way to do that with Panda? I’m looking for some specific opinions on development approaches, languages, and so on. Thanks in advance.
Well, panda’s good at 3D graphics, but not so good at pull-down menus, and scroll bars, and radio buttons. You really would need to use a separate library for that stuff. Many people have combined panda with python widget kits. Personally, I have a fondness for FLTK, it’s extremely simple.
Personally, I would use python, but you can use both panda and fltk from C++ as well.
There is one stumbling block: if you create a window using panda, and create a window using fltk, that’s two windows. But what you really want is one window with both panda and fltk components. Currently, that’s not supported, but it wouldn’t be hard to add — in fact, I’ve already done the design work. If you like, I’d be happy to walk you through the process of implementing that.
I sort of assumed as much. I spent a bit of time last weekend converting over one of the more interesting samples in the Panda distro to C++, embedded in a window. I came up with a rather hackish solution that allowed me to avoid changing the core engine at all. I’m still learning the ins and outs of the Panda API, but in essense I created the panda window offscreen so that it wouldn’t be visible and then cast the returned window object to one I derived that allowed me to get at the protected HWND. Once I had that, i used a combination of SetParent to reparent it to my dialog and then I changed its style to a real clipped child window. From there, everything else worked without a hitch. Not pretty, but I suppose I’d be willing to swallow a little ugliness to avoid messing with the engine. It would be helpful to have even a little more direct access to the HWND and to the window creation, but the offscreen trick avoided any briefly-appearing windows.
At the moment, since we’re really just a Windows shop, I’m considering pitching MFC for this project, but I wanted to make sure that I wasn’t out in left field. We’ve played a bit with the TK and wxWindows toolkits, but their features aren’t quite what I’m looking for in our work. I’d never heard of FLTK before. The screenshots were interesting. I’ll definitely keep that one in mind for future projects.
If you have any words of wisdom when using Panda from C++, I’m all ears. Thanks for the input.
I’m curious, could FLTK widgets be used with panda in fullscreen mode?
My guess is no without folding it into the Panda engine somehow, although I’ll defer to Josh on the final word.
In fullscreen mode? Interesting. I would think not, these widget kits aren’t really meant to be used in full-screen mode.