DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit aa99d51731cf915d83abb578c232b89fbad6c231
parent 34bf2a4dfca724fc544f8ab0a15727ddf558d7d8
Author: falkTX <falktx@falktx.com>
Date:   Thu,  7 Jul 2022 13:34:15 +0100

Use GL2 by default with compat profile, set GL3 and GLES target too

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdgl/src/WindowPrivateData.cpp | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/dgl/src/WindowPrivateData.cpp b/dgl/src/WindowPrivateData.cpp @@ -261,10 +261,18 @@ void Window::PrivateData::initPre(const uint width, const uint height, const boo puglSetViewHint(view, PUGL_DEPTH_BITS, 16); #endif puglSetViewHint(view, PUGL_STENCIL_BITS, 8); -#ifdef DGL_USE_OPENGL3 + +#if defined(DGL_USE_OPENGL3) || defined(DGL_USE_GLES3) puglSetViewHint(view, PUGL_USE_COMPAT_PROFILE, PUGL_FALSE); puglSetViewHint(view, PUGL_CONTEXT_VERSION_MAJOR, 3); +#elif defined(DGL_USE_GLES2) + puglSetViewHint(view, PUGL_USE_COMPAT_PROFILE, PUGL_FALSE); + puglSetViewHint(view, PUGL_CONTEXT_VERSION_MAJOR, 2); +#else + puglSetViewHint(view, PUGL_USE_COMPAT_PROFILE, PUGL_TRUE); + puglSetViewHint(view, PUGL_CONTEXT_VERSION_MAJOR, 2); #endif + // PUGL_SAMPLES ?? puglSetEventFunc(view, puglEventCallback);