Also, I'd forgotten, but the memory leak was tracked down and resolved. It involved a set of minor logic errors resulting in repeated calls to a GDI+ function and a an OpenGL function that somehow were causing memory to leak. The GDI+ calls were being made far too frequently and the wrong OpenGL function was being used; with that fixed the leak disappeared or was at least severely reduced in severity.
|A functional menu in the test program. Note buttons for menu, help, and full screen along the top.|
|View of the terrain from a small ways up. Where'd all the trees go?|
If you've been following my blog, you know that just a few days ago, there were trees and things in the screenshots. You may be wondering where everything went. Therein lies the tale of the next hurdle to jump over.
The tutorial I was following implemented a very simple loader for 3D models in the Wavefront OBJ file format. Unfortunately, it was so simple more than half of the models I found in that format failed to load through it. The main problems were with models utilizing multiple textures, or that had no textures at all but supplied material information (colors, shine, etc.) instead.
The new Model/Patch classes I've created can handle that, but the OBJ loader needs to, as well, so I am in the process of porting over an OBJ reader/writer class I'd written years ago. Until then, no models. I ported over the basic image-based terrain loader already, so there's height map-based terrains, but not models of trees, shrubs, etc. And since I'm hoping to be healthy enough to get up and go to work in the morning, I shall leave it where it is for now.
Once I've got the rendering and controls back to where they were (but better) I'll look at getting the outstanding GUI items completed. As it stands, I've only been addressing them as I encounter them while using the GUI in the test application..