X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f48d169c4a57bd4ac2f44e42b9fd26a930bbdca0..72594e90b2da8c167ba63b89b2c168c57a19cab4:/include/wx/gtk/glcanvas.h diff --git a/include/wx/gtk/glcanvas.h b/include/wx/gtk/glcanvas.h index 813e314738..ae7de3acc6 100644 --- a/include/wx/gtk/glcanvas.h +++ b/include/wx/gtk/glcanvas.h @@ -16,16 +16,13 @@ #ifndef _WX_GLCANVAS_H_ #define _WX_GLCANVAS_H_ -#include - -#if wxUSE_GLCANVAS - -#include +#include "wx/scrolwin.h" +#include "wx/app.h" extern "C" { -#include "GL/gl.h" -#include "GL/glx.h" -#include "GL/glu.h" +#include +#include +#include } //--------------------------------------------------------------------------- @@ -100,7 +97,7 @@ private: }; //--------------------------------------------------------------------------- -// wxGLContext +// wxGLCanvas //--------------------------------------------------------------------------- class WXDLLEXPORT wxGLCanvas: public wxScrolledWindow @@ -161,18 +158,22 @@ public: wxGLContext *m_glContext, *m_sharedContext; wxGLCanvas *m_sharedContextOf; - void *m_vi; + void *m_vi; // actually an XVisualInfo* + bool m_canFreeVi; GtkWidget *m_glWidget; bool m_exposed; + + // returns an XVisualInfo* based on desired GL attributes; + // returns NULL if an appropriate visual is not found. The + // caller is reponsible for using XFree() to deallocate + // the returned structure. + static void* ChooseGLVisual(int *attribList); private: DECLARE_EVENT_TABLE() DECLARE_CLASS(wxGLCanvas) }; -#endif - // wxUSE_GLCANVAS - #endif // _WX_GLCANVAS_H_