Yes, I looked at the Taharez and Windows skins before settling for the “Vanilla” skin. Lesser of three evils no? Integrating CEGUI (Crazy Eddies Graphical User Interface) was somewhat painless but there are some definite quirks with the code and the layout generator tool that I ran into:
- When you deactivate a window in CEGUI your subsequent calls to getActiveChild() will still return the deactivated window.
- The layout generator tool undo system does not seem to work and the copy and paste functionality is also finicky.
- The use of a data directory for the layout tool is not intuitive to me. It should just use its’ own program install directory and save the .layout files where you indicate via the save file dialog – isn’t that the main purpose of the tool? Why confuse your average n00b by asking them where they want their data directory to be when they install? It’s not like you can easily change the data directory if you select the wrong location as I found out.
- CEGUI window skins seem to stretch by default so I will eventually have to figure out how to make them pixel perfect and resolution dependent where needed.
The reason I needed a GUI was that setting the 8 different blend properties for the 16 different layers was going to be a pain to do (and slow) by keyboard alone. I also wanted to see how easy it would be to work in what seems to be the “go to” Ogre GUI (it gets used in several demos). The GUI allows me to move the sliders that adjust the values in the look up table (or I can type the values in by using the edit boxes and pressing ‘Enter’). When values are adjusted the terrain texture is automatically updated and the screen refreshes to show the new texture. I use the mouse right click to toggle between GUI mode (when the mouse cursor is revealed) and fly mode (when the cursor is hidden and the mouse controls where you look).
After integrating the GUI I realized how complicated this little tool had become and that in order to un-complicate it and make it easier to integrate into the planet engine that I would need to break out the UML tools (I used OmniGraffle Pro) in order to get a good look at the architecture.
As you can (or cannot) see, it’s a tad complicated for what looks so basic by the screenshot and I’m not even including all the getter/setter functions. To integrate this with the planet engine I think I will make the render to texture a singleton helper and if I bring the GUI over then I’ll probably make a GUI class that receives input from the InputHandler and then translates the GUI actions into application actions. The InputHandler will be responsible for non-GUI actions like movement, screenshots, quiting the program etc.
Sorry this isn’t a very exciting post, but it was necessary. I’m going to try and get the quadtree test program running on Vista and then try to integrate the new terrain texture process. See how I said that in one sentence? It will probably take me weeks to get running right.
Oh and I should say I’m excited to see that Steve Streeting (the main dev behind Ogre 3D) appears to be working on some terrain improvements to Ogre which I plan on dissecting. You can follow his tweets at http://twitter.com/sinbad_ogre. Mine are at http://twitter.com/petrocket.