Moving Right Along...
I'm happily starting out on the CSG editor. The first step is to add a grid in the orthographic view modes so that you have a frame of reference. In Leadwerks Engine, the editor used some callbacks to call OpenGL commands to draw the grid. In the new system, Leadwerks3D, I added some per-camera commands to control the grid spacing, resolution, and colors. (You may safely ignore the mysterious black cube in the center.) This way the editor never has to call OpenGL commands directly, making room for the possibility of other rendering APIs the engine can support in the future, like DirectX or software rendering.
One small little detail: In the Leadwerks Engine editor, the editor simply calls immediate draw calls (glVertex3f, etc.) to draw as many lines as are needed. In each orthographic viewport in the above screenshot, there are about 80 lines being drawn, which would require 80 draw calls. In Leadwerks3D, the engine creates a repeating patch and renders it as many times as needed, very similarly to how terrain is rendered in Leadwerks Engine. This reduces the number of draw calls in the above screenshot to about 24. Of course, instanced is always faster than non-instanced, and vertex buffers are much faster than immediate mode drawing, so this will increase the responsiveness Leadwerks3D over both the Leadwerks Engine editor and 3D World Studio.
The next step will be to add controls to navigate viewports. This includes free-look with the mouse in perspective mode, and panning and zooming in the orthographic views.
After that, I will start the actual code for drawing primitives, like 3D World Studio does. The functionality of 3D World Studio and Leadwerks Engine are being merged into Leadwerks3D. I miss the convenience of CSG editing. It allows non-artistic people like me to easily put together good looking buildings and interiors. It also makes it easy to establish a theme for a scene using sets of pre-made textures. And if nothing else, it's a convenient way to block out scenes for play testing, until the real art assets are finished.
You'll also notice I have switched my main development machine to Windows 7 for the last leg of this journey. We're on schedule for a summer release this year.
- 3
9 Comments
Recommended Comments