The initial goal was “to get something on the screen.” It seemed like a fairly straightforward goal really. I wasn’t even especially picky about what was on the screen once I’d gotten it there. A singe block floating in space with a texture on it would have made me very happy. As it turns out, my simple goal ended up being little more than a good place to start.
As I read more of my OpenGL book and printed shader tutorials, I found the scope of this simple goal expanding. The progression went a little bit like this:
- Get something on the screen.
- That something should have a texture on it.
- There’s no point building the entire framework for getting a texture on something when it’ll just be wrong immediately afterwards.
- That meant putting my textures into a proper texture atlas.
- Which meant I would need a way to store and sort my textures so I could arrange them into that texture atlas.
- Which meant I had a binary tree structure to build.
- Once that was built, I needed to be able to iterate over the rectangles in that tree.
- Which meant I’d need to make a Linked List class that could act as a stack or a queue.
- And so on…
So now, roughly 47 layers removed from my original problem, I’m effectively in a Computer Science Data Structures class. I figure I’ll eventually unravel this mess and get back to working on the actual problem that started it. I look forward to that time.