MissingOpenGLDefinitions within JUCE namespace (not portable without using namespace juce)

When using using namespace juce; opengl-definitions like GL_TEXTURE0 are either a macro (on mac, defined by gl3.h) or an enum (windows, MissingOpenGLDefinitions).

However, without using namespace juce; I would have to add juce:: in front of GL_TEXTURE0 when on windows, which wouldn’t work on mac anymore.
So the code won’t be portable.

However, I actually like the removal of using namespace juce;
Am I missing something, or should JUCE revise the MissingOpenGLDefinitions-trick?

1 Like

I already reported this back in 2019

No response from the JUCE team members tagged back then

2 Likes

These requests will just pile up ad infinitum. IMO, it’s just easier to request the whole lot of macros in a consistent way - so, please see my FR: FR: Wrangle a comprehensive set of OpenGL functions & macros

To add to the FR - the “wrangling” of functions and macros from OpenGL is a totally normal thing to do in order to get access to all functionality necessary at once.