diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2016-02-02 15:15:52 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-03-01 14:46:29 +0000 |
commit | 8115a3b4442c44b6b2f6ab55a0d083a26c14ed6f (patch) | |
tree | 3526114beedc639f85b1aee5f9fd5258463190c9 /src/gui/opengl/qopengltexturehelper.cpp | |
parent | 5e9a5246fb688a33ff27bed010226595f579f23d (diff) |
Get rid of the gles3helper class
Since the backends can now resolve all possible GL
functions, there's no need for the special handling
for GLES that this class did anymore.
Change-Id: Ib48aecc9a892f3c883d76ffc82217f346dbb3adc
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/gui/opengl/qopengltexturehelper.cpp')
-rw-r--r-- | src/gui/opengl/qopengltexturehelper.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp index c0d3bc3c73..ff848db0b9 100644 --- a/src/gui/opengl/qopengltexturehelper.cpp +++ b/src/gui/opengl/qopengltexturehelper.cpp @@ -184,9 +184,9 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context) QOpenGLContext *ctx = QOpenGLContext::currentContext(); if (ctx->format().majorVersion() >= 3) { // OpenGL ES 3.0+ has immutable storage for 2D and 3D at least. - QOpenGLES3Helper *es3 = static_cast<QOpenGLExtensions *>(ctx->functions())->gles3Helper(); - TexStorage3D = es3->TexStorage3D; - TexStorage2D = es3->TexStorage2D; + QOpenGLExtraFunctionsPrivate *extra = static_cast<QOpenGLExtensions *>(context->extraFunctions())->d(); + TexStorage3D = extra->TexStorage3D; + TexStorage2D = extra->TexStorage2D; } else { TexStorage3D = 0; TexStorage2D = 0; @@ -210,11 +210,11 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context) QOpenGLContext *ctx = QOpenGLContext::currentContext(); if (ctx->isOpenGLES() && ctx->format().majorVersion() >= 3) { // OpenGL ES 3.0+ has glTexImage3D. - QOpenGLES3Helper *es3 = static_cast<QOpenGLExtensions *>(ctx->functions())->gles3Helper(); - TexImage3D = es3->TexImage3D; - TexSubImage3D = es3->TexSubImage3D; - CompressedTexImage3D = es3->CompressedTexImage3D; - CompressedTexSubImage3D = es3->CompressedTexSubImage3D; + QOpenGLExtraFunctionsPrivate *extra = static_cast<QOpenGLExtensions *>(context->extraFunctions())->d(); + TexImage3D = extra->TexImage3D; + TexSubImage3D = extra->TexSubImage3D; + CompressedTexImage3D = extra->CompressedTexImage3D; + CompressedTexSubImage3D = extra->CompressedTexSubImage3D; } else { // OpenGL 1.2 TexImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexImage3D")); |