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:
@@ -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]);
|
||||
|
Reference in New Issue
Block a user