Wednesday, June 23, 2010

Motivation Has Returned

Over the past six or so months, I've found that my motivation was severely lacking. I had a wakeup call last week that has definitely pulled me out of that stupor.

I've found myself a whirlwind of activity, and I'm wondering how much longer it can last. While it does, though, I expect to get a huge amount of stuff done.

First, I've managed to implement XML serialization and deserialization with for the PCSDT core libraries. I expect it would take me weeks to finish. To my amazement, I finished it in three days. Top to bottom, everything including property, event, and object serialization, for all statement types, totally finished. The best part of it is that the core library is the only thing that needed to be changed. All of the CSDTs that use the core now uniformly have serialization support.

But it didn't stop there! Amazingly, I was also able to fix a little bug. Turns out that when you resize any OpenGL CSDT that uses textures, the textures become lost. This prevents them from being rendered properly. OpenGL doesn't do this _all_ the time, though--only after the resize operation goes for a little bit. This is because, at a certain point, the backer for the rendering context has to be reshaped, and it's only when this occurs that all textures loaded into the OpenGL context are lost.

In any case, the way that I solved this problem was to create a new interface method called PObjectOgl.LoadTextures which the GUIOgl class calls when reshaping has taken place, and also when an OpenGL context is first available after object creation. This ensures that an object is notified that its textures need to be reformed and prevents code dependent on said textures from rendering blank surfaces.

There's nothing quite like the sense of accomplishment at the end of the day to help you rest easy.