Saturday, August 22, 2015

Week 6: Porting to OpenGL, and GUI woes

The last two weeks have been spent converting the engine to OpenGL. I decided the advantages of doing this mostly outweighed the pain of switching from blitting to 3D, and all that entails.

It's been a mostly smooth process, although it'll probably take more than a few more refactoring passes before the engine is as clean as it once was. The way you do blit-style graphics and the way you do modern Core OpenGL is two fairly orthogonal methods with different data-piping needs.

Midway through this week I decided that my crunky home made GUI didn't cut it, and started looking for an alternative. At first I tried CEGUI, which seemed promising.  I read a few forum posts and the like that warned me against using it, but I figured "how hard can it be"... After struggling for an absolutely unreasonable amount of time to get even the simplest things to play nice with my other rendering--there's a severe lack of documentation of which preconditions the GL3 renderer for CEGUI expect, and which states it will alter--I came to the conclusion: Fuck this shit.

I abandoned CEGUI. Decided it just wasn't worth the time. Instead, I switched to IMGUI, which by comparison is a dream to work with. It does what you tell it to. Nothing more, nothing less.  Had all my existing GUI screens converted in an hour.

So this is where I'm at right now. Not 100% there yet, but mostly.

Click to enlarge

No comments:

Post a Comment