X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6762286db6cf974817dead5b88bebf0e390dbb7e..b02dd12239c8a59b9a545d9fcb04974f8ad02c6b:/include/wx/osx/glcanvas.h diff --git a/include/wx/osx/glcanvas.h b/include/wx/osx/glcanvas.h index 2d032aaad7..3377084b26 100644 --- a/include/wx/osx/glcanvas.h +++ b/include/wx/osx/glcanvas.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/mac/carbon/glcanvas.h +// Name: wx/osx/glcanvas.h // Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Macintosh // Author: Stefan Csomor // Modified by: @@ -12,14 +12,23 @@ #ifndef _WX_GLCANVAS_H_ #define _WX_GLCANVAS_H_ +#ifdef __WXOSX_IPHONE__ +#import +#import +#define wxUSE_OPENGL_EMULATION 1 +#else #include +#endif + +#include "wx/vector.h" // low level calls WXDLLIMPEXP_GL WXGLContext WXGLCreateContext( WXGLPixelFormat pixelFormat, WXGLContext shareContext ); WXDLLIMPEXP_GL void WXGLDestroyContext( WXGLContext context ); + WXDLLIMPEXP_GL WXGLContext WXGLGetCurrentContext(); -WXDLLIMPEXP_GL void WXGLSwapBuffers( WXGLContext context ); +WXDLLIMPEXP_GL bool WXGLSetCurrentContext(WXGLContext context); WXDLLIMPEXP_GL WXGLPixelFormat WXGLChoosePixelFormat(const int *attribList); WXDLLIMPEXP_GL void WXGLDestroyPixelFormat( WXGLPixelFormat pixelFormat ); @@ -34,11 +43,11 @@ public: // Mac-specific WXGLContext GetWXGLContext() const { return m_glContext; } - + private: WXGLContext m_glContext; - DECLARE_NO_COPY_CLASS(wxGLContext) + wxDECLARE_NO_COPY_CLASS(wxGLContext); }; class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase @@ -133,7 +142,7 @@ public: virtual void MacVisibilityChanged(); void MacUpdateView(); - + GLint GetAglBufferName() const { return m_bufferName; } #endif