summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaglcontext.h
blob: b9a84a160642c0a6aa9f44b79d8d0436bb2a919c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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