X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/521bf4ff3ef47059265beff5d53c9e1162beb122..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/x11/glcanvas.cpp diff --git a/src/x11/glcanvas.cpp b/src/x11/glcanvas.cpp index 9ab1474b9c..c6aa213acc 100644 --- a/src/x11/glcanvas.cpp +++ b/src/x11/glcanvas.cpp @@ -14,15 +14,18 @@ #include "wx/wxprec.h" #if defined(__BORLANDC__) -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_GLCANVAS #include "wx/glcanvas.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/log.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/utils.h" +#endif #ifdef __VMS # pragma message disable nosimpint @@ -311,7 +314,7 @@ bool wxGLCanvas::Create( wxWindow *parent, attribList = (int*) data; // Get an appropriate visual vi = glXChooseVisual(display, DefaultScreen(display), attribList); - if(!vi) return FALSE; + if(!vi) return false; // Here we should make sure that vi is the same visual as the // one used by the xwindow drawable in wxCanvas. However, @@ -322,9 +325,9 @@ bool wxGLCanvas::Create( wxWindow *parent, XGetWindowAttributes(display, (Window)wxGetClientAreaWindow(this), &xwa); vi_templ.visualid = XVisualIDFromVisual(xwa.visual); vi = XGetVisualInfo(display, VisualIDMask, &vi_templ, &n); - if(!vi) return FALSE; + if(!vi) return false; glXGetConfig(display, vi, GLX_USE_GL, &val); - if(!val) return FALSE; + if(!val) return false; // Basically, this is it. It should be possible to use vi // in glXCreateContext() below. But this fails with Mesa. // I notified the Mesa author about it; there may be a fix. @@ -351,13 +354,13 @@ bool wxGLCanvas::Create( wxWindow *parent, a_list[n] = None; // XFree(vi); vi = glXChooseVisual(display, DefaultScreen(display), a_list); - if(!vi) return FALSE; + if(!vi) return false; #endif /* OLD_MESA */ } m_vi = vi; // safe for later use - wxCHECK_MSG( m_vi, FALSE, wxT("required visual couldn't be found") ); + wxCHECK_MSG( m_vi, false, wxT("required visual couldn't be found") ); // Create the GLX context and make it current