Nova Renderer: Status Update

Nova's been doing some things.

I had the GUI button shapes rendering back in September 2016. Problem was, the code wasn't amazing. This was okay: I had fully intended to get a couple things figured out, then go back and refactor or rewrite what I had written once I had a better idea of how Nova would work. So, starting in September, I refactored Nova.

The design now is much better. One thing I struggled with was trying to make Nova multithreaded. I wanted to keep the vanilla Minecraft renderer running alongside Nova to be able to easily validate that Nova was working properly. Problem was, Nova uses OpenGL 4.5 while Minecraft uses OpenGL 2.1. You can't have multiple OpenGL contexts in the same thread, so I thought I'd separate out Nova into its own thread. This presented a number of issues. There were all the classic problems from multithreading like race conditions, plus I kept forgetting to move OpenGL 4.5 code out of the main thread and into the thread with the OpenGL 4.5 context, plus there was a big question of code organization - how do I decide what code to put in each thread? It was a total mess and I hated it.

A couple months ago I took a long, hard look at Nova. I kept running into show-stopping problems, and I was tired of it. I realized that most of these problems had their roots in my threading model, so I decided that had to go. No more separate thread for my OpenGL 4.5 context, which meant no more vanilla Minecraft renderer. The vanilla renderer was commented out in a glorious ball of fire.

This brings us to today. Nova is back to where it was in September 2016, but the code makes much more sense. Gone is the artificial separation between threads. In its place is code which doesn't explode every time I create a texture in the wrong thread.

You can see the current state of Nova with the image. The text on the image is because I'm running Nova through RenderDoc to help verify that everything works properly.

Next steps: get more of the GUI rendering. My current plan is to stitch as many GUI textures as possible into a texture atlas so I can draw the whole GUI screen in a single pass. After that I want to get input working so that you can interact with Nova, and then it's off to the wonderful world of 3D geometry!