this is a weird indentation case, but I see why it's like this.

My overall suggestion, to avoid stuff like this, is:
Move the entire generation to a single factory-function in gfx_base, which you then pass your preferred renderer to (i.e. a bool to say if you prefer hw-accell, or an enum-value of our selection), this function will then return SOME renderer, handling the fallback to OpenGL/TinyGL entirely on that level.