-wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win, const wxPalette& WXUNUSED(palette) )
-{
- m_window = win;
- m_widget = win->m_wxwindow;
-
- wxGLCanvas *gc = (wxGLCanvas*) win;
-
- if (wxGLCanvas::GetGLXVersion() >= 13)
- {
- // GLX >= 1.3
- GLXFBConfig *fbc = gc->m_fbc;
- wxCHECK_RET( fbc, _T("invalid GLXFBConfig for OpenGl") );
- m_glContext = glXCreateNewContext( GDK_DISPLAY(), fbc[0], GLX_RGBA_TYPE, None, GL_TRUE );
- }
- else
- {
- // GLX <= 1.2
- XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
- wxCHECK_RET( vi, _T("invalid visual for OpenGl") );
- m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
- }
-
- wxCHECK_RET( m_glContext, _T("Couldn't create OpenGl context") );
-}
-
-wxGLContext::wxGLContext(
- bool WXUNUSED(isRGB), wxWindow *win,
- const wxPalette& WXUNUSED(palette),
- const wxGLContext *other /* for sharing display lists */
-)