Browse Source

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

Signed-off-by: falkTX <falktx@falktx.com>
pull/321/head
falkTX 3 years ago
parent
commit
aa99d51731
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 10 additions and 2 deletions
  1. +9
    -1
      dgl/src/WindowPrivateData.cpp
  2. +1
    -1
      dgl/src/pugl-upstream

+ 9
- 1
dgl/src/WindowPrivateData.cpp View File

@@ -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);



+ 1
- 1
dgl/src/pugl-upstream

@@ -1 +1 @@
Subproject commit 6d4e25100be6719565b512d6aeac19c5b581ba48
Subproject commit c4fd6af2ebd694fcbafeb81619a44ad90639a3b0

Loading…
Cancel
Save