OpenGL 2.1 vs 3.x

Posted by | Posted in Game Development, Pioneer | Posted on 14-09-2016

Back in the heady days of… erm, the past, when I wrote the OpenGL 3.2 post I didn’t think I’d ever be adding support for OpenGL 2.1 back in, or revisiting the mess that is multiple OpenGL version support.

Skip to right now though and I’ve got a PR in adding in support for OpenGL 3.x + 2.1 which is getting reviewed piecemeal and I’m playing whack-a-mole with the various issues that arise from it.

OpenGL 2.1 seemed like a logical place to start for this. Not because I want to see it back but because I wanted an existing code base that has previously worked to update rather than write a new one from scratch. It was also important to determine how much of pain the mixing of OpenGL version would be. The answer to that last part turns out to be very painful, at least using glLoadGen.

What I wanted was to have everything namespace’d and separated so that the GL2.1 renderer only had access to OpenGL 2.1 functions and extensions, likewise for GL3.x but this proved to be much more complex than I like.

The final goal is to have support for other renderers but right now I’m trying to wrack my brains for the dregs of energy needed to switch away from glLoadGen to… well that’s the problem.

  • GLEW still has the same problem that caused me to switch away from it and the maintainer seems determined not to merge anyones repeated attempts to fix it.
  • GLee appears 100% dead in the water.
  • libEpoxy – I’m starting to evaluate this now but it looks like yet another slightly overly complex library and there’s no discussion of multi-version GL support.
  • glBinding – looks bureaucratic.

There’s limited time in the evenings to do this in and a tonne of other projects in Pioneer to be digging through. It is so disheartening that it’s all in this fucking mess and that’s before I go into a rant about how poorly manufacturers support older graphics chipsets by backporting feature and support. nVidia outshine the rest here massively but even they can’t push technical fixes back onto some of the older chips.

Back to the coal face