diff options
-rw-r--r-- | src/gui/egl/qegl.cpp | 10 | ||||
-rw-r--r-- | src/gui/egl/qeglcontext_p.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 8bd4d7f..d4c9913 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -510,6 +510,16 @@ bool QEglContext::configAttrib(int name, EGLint *value) const return eglGetConfigAttrib(QEgl::display(), cfg, name, value); } +int QEglContext::configAttrib(int name) const +{ + EGLint value; + EGLBoolean success = eglGetConfigAttrib(QEgl::display(), cfg, name, &value); + if (success) + return value; + else + return EGL_DONT_CARE; +} + QEglProperties QEglContext::configProperties() const { return QEglProperties(config()); diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h index c656d1d..7eec7eb 100644 --- a/src/gui/egl/qeglcontext_p.h +++ b/src/gui/egl/qeglcontext_p.h @@ -89,6 +89,7 @@ public: void waitClient(); bool configAttrib(int name, EGLint *value) const; + int configAttrib(int name) const; EGLContext context() const { return ctx; } void setContext(EGLContext context) { ctx = context; ownsContext = false;} |