From 98e4f910a5ac692eea8f63d1f08d0d2ed4d84f85 Mon Sep 17 00:00:00 2001 From: dsr Date: Mon, 25 Jan 2021 21:44:17 -0500 Subject: [PATCH] Implement setting wxGLCanvas attributes in wxQt Simply remove the premature "return true" which was somehow added back in df13791078 (Merge wxQT branch into the trunk., 2014-08-24) and add WX_GL_MAJOR_VERSION support. --- src/qt/glcanvas.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qt/glcanvas.cpp b/src/qt/glcanvas.cpp index 4361b344a3..3ee0275868 100644 --- a/src/qt/glcanvas.cpp +++ b/src/qt/glcanvas.cpp @@ -425,7 +425,6 @@ bool wxGLCanvas::ConvertWXAttrsToQtGL(const int *wxattrs, QGLFormat &format) { if (!wxattrs) return true; - return true; // set default parameters to false format.setDoubleBuffer(false); @@ -513,6 +512,10 @@ bool wxGLCanvas::ConvertWXAttrsToQtGL(const int *wxattrs, QGLFormat &format) // can we somehow indicate if it's not supported? break; + case WX_GL_MAJOR_VERSION: + format.setVersion ( v,0 ); + break; + default: wxLogDebug(wxT("Unsupported OpenGL attribute %d"), wxattrs[arg]);