This resolves menu order, cleanup and close/re-open issues, as well as crashes on close.
It also modifies the look slightly to look closer to the windows menubar to keep a cohesive look regardless of platform.
I got this from looking at the code from the glew utility 'glewinfo' on my system it reported the following for GL_ARB_geometry_shader4: OK [MISSING]. This lead me to believe that there are two different ways of determining extensions. The first 'OK' seems to refer to the entrypoint existing while the second one seems to refer to the extension being available.
The difference is this:
The first OK comes from : GLEW_ARB_geometry_shader4 the global whereas the second 'MISSING' comes from glewGetExtension("GL_ARB_geometry_shader4"). By replacing the gglHasExtension I got the desired result.
We may want to implement some caching if we want to keep using GLEW perhaps?
Anyway I suggest this merely as a test, I'm not sure if this is a viable long-term solution.
* Explicitly request a GL 3.2 context
* Enable 'experimental' extensions on glew (This appears necessary to get glew to work with explictly set GL versions)
There are plenty more of these, but they should be fixed by revising the
names of members to start with m, instead of fixing the local violations.
There was a previous PR for that but it went badly. Will retry again one
day.
Many instances where we would create a object via a new call, and then check that it was non-null.
This is redundant, as if we ever were in a situation where new failed, we'd be crashing left and right already, so the additional check is wasted processing.
A lot of instances where some function args are not actually modified in any way, meaning that it is better for performance to convert them into const references. This prevents an additional copy, which can help performance.
Many instances of a variable being modified inside of a complex operation. This could lead to unintended results depending on the whims of the compiler.
Resolved by restructuring the functions to modify the variable first, then do the rest of the operation.
Many places utilize post-incrementation with iterators, but it's better performance to use pre-incrementation.
Resolved by changing the iter++ instances to ++iter;
Many instances of a function or expression being used repeatedly, which can lower performance.
Fixed it in these cases by creating on local var, reference or pointer that's used instead.