Merge pull request #1575 from kd-11/gl_canvas_fix

gl: Explicitly declare context attributes for GL canvas
This commit is contained in:
vlj 2016-03-17 02:04:14 +01:00
commit 45e48c2499
1 changed files with 9 additions and 1 deletions

View File

@ -4,7 +4,15 @@
GLGSFrame::GLGSFrame() : GSFrame("OpenGL")
{
m_canvas = new wxGLCanvas(this, wxID_ANY, NULL);
const int context_attrs[] =
{
WX_GL_RGBA,
WX_GL_DEPTH_SIZE, 16,
WX_GL_DOUBLEBUFFER,
0
};
m_canvas = new wxGLCanvas(this, wxID_ANY, context_attrs);
m_canvas->SetSize(GetClientSize());
m_canvas->Bind(wxEVT_LEFT_DCLICK, &GSFrame::OnLeftDclick, this);