commit a07aaf986f396bf5b014add962b5f38041121fdf
parent c17c260d08613ab46e13dc578104c74b5713a435
Author: falkTX <falktx@falktx.com>
Date: Fri, 8 Oct 2021 23:07:27 +0100
Allow DGL_USE_RGBA macro, will setup 24 depth bits and glx RGBA
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/dgl/src/WindowPrivateData.cpp b/dgl/src/WindowPrivateData.cpp
@@ -249,7 +249,11 @@ void Window::PrivateData::initPre(const uint width, const uint height, const boo
puglSetHandle(view, this);
puglSetViewHint(view, PUGL_RESIZABLE, resizable ? PUGL_TRUE : PUGL_FALSE);
puglSetViewHint(view, PUGL_IGNORE_KEY_REPEAT, PUGL_FALSE);
+#if DGL_USE_RGBA
+ puglSetViewHint(view, PUGL_DEPTH_BITS, 24);
+#else
puglSetViewHint(view, PUGL_DEPTH_BITS, 16);
+#endif
puglSetViewHint(view, PUGL_STENCIL_BITS, 8);
#ifdef DGL_USE_OPENGL3
puglSetViewHint(view, PUGL_USE_COMPAT_PROFILE, PUGL_FALSE);