diff --git a/src/backends/x11/standalone/glxcontext.h b/src/backends/x11/standalone/glxcontext.h index d6dae1543a..80d7545f2a 100644 --- a/src/backends/x11/standalone/glxcontext.h +++ b/src/backends/x11/standalone/glxcontext.h @@ -25,8 +25,8 @@ public: GlxContext(::Display *display, GLXWindow window, GLXContext handle); ~GlxContext() override; - bool makeCurrent(); - void doneCurrent() const; + bool makeCurrent() override; + void doneCurrent() const override; void glXSwapIntervalMESA(unsigned int interval); diff --git a/src/opengl/eglcontext.cpp b/src/opengl/eglcontext.cpp index 9be568c823..4801739128 100644 --- a/src/opengl/eglcontext.cpp +++ b/src/opengl/eglcontext.cpp @@ -82,6 +82,11 @@ EglContext::~EglContext() eglDestroyContext(m_display->handle(), m_handle); } +bool EglContext::makeCurrent() +{ + return makeCurrent(EGL_NO_SURFACE); +} + bool EglContext::makeCurrent(EGLSurface surface) { if (QOpenGLContext *context = QOpenGLContext::currentContext()) { diff --git a/src/opengl/eglcontext.h b/src/opengl/eglcontext.h index 39701b81e8..71dd93e6c6 100644 --- a/src/opengl/eglcontext.h +++ b/src/opengl/eglcontext.h @@ -28,8 +28,9 @@ public: EglContext(EglDisplay *display, EGLConfig config, ::EGLContext context); ~EglContext() override; - bool makeCurrent(EGLSurface surface = EGL_NO_SURFACE); - void doneCurrent() const; + bool makeCurrent() override; + bool makeCurrent(EGLSurface surface); + void doneCurrent() const override; std::shared_ptr importDmaBufAsTexture(const DmaBufAttributes &attributes) const; EglDisplay *displayObject() const; diff --git a/src/opengl/openglcontext.h b/src/opengl/openglcontext.h index dc02bde717..1b8b294499 100644 --- a/src/opengl/openglcontext.h +++ b/src/opengl/openglcontext.h @@ -39,6 +39,9 @@ public: explicit OpenGlContext(bool EGL); virtual ~OpenGlContext(); + virtual bool makeCurrent() = 0; + virtual void doneCurrent() const = 0; + bool hasVersion(const Version &version) const; QByteArrayView openglVersionString() const;