Issue #5 new

Hardcoded GL version check

computerquip
created an issue

In my adventure to remove the windows.h header and the glx.h inclusions, I realized a few things. After regenerating the XML registry files and converting them to lua tables via the tools (which I had to tweak in order to include everything), a few problems cropped up.

Firstly, the design decision to hard code GL version checks into the styles is a poor one. It should be generic across specifications, not styles.

Secondly, the design decision to not load core functions for anything that isn't GL is also a poor one. This prevents me from removing system-inclusions and windows header files, both of which are unreliable.

2 is easy enough... it's controlled by a hardcoded check for the gl command option. Removing this check results in a more favorable behavior, generating a function that loads the core functions, not just extensions.

1 is not easy to fix... we'd have to rip out all version checking code in the styles, and replace them with something more portable. Alternatively, we can leave it out and let the user fetch version themselves which really isn't that daunting.

This is slightly related to my other issue... unfortunately, these are blocks to that progression. I won't be fixing these immediately.

Comments (3)

  1. Anteru repo owner

    Before we continue here, could you provide a pull requests for the tools to re-create the Lua registry files from XML? There's nothing checked in last time I looked, and I'm going to need this soon to get some OpenGL 4.4 extensions in.

    For 1, it seems that moving the check up to the generic style should be enough?

    For 2, I'm not really sure what is needed.

  2. Log in to comment