2D plug-in using OpenGL?

Okay, so after a quick search on the forum, it seems there’s a lot of discussion around JUCE_OPENGL3 not being defined for Windows.

Previously I’d just added #define JUCE_OPENGL3 1 to the OpenGLComponent.hpp of @TimArt’s sample project which allowed the project to compile, but threw an exception at runtime.

I found this thread from @jrlanglois where he’s added the same #define JUCE_OPENGL3 1 but to the juce_opengl.h file.

I copied this and moved the define to the openGL module header and the sample project now compiles and runs as expected!

Still not 100% why Windows has this behaviour though? Am I safe to use this in production? Later in that safe thread, @fabian suggests adding the define to the Preprocessor Definitions of the project in the Projucer - this also appears to work fine.

So why is the JUCE_OPENGL3 definition not inclded in the module options like, for example, JUCE_USE_DIRECTWRITE in the graphics module? Even if the default remained disabled.

1 Like