Add proper OGL extension handling #41
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated glad to 2.0.8
and guarded ogl extension usage properly so it won't cause errors if an extension isn't available (ex. GPU RAM usage query for nvidia and amd)
I'm not entirely sure if
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE);(which helps to diagnose OGL errors) should be available only for debug builds or release builds as well, for now it's active in bothI also squeezed in a few small things that shouldn't cause much harm,
like MultiByte charset support, properly using unicode (utf-8) would be desired, but that requires much larger changes to the codebase...
Do keep in mind that this code has been sitting around on my disk for around 6 months, so I'm not entirely sure if I got everything covered, especially on the AMD side as I don't own one (I did briefly test it via remote on someone else's computer who has an AMD card)
And Linux of course is completely untested...