From aa99d51731cf915d83abb578c232b89fbad6c231 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 7 Jul 2022 13:34:42 +0100 Subject: [PATCH] Use GL2 by default with compat profile, set GL3 and GLES target too Signed-off-by: falkTX --- dgl/src/WindowPrivateData.cpp | 10 +++++++++- dgl/src/pugl-upstream | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dgl/src/WindowPrivateData.cpp b/dgl/src/WindowPrivateData.cpp index 92d90fc7..dddcf264 100644 --- 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); diff --git a/dgl/src/pugl-upstream b/dgl/src/pugl-upstream index 6d4e2510..c4fd6af2 160000 --- a/dgl/src/pugl-upstream +++ b/dgl/src/pugl-upstream @@ -1 +1 @@ -Subproject commit 6d4e25100be6719565b512d6aeac19c5b581ba48 +Subproject commit c4fd6af2ebd694fcbafeb81619a44ad90639a3b0