diff options
author | Morten Sorvig <morten.sorvig@nokia.com> | 2011-05-18 12:09:17 +0200 |
---|---|---|
committer | Morten Sorvig <morten.sorvig@nokia.com> | 2011-05-18 12:09:17 +0200 |
commit | 864815ef2efbc3b5dca2a645c1b63f9bb67285d0 (patch) | |
tree | ae2c208919d2f0ff5c9fadadce009170bee46ad5 /src/plugins/platforms/cocoa/qcocoaglcontext.h | |
parent | 516f4e283ba4626d7239630397ef867ab0366071 (diff) |
Port Qt 5 to Mac.
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.h | 27 |
1 files changed, 27 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..b9a84a1606 --- /dev/null +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.h @@ -0,0 +1,27 @@ +#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(); +private: + NSOpenGLView *m_glView; +}; + +QT_END_NAMESPACE + +#endif // QCOCOAGLCONTEXT_H |