Pretty much the only thing here is that I stopped using hungarian notation.
This changed pretty drastically. Not only did I rewrite the entire
engine, but I did it using smart pointers.
I also started writing a bitmap font system, but it doesn't support alignment
and such at the moment. It also doesn't support measuring, so I would have had to
chop out labels and cutting off the listbox items.
Another thing I changed was the fact that I was passing around my graphics
smart pointer instead of storing an instance of it in pool. This way I could use
pool for non-graphical resources if needed (it also makes a lot more sense, since
I might need it for audio and such.)
Another good example is that instead of naming my singleton function
GetSingleton(), I switch to Access().
So, long story short, once I finish a game project I'm going to be rewriting my GUI system (which I had planned on doing anyway.)
I've been redoing my engine and I figured I'd list out some major issues that I ran into. For now, I'm just going to do the Graphics system since that's where the most of my issues were.
- Texture tracking I've made several comments that I didn't want to do something because it would screw up my texture tracking system. I was tracking textures by storing an array of 8 textures and then when SetTexture() was called (wrapped in my Graphics class) I would check to see if it was already set. Some of you may instantly see why this is a bad idea, but for some reason I didn't (even after I started running into the problem -_-;) For those of you that don't see it, there are several problems with this:
- D3DX stuff might set a texture via the device and then you wouldn't reset the texture.
- It's incompatible with stateblocks
- It's incompatible with shaders
- It's incompatible with external source
- Resetting the device This is one of the biggest problems. Not a single class that I did was setup to handle a device reset, which prevents anything like changing graphics-settings in-game and such.
- Hardware enumeration Although my engine supported hardware enumeration, it didn't allow any sort of interaction with it. So, the graphics class new what was available and that was about it.
So, all in all it's a very bad idea.
I'm off to see if I can finish this project so that I can start anew.