diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.h b/src/plugins/platforms/cocoa/qcocoaglcontext.h new file mode 100644 index 0000000000..4d330a4294 --- /dev/null +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.h @@ -0,0 +1,28 @@ +#ifndef QCOCOAGLCONTEXT_H +#define QCOCOAGLCONTEXT_H + +#include <QtGui/QPlatformGLContext> +#include <QtGui/QWindowFormat> + +#include <Cocoa/Cocoa.h> + +QT_BEGIN_NAMESPACE + +class QCocoaGLContext : public QPlatformGLContext +{ +public: + QCocoaGLContext(NSOpenGLView *glView); + void makeCurrent(); + void doneCurrent(); + void swapBuffers(); + void* getProcAddress(const QString& procName); + QWindowFormat windowFormat() const; + static NSOpenGLPixelFormat *createNSOpenGLPixelFormat(); + NSOpenGLContext *nsOpenGLContext() const; +private: + NSOpenGLView *m_glView; +}; + +QT_END_NAMESPACE + +#endif // QCOCOAGLCONTEXT_H |