summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaglcontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.h b/src/plugins/platforms/cocoa/qcocoaglcontext.h
index 0530aa8201..cef5892989 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.h
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.h
@@ -52,39 +52,33 @@ QT_BEGIN_NAMESPACE
class QCocoaGLContext : public QPlatformOpenGLContext
{
public:
- QCocoaGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, const QVariant &nativeHandle);
+ QCocoaGLContext(QOpenGLContext *context);
~QCocoaGLContext();
- QSurfaceFormat format() const override;
-
- void swapBuffers(QPlatformSurface *surface) override;
-
bool makeCurrent(QPlatformSurface *surface) override;
+ void swapBuffers(QPlatformSurface *surface) override;
void doneCurrent() override;
- QFunctionPointer getProcAddress(const char *procName) override;
-
void update();
- static NSOpenGLPixelFormat *createNSOpenGLPixelFormat(const QSurfaceFormat &format);
- NSOpenGLContext *nsOpenGLContext() const;
-
+ QSurfaceFormat format() const override;
bool isSharing() const override;
bool isValid() const override;
- void windowWasHidden();
+ NSOpenGLContext *nativeContext() const;
- QVariant nativeHandle() const;
+ QFunctionPointer getProcAddress(const char *procName) override;
private:
- void setActiveWindow(QWindow *window);
+ static NSOpenGLPixelFormat *pixelFormatForSurfaceFormat(const QSurfaceFormat &format);
+
+ bool setDrawable(QPlatformSurface *surface);
void updateSurfaceFormat();
- NSOpenGLContext *m_context;
- NSOpenGLContext *m_shareContext;
+ NSOpenGLContext *m_context = nil;
+ NSOpenGLContext *m_shareContext = nil;
QSurfaceFormat m_format;
- QPointer<QWindow> m_currentWindow;
- bool m_didCheckForSoftwareContext;
+ bool m_didCheckForSoftwareContext = false;
};
QT_END_NAMESPACE