Experimental stuff trying to fix wxGLContext errors on Mac, updates #850. Untested, might break build for Mac.
Originally committed to SVN as r3013.
This commit is contained in:
parent
4afd28b60a
commit
d6a8a07845
1 changed files with 8 additions and 2 deletions
|
@ -468,8 +468,14 @@ void VideoContext::JumpToTime(int ms,bool exact) {
|
|||
// Get GL context
|
||||
wxGLContext *VideoContext::GetGLContext(wxGLCanvas *canvas) {
|
||||
#ifdef __WXMAC__
|
||||
// This is probably wrong...
|
||||
if (!glContext) glContext = new wxGLContext(0, canvas, wxPalette(), 0);
|
||||
// This code is written blindly, might be very broken
|
||||
// What are the wxMac developers thinking? This is impossible to work with,
|
||||
// having a different API on different platforms...
|
||||
if (!glContext) {
|
||||
GLint pfmtattribs[] = {AGL_WINDOW, AGL_BACKING_STORE, AGL_STENCIL_SIZE, 1, 0};
|
||||
AGLPixelFormat pfmt = aglChoosePixelFormat(0, 0, pfmtattribs);
|
||||
glContext = new wxGLContext(pfmt, canvas, wxPalette(), 0);
|
||||
}
|
||||
#else
|
||||
if (!glContext) glContext = new wxGLContext(canvas);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue