From f9d323279a0b3928acf40d56d84e9e5cc2cb7ee9 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 24 Apr 2014 17:11:23 +0200 Subject: Rename new QOpenGLContext APIs isES() becomes isOpenGLES(). The library type enums are changed DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now unnecessary version number, the confusing "desktop" term and provides better readability. The old function/values are kept until the related qtdeclarative changes are integrated. Task-number: QTBUG-38564 Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505 Reviewed-by: Sean Harmer --- src/opengl/qglframebufferobject.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/opengl/qglframebufferobject.cpp') diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index bd8bc2f64a..419055f1a3 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -595,7 +595,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz, GL_DEPTH_COMPONENT16, size.width(), size.height()); } #else - if (ctx->contextHandle()->isES()) { + if (ctx->contextHandle()->isOpenGLES()) { if (funcs.hasOpenGLExtension(QOpenGLExtensions::Depth24)) funcs.glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, GL_DEPTH_COMPONENT24, size.width(), size.height()); @@ -617,7 +617,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz, size.width(), size.height()); } #else - if (ctx->contextHandle()->isES()) { + if (ctx->contextHandle()->isOpenGLES()) { if (funcs.hasOpenGLExtension(QOpenGLExtensions::Depth24)) { funcs.glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, size.width(), size.height()); @@ -647,7 +647,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz, #ifdef QT_OPENGL_ES GLenum storage = GL_STENCIL_INDEX8; #else - GLenum storage = ctx->contextHandle()->isES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX; + GLenum storage = ctx->contextHandle()->isOpenGLES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX; #endif if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) @@ -849,7 +849,7 @@ QGLFramebufferObject::QGLFramebufferObject(const QSize &size, GLenum target) Q_D(QGLFramebufferObject); d->init(this, size, NoAttachment, target, #ifndef QT_OPENGL_ES_2 - QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8 + QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8 #else GL_RGBA #endif @@ -869,7 +869,7 @@ QGLFramebufferObject::QGLFramebufferObject(int width, int height, GLenum target) Q_D(QGLFramebufferObject); d->init(this, QSize(width, height), NoAttachment, target, #ifndef QT_OPENGL_ES_2 - QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8 + QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8 #else GL_RGBA #endif @@ -926,7 +926,7 @@ QGLFramebufferObject::QGLFramebufferObject(int width, int height, Attachment att #ifdef QT_OPENGL_ES_2 internal_format = GL_RGBA; #else - internal_format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8; + internal_format = QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8; #endif d->init(this, QSize(width, height), attachment, target, internal_format); } @@ -953,7 +953,7 @@ QGLFramebufferObject::QGLFramebufferObject(const QSize &size, Attachment attachm #ifdef QT_OPENGL_ES_2 internal_format = GL_RGBA; #else - internal_format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8; + internal_format = QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8; #endif d->init(this, size, attachment, target, internal_format); } -- cgit v1.2.3