Allow requesting core OpenGL profile and explicit OpenGL version.

Add WX_GL_CORE_PROFILE and WX_GL_{MAJOR,MINOR}_VERSION attributes which can be
used to use modern OpenGL with wxGLCanvas.

See #16402.

(this is a backport of 3c7ba39135 from master)
This commit is contained in:
Vadim Zeitlin
2015-09-23 03:18:33 +02:00
parent 3530c2ff95
commit f0e67ed517
6 changed files with 329 additions and 6 deletions

View File

@@ -48,7 +48,10 @@ enum
WX_GL_MIN_ACCUM_BLUE, // use blue buffer with most bits (> MIN_ACCUM_BLUE bits)
WX_GL_MIN_ACCUM_ALPHA, // use alpha buffer with most bits (> MIN_ACCUM_ALPHA bits)
WX_GL_SAMPLE_BUFFERS, // 1 for multisampling support (antialiasing)
WX_GL_SAMPLES // 4 for 2x2 antialiasing supersampling on most graphics cards
WX_GL_SAMPLES, // 4 for 2x2 antialiasing supersampling on most graphics cards
WX_GL_CORE_PROFILE, // use an OpenGL core profile
WX_GL_MAJOR_VERSION, // major OpenGL version of the core profile
WX_GL_MINOR_VERSION // minor OpenGL version of the core profile
};
#define wxGLCanvasName wxT("GLCanvas")