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.
This commit is contained in:
dsr
2021-01-25 21:44:17 -05:00
committed by Vadim Zeitlin
parent b692dd8aef
commit 98e4f910a5

View File

@@ -425,7 +425,6 @@ bool wxGLCanvas::ConvertWXAttrsToQtGL(const int *wxattrs, QGLFormat &format)
{ {
if (!wxattrs) if (!wxattrs)
return true; return true;
return true;
// set default parameters to false // set default parameters to false
format.setDoubleBuffer(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? // can we somehow indicate if it's not supported?
break; break;
case WX_GL_MAJOR_VERSION:
format.setVersion ( v,0 );
break;
default: default:
wxLogDebug(wxT("Unsupported OpenGL attribute %d"), wxLogDebug(wxT("Unsupported OpenGL attribute %d"),
wxattrs[arg]); wxattrs[arg]);