| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopengltexturehelper.cpp |
| Source code | Switch to Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | /**************************************************************************** | - | ||||||||||||
| 2 | ** | - | ||||||||||||
| 3 | ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB). | - | ||||||||||||
| 4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||||||||
| 5 | ** | - | ||||||||||||
| 6 | ** This file is part of the QtGui module of the Qt Toolkit. | - | ||||||||||||
| 7 | ** | - | ||||||||||||
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ | - | ||||||||||||
| 9 | ** Commercial License Usage | - | ||||||||||||
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||||||||
| 11 | ** accordance with the commercial license agreement provided with the | - | ||||||||||||
| 12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||||||||
| 13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||||||||
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||||||||
| 15 | ** information use the contact form at https://www.qt.io/contact-us. | - | ||||||||||||
| 16 | ** | - | ||||||||||||
| 17 | ** GNU Lesser General Public License Usage | - | ||||||||||||
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||||||||
| 19 | ** General Public License version 3 as published by the Free Software | - | ||||||||||||
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||||||||
| 21 | ** packaging of this file. Please review the following information to | - | ||||||||||||
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||||||||
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||||||||
| 24 | ** | - | ||||||||||||
| 25 | ** GNU General Public License Usage | - | ||||||||||||
| 26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||||||||
| 27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||||||||
| 28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||||||||
| 29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||||||||
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||||||||
| 31 | ** included in the packaging of this file. Please review the following | - | ||||||||||||
| 32 | ** information to ensure the GNU General Public License requirements will | - | ||||||||||||
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||||||||
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||||||||
| 35 | ** | - | ||||||||||||
| 36 | ** $QT_END_LICENSE$ | - | ||||||||||||
| 37 | ** | - | ||||||||||||
| 38 | ****************************************************************************/ | - | ||||||||||||
| 39 | - | |||||||||||||
| 40 | #include "qopengltexturehelper_p.h" | - | ||||||||||||
| 41 | - | |||||||||||||
| 42 | #include <QOpenGLContext> | - | ||||||||||||
| 43 | #include <private/qopenglextensions_p.h> | - | ||||||||||||
| 44 | - | |||||||||||||
| 45 | QT_BEGIN_NAMESPACE | - | ||||||||||||
| 46 | - | |||||||||||||
| 47 | QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context) | - | ||||||||||||
| 48 | { | - | ||||||||||||
| 49 | functions = context->functions(); | - | ||||||||||||
| 50 | // Resolve EXT_direct_state_access entry points if present. | - | ||||||||||||
| 51 | - | |||||||||||||
| 52 | // However, disable it on some systems where DSA is known to be unreliable. | - | ||||||||||||
| 53 | bool allowDSA = true; | - | ||||||||||||
| 54 | const char *renderer = reinterpret_cast<const char *>(context->functions()->glGetString(GL_RENDERER)); | - | ||||||||||||
| 55 | // QTBUG-40653, QTBUG-44988 | - | ||||||||||||
| 56 | if (renderer && strstr(renderer, "AMD Radeon HD"))
| 0 | ||||||||||||
| 57 | allowDSA = false; never executed: allowDSA = false; | 0 | ||||||||||||
| 58 | - | |||||||||||||
| 59 | if (allowDSA && !context->isOpenGLES()
| 0 | ||||||||||||
| 60 | && context->hasExtension(QByteArrayLiteral("GL_EXT_direct_state_access"))) {
| 0 | ||||||||||||
| 61 | TextureParameteriEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , GLint )>(context->getProcAddress(QByteArrayLiteral("glTextureParameteriEXT")));)); | - | ||||||||||||
| 62 | TextureParameterivEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , const GLint *)>(context->getProcAddress(QByteArrayLiteral("glTextureParameterivEXT")));)); | - | ||||||||||||
| 63 | TextureParameterfEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , GLfloat )>(context->getProcAddress(QByteArrayLiteral("glTextureParameterfEXT")));)); | - | ||||||||||||
| 64 | TextureParameterfvEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , const GLfloat *)>(context->getProcAddress(QByteArrayLiteral("glTextureParameterfvEXT")));)); | - | ||||||||||||
| 65 | GenerateTextureMipmapEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum )>(context->getProcAddress(QByteArrayLiteral("glGenerateTextureMipmapEXT")));)); | - | ||||||||||||
| 66 | TextureStorage3DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLsizei )>(context->getProcAddress(QByteArrayLiteral("glTextureStorage3DEXT")));)); | - | ||||||||||||
| 67 | TextureStorage2DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLenum , GLsizei , GLsizei )>(context->getProcAddress(QByteArrayLiteral("glTextureStorage2DEXT")));)); | - | ||||||||||||
| 68 | TextureStorage1DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLenum , GLsizei )>(context->getProcAddress(QByteArrayLiteral("glTextureStorage1DEXT")));)); | - | ||||||||||||
| 69 | TextureStorage3DMultisampleEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTextureStorage3DMultisampleEXT")));)); | - | ||||||||||||
| 70 | TextureStorage2DMultisampleEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTextureStorage2DMultisampleEXT")));)); | - | ||||||||||||
| 71 | TextureImage3DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLenum , GLsizei , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTextureImage3DEXT")));)); | - | ||||||||||||
| 72 | TextureImage2DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLenum , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTextureImage2DEXT")));)); | - | ||||||||||||
| 73 | TextureImage1DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLenum , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTextureImage1DEXT")));)); | - | ||||||||||||
| 74 | TextureSubImage3DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTextureSubImage3DEXT")));)); | - | ||||||||||||
| 75 | TextureSubImage2DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTextureSubImage2DEXT")));)); | - | ||||||||||||
| 76 | TextureSubImage1DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTextureSubImage1DEXT")));)); | - | ||||||||||||
| 77 | CompressedTextureSubImage1DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLint , GLsizei , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTextureSubImage1DEXT")));)); | - | ||||||||||||
| 78 | CompressedTextureSubImage2DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTextureSubImage2DEXT")));)); | - | ||||||||||||
| 79 | CompressedTextureSubImage3DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTextureSubImage3DEXT")));)); | - | ||||||||||||
| 80 | CompressedTextureImage1DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLenum , GLsizei , GLint , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTextureImage1DEXT")));)); | - | ||||||||||||
| 81 | CompressedTextureImage2DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLenum , GLsizei , GLsizei , GLint , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTextureImage2DEXT")));)); | - | ||||||||||||
| 82 | CompressedTextureImage3DEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , GLenum , GLsizei , GLsizei , GLsizei , GLint , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTextureImage3DEXT")));)); | - | ||||||||||||
| 83 | - | |||||||||||||
| 84 | // Use the real DSA functions | - | ||||||||||||
| 85 | TextureParameteri = &QOpenGLTextureHelper::dsa_TextureParameteri; | - | ||||||||||||
| 86 | TextureParameteriv = &QOpenGLTextureHelper::dsa_TextureParameteriv; | - | ||||||||||||
| 87 | TextureParameterf = &QOpenGLTextureHelper::dsa_TextureParameterf; | - | ||||||||||||
| 88 | TextureParameterfv = &QOpenGLTextureHelper::dsa_TextureParameterfv; | - | ||||||||||||
| 89 | GenerateTextureMipmap = &QOpenGLTextureHelper::dsa_GenerateTextureMipmap; | - | ||||||||||||
| 90 | TextureStorage3D = &QOpenGLTextureHelper::dsa_TextureStorage3D; | - | ||||||||||||
| 91 | TextureStorage2D = &QOpenGLTextureHelper::dsa_TextureStorage2D; | - | ||||||||||||
| 92 | TextureStorage1D = &QOpenGLTextureHelper::dsa_TextureStorage1D; | - | ||||||||||||
| 93 | TextureStorage3DMultisample = &QOpenGLTextureHelper::dsa_TextureStorage3DMultisample; | - | ||||||||||||
| 94 | TextureStorage2DMultisample = &QOpenGLTextureHelper::dsa_TextureStorage2DMultisample; | - | ||||||||||||
| 95 | TextureImage3D = &QOpenGLTextureHelper::dsa_TextureImage3D; | - | ||||||||||||
| 96 | TextureImage2D = &QOpenGLTextureHelper::dsa_TextureImage2D; | - | ||||||||||||
| 97 | TextureImage1D = &QOpenGLTextureHelper::dsa_TextureImage1D; | - | ||||||||||||
| 98 | TextureSubImage3D = &QOpenGLTextureHelper::dsa_TextureSubImage3D; | - | ||||||||||||
| 99 | TextureSubImage2D = &QOpenGLTextureHelper::dsa_TextureSubImage2D; | - | ||||||||||||
| 100 | TextureSubImage1D = &QOpenGLTextureHelper::dsa_TextureSubImage1D; | - | ||||||||||||
| 101 | CompressedTextureSubImage1D = &QOpenGLTextureHelper::dsa_CompressedTextureSubImage1D; | - | ||||||||||||
| 102 | CompressedTextureSubImage2D = &QOpenGLTextureHelper::dsa_CompressedTextureSubImage2D; | - | ||||||||||||
| 103 | CompressedTextureSubImage3D = &QOpenGLTextureHelper::dsa_CompressedTextureSubImage3D; | - | ||||||||||||
| 104 | CompressedTextureImage1D = &QOpenGLTextureHelper::dsa_CompressedTextureImage1D; | - | ||||||||||||
| 105 | CompressedTextureImage2D = &QOpenGLTextureHelper::dsa_CompressedTextureImage2D; | - | ||||||||||||
| 106 | CompressedTextureImage3D = &QOpenGLTextureHelper::dsa_CompressedTextureImage3D; | - | ||||||||||||
| 107 | } else { never executed: end of block | 0 | ||||||||||||
| 108 | // Use our own DSA emulation | - | ||||||||||||
| 109 | TextureParameteri = &QOpenGLTextureHelper::qt_TextureParameteri; | - | ||||||||||||
| 110 | TextureParameteriv = &QOpenGLTextureHelper::qt_TextureParameteriv; | - | ||||||||||||
| 111 | TextureParameterf = &QOpenGLTextureHelper::qt_TextureParameterf; | - | ||||||||||||
| 112 | TextureParameterfv = &QOpenGLTextureHelper::qt_TextureParameterfv; | - | ||||||||||||
| 113 | GenerateTextureMipmap = &QOpenGLTextureHelper::qt_GenerateTextureMipmap; | - | ||||||||||||
| 114 | TextureStorage3D = &QOpenGLTextureHelper::qt_TextureStorage3D; | - | ||||||||||||
| 115 | TextureStorage2D = &QOpenGLTextureHelper::qt_TextureStorage2D; | - | ||||||||||||
| 116 | TextureStorage1D = &QOpenGLTextureHelper::qt_TextureStorage1D; | - | ||||||||||||
| 117 | TextureStorage3DMultisample = &QOpenGLTextureHelper::qt_TextureStorage3DMultisample; | - | ||||||||||||
| 118 | TextureStorage2DMultisample = &QOpenGLTextureHelper::qt_TextureStorage2DMultisample; | - | ||||||||||||
| 119 | TextureImage3D = &QOpenGLTextureHelper::qt_TextureImage3D; | - | ||||||||||||
| 120 | TextureImage2D = &QOpenGLTextureHelper::qt_TextureImage2D; | - | ||||||||||||
| 121 | TextureImage1D = &QOpenGLTextureHelper::qt_TextureImage1D; | - | ||||||||||||
| 122 | TextureSubImage3D = &QOpenGLTextureHelper::qt_TextureSubImage3D; | - | ||||||||||||
| 123 | TextureSubImage2D = &QOpenGLTextureHelper::qt_TextureSubImage2D; | - | ||||||||||||
| 124 | TextureSubImage1D = &QOpenGLTextureHelper::qt_TextureSubImage1D; | - | ||||||||||||
| 125 | CompressedTextureSubImage1D = &QOpenGLTextureHelper::qt_CompressedTextureSubImage1D; | - | ||||||||||||
| 126 | CompressedTextureSubImage2D = &QOpenGLTextureHelper::qt_CompressedTextureSubImage2D; | - | ||||||||||||
| 127 | CompressedTextureSubImage3D = &QOpenGLTextureHelper::qt_CompressedTextureSubImage3D; | - | ||||||||||||
| 128 | CompressedTextureImage1D = &QOpenGLTextureHelper::qt_CompressedTextureImage1D; | - | ||||||||||||
| 129 | CompressedTextureImage2D = &QOpenGLTextureHelper::qt_CompressedTextureImage2D; | - | ||||||||||||
| 130 | CompressedTextureImage3D = &QOpenGLTextureHelper::qt_CompressedTextureImage3D; | - | ||||||||||||
| 131 | } never executed: end of block | 0 | ||||||||||||
| 132 | - | |||||||||||||
| 133 | // Some DSA functions are part of NV_texture_multisample instead | - | ||||||||||||
| 134 | if (!context->isOpenGLES()
| 0 | ||||||||||||
| 135 | && context->hasExtension(QByteArrayLiteral("GL_NV_texture_multisample"))) { never executed: return ba;
| 0 | ||||||||||||
| 136 | TextureImage3DMultisampleNV = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLint , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTextureImage3DMultisampleNV")));)); | - | ||||||||||||
| 137 | TextureImage2DMultisampleNV = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLint , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTextureImage2DMultisampleNV")));)); | - | ||||||||||||
| 138 | - | |||||||||||||
| 139 | TextureImage3DMultisample = &QOpenGLTextureHelper::dsa_TextureImage3DMultisample; | - | ||||||||||||
| 140 | TextureImage2DMultisample = &QOpenGLTextureHelper::dsa_TextureImage2DMultisample; | - | ||||||||||||
| 141 | } else { never executed: end of block | 0 | ||||||||||||
| 142 | TextureImage3DMultisample = &QOpenGLTextureHelper::qt_TextureImage3DMultisample; | - | ||||||||||||
| 143 | TextureImage2DMultisample = &QOpenGLTextureHelper::qt_TextureImage2DMultisample; | - | ||||||||||||
| 144 | } never executed: end of block | 0 | ||||||||||||
| 145 | - | |||||||||||||
| 146 | #if defined(Q_OS_WIN) && !defined(QT_OPENGL_ES_2) | - | ||||||||||||
| HMODULE handle = static_cast<HMODULE>(QOpenGLContext::openGLModuleHandle()); | ||||||||||||||
| if (!handle) | ||||||||||||||
| handle = GetModuleHandleA("opengl32.dll"); | ||||||||||||||
| GetIntegerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint *)>(GetProcAddress(handle, QByteArrayLiteral("glGetIntegerv"))); | ||||||||||||||
| GetBooleanv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLboolean *)>(GetProcAddress(handle, QByteArrayLiteral("glGetBooleanv"))); | ||||||||||||||
| PixelStorei = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint )>(GetProcAddress(handle, QByteArrayLiteral("glPixelStorei"))); | ||||||||||||||
| GetTexLevelParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint *)>(GetProcAddress(handle, QByteArrayLiteral("glGetTexLevelParameteriv"))); | ||||||||||||||
| GetTexLevelParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLfloat *)>(GetProcAddress(handle, QByteArrayLiteral("glGetTexLevelParameterfv"))); | ||||||||||||||
| GetTexParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLint *)>(GetProcAddress(handle, QByteArrayLiteral("glGetTexParameteriv"))); | ||||||||||||||
| GetTexParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLfloat *)>(GetProcAddress(handle, QByteArrayLiteral("glGetTexParameterfv"))); | ||||||||||||||
| GetTexImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLenum , GLvoid *)>(GetProcAddress(handle, QByteArrayLiteral("glGetTexImage"))); | ||||||||||||||
| TexImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(GetProcAddress(handle, QByteArrayLiteral("glTexImage2D"))); | ||||||||||||||
| TexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(GetProcAddress(handle, QByteArrayLiteral("glTexImage1D"))); | ||||||||||||||
| TexParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLint *)>(GetProcAddress(handle, QByteArrayLiteral("glTexParameteriv"))); | ||||||||||||||
| TexParameteri = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLint )>(GetProcAddress(handle, QByteArrayLiteral("glTexParameteri"))); | ||||||||||||||
| TexParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLfloat *)>(GetProcAddress(handle, QByteArrayLiteral("glTexParameterfv"))); | ||||||||||||||
| TexParameterf = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLfloat )>(GetProcAddress(handle, QByteArrayLiteral("glTexParameterf"))); | ||||||||||||||
| GenTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(GetProcAddress(handle, QByteArrayLiteral("glGenTextures"))); | ||||||||||||||
| DeleteTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *)>(GetProcAddress(handle, QByteArrayLiteral("glDeleteTextures"))); | ||||||||||||||
| BindTexture = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(GetProcAddress(handle, QByteArrayLiteral("glBindTexture"))); | ||||||||||||||
| TexSubImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(GetProcAddress(handle, QByteArrayLiteral("glTexSubImage2D"))); | ||||||||||||||
| TexSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(GetProcAddress(handle, QByteArrayLiteral("glTexSubImage1D"))); | ||||||||||||||
| #elifdefined(QT_OPENGL_ES_2) | ||||||||||||||
| 147 | // Here we are targeting OpenGL ES 2.0+ only. This is likely using EGL, where, | - | ||||||||||||
| 148 | // similarly to WGL, non-extension functions (i.e. any function that is part of the | - | ||||||||||||
| 149 | // GLES spec) *may* not be queried via eglGetProcAddress. | - | ||||||||||||
| 150 | - | |||||||||||||
| 151 | // OpenGL 1.0 | - | ||||||||||||
| 152 | GetIntegerv = ::glGetIntegerv; | - | ||||||||||||
| GetBooleanv = ::glGetBooleanv; | ||||||||||||||
| PixelStorei = ::glPixelStorei; | ||||||||||||||
| GetTexLevelParameteriv = 0; | ||||||||||||||
| GetTexLevelParameterfv = 0; | ||||||||||||||
| GetTexParameteriv = ::glGetTexParameteriv; | ||||||||||||||
| GetTexParameterfv = ::glGetTexParameterfv; | ||||||||||||||
| GetTexImage = 0; | ||||||||||||||
| TexImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(::glTexImage2D);TexImage1D = 0; | ||||||||||||||
| TexParameteriv = ::glTexParameteriv; | ||||||||||||||
| TexParameteri = ::glTexParameteri; | ||||||||||||||
| TexParameterfv = ::glTexParameterfv; | ||||||||||||||
| TexParameterf = ::glTexParameterf; | ||||||||||||||
| 153 | - | |||||||||||||
| 154 | // OpenGL 1.1 | - | ||||||||||||
| 155 | GenTextures = ::glGenTextures; | - | ||||||||||||
| DeleteTextures = ::glDeleteTextures; | ||||||||||||||
| BindTexture = ::glBindTexture; | ||||||||||||||
| TexSubImage2D = ::glTexSubImage2D;TexSubImage1D = 0; | ||||||||||||||
| 156 | - | |||||||||||||
| 157 | // OpenGL 1.3 | - | ||||||||||||
| 158 | GetCompressedTexImage = 0; | - | ||||||||||||
| 159 | CompressedTexSubImage1D = 0; | - | ||||||||||||
| 160 | CompressedTexSubImage2D = ::glCompressedTexSubImage2D; | - | ||||||||||||
| 161 | CompressedTexImage1D = 0; | - | ||||||||||||
| 162 | CompressedTexImage2D = ::glCompressedTexImage2D; | - | ||||||||||||
| 163 | ActiveTexture = ::glActiveTexture; | - | ||||||||||||
| 164 | - | |||||||||||||
| 165 | // OpenGL 3.0 | - | ||||||||||||
| 166 | GenerateMipmap = ::glGenerateMipmap; | - | ||||||||||||
| 167 | - | |||||||||||||
| 168 | // OpenGL 3.2 | - | ||||||||||||
| 169 | TexImage3DMultisample = 0; | - | ||||||||||||
| 170 | TexImage2DMultisample = 0; | - | ||||||||||||
| 171 | - | |||||||||||||
| 172 | // OpenGL 4.2 | - | ||||||||||||
| 173 | QOpenGLContext *ctx = QOpenGLContext::currentContext(); | - | ||||||||||||
| 174 | if (ctx->format().majorVersion() >= 3) { | - | ||||||||||||
| 175 | // OpenGL ES 3.0+ has immutable storage for 2D and 3D at least. | - | ||||||||||||
| 176 | QOpenGLES3HelperQOpenGLExtraFunctionsPrivate *es3extra = static_cast<QOpenGLExtensions *>(ctxcontext->functionsextraFunctions())->gles3Helperd(); | - | ||||||||||||
| 177 | TexStorage3D = es3extra->f.TexStorage3D; | - | ||||||||||||
| 178 | TexStorage2D = es3extra->f.TexStorage2D; | - | ||||||||||||
| 179 | } else { | - | ||||||||||||
| 180 | TexStorage3D = 0; | - | ||||||||||||
| 181 | TexStorage2D = 0; | - | ||||||||||||
| 182 | } | - | ||||||||||||
| 183 | TexStorage1D = 0; | - | ||||||||||||
| 184 | - | |||||||||||||
| 185 | // OpenGL 4.3 | - | ||||||||||||
| 186 | TexStorage3DMultisample = 0; | - | ||||||||||||
| 187 | TexStorage2DMultisample = 0; | - | ||||||||||||
| 188 | TexBufferRange = 0; | - | ||||||||||||
| 189 | TextureView = 0; | - | ||||||||||||
| 190 | - | |||||||||||||
| #else | ||||||||||||||
| GetIntegerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint *)>(context->getProcAddress(QByteArrayLiteral("glGetIntegerv"))); | ||||||||||||||
| GetBooleanv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLboolean *)>(context->getProcAddress(QByteArrayLiteral("glGetBooleanv"))); | ||||||||||||||
| PixelStorei = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint )>(context->getProcAddress(QByteArrayLiteral("glPixelStorei"))); | ||||||||||||||
| GetTexLevelParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint *)>(context->getProcAddress(QByteArrayLiteral("glGetTexLevelParameteriv"))); | ||||||||||||||
| GetTexLevelParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLfloat *)>(context->getProcAddress(QByteArrayLiteral("glGetTexLevelParameterfv"))); | ||||||||||||||
| GetTexParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLint *)>(context->getProcAddress(QByteArrayLiteral("glGetTexParameteriv"))); | ||||||||||||||
| GetTexParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLfloat *)>(context->getProcAddress(QByteArrayLiteral("glGetTexParameterfv"))); | ||||||||||||||
| GetTexImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLenum , GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glGetTexImage"))); | ||||||||||||||
| TexImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTexImage2D"))); | ||||||||||||||
| TexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTexImage1D"))); | ||||||||||||||
| TexParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLint *)>(context->getProcAddress(QByteArrayLiteral("glTexParameteriv"))); | ||||||||||||||
| TexParameteri = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLint )>(context->getProcAddress(QByteArrayLiteral("glTexParameteri"))); | ||||||||||||||
| TexParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLfloat *)>(context->getProcAddress(QByteArrayLiteral("glTexParameterfv"))); | ||||||||||||||
| TexParameterf = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLfloat )>(context->getProcAddress(QByteArrayLiteral("glTexParameterf"))); | ||||||||||||||
| GenTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress(QByteArrayLiteral("glGenTextures"))); | ||||||||||||||
| DeleteTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *)>(context->getProcAddress(QByteArrayLiteral("glDeleteTextures"))); | ||||||||||||||
| BindTexture = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress(QByteArrayLiteral("glBindTexture"))); | ||||||||||||||
| TexSubImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTexSubImage2D"))); | ||||||||||||||
| TexSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTexSubImage1D")));#endif | ||||||||||||||
| 192 | - | |||||||||||||
| 193 | if (context->isOpenGLES() && context->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"))) { never executed: return ba;
| 0 | ||||||||||||
| 194 | TexImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)>(context->getProcAddress(QByteArrayLiteral("glTexImage3DOES")));)); | - | ||||||||||||
| 195 | TexSubImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*)>(context->getProcAddress(QByteArrayLiteral("glTexSubImage3DOES")));)); | - | ||||||||||||
| 196 | CompressedTexImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexImage3DOES")));)); | - | ||||||||||||
| 197 | CompressedTexSubImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexSubImage3DOES")));)); | - | ||||||||||||
| 198 | } else { never executed: end of block | 0 | ||||||||||||
| 199 | QOpenGLContext *ctx = QOpenGLContext::currentContext(); | - | ||||||||||||
| 200 | if (ctx->isOpenGLES() && ctx->format().majorVersion() >= 3) {
| 0 | ||||||||||||
| 201 | // OpenGL ES 3.0+ has glTexImage3D. | - | ||||||||||||
| 202 | QOpenGLES3HelperQOpenGLExtraFunctionsPrivate *es3extra = static_cast<QOpenGLExtensions *>(ctxcontext->functionsextraFunctions())->gles3Helperd(); | - | ||||||||||||
| 203 | TexImage3D = es3extra->f.TexImage3D; | - | ||||||||||||
| 204 | TexSubImage3D = es3extra->f.TexSubImage3D; | - | ||||||||||||
| 205 | CompressedTexImage3D = es3extra->f.CompressedTexImage3D; | - | ||||||||||||
| 206 | CompressedTexSubImage3D = es3extra->f.CompressedTexSubImage3D; | - | ||||||||||||
| 207 | } else { never executed: end of block | 0 | ||||||||||||
| 208 | // OpenGL 1.2 | - | ||||||||||||
| 209 | TexImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLsizei , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTexImage3D")));)); | - | ||||||||||||
| 210 | TexSubImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glTexSubImage3D")));)); | - | ||||||||||||
| 211 | - | |||||||||||||
| 212 | // OpenGL 1.3 | - | ||||||||||||
| 213 | CompressedTexImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLsizei , GLsizei , GLsizei , GLint , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexImage3D")));)); | - | ||||||||||||
| 214 | CompressedTexSubImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexSubImage3D")));)); | - | ||||||||||||
| 215 | } never executed: end of block | 0 | ||||||||||||
| 216 | } | - | ||||||||||||
| 217 | - | |||||||||||||
| 218 | #ifndef QT_OPENGL_ES_2 | - | ||||||||||||
| 219 | // OpenGL 1.0 and 1.1 | - | ||||||||||||
| 220 | TexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexImage1D")); | - | ||||||||||||
| 221 | TexSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexSubImage1D"));\ | - | ||||||||||||
| 222 | - | |||||||||||||
| 223 | // OpenGL 1.3 | - | ||||||||||||
| 224 | GetCompressedTexImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glGetCompressedTexImage")));)); | - | ||||||||||||
| 225 | CompressedTexSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexSubImage1D")));)); | - | ||||||||||||
| 226 | CompressedTexSubImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexSubImage2D")));)); | - | ||||||||||||
| 227 | CompressedTexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLsizei , GLint , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexImage1D")));)); | - | ||||||||||||
| 228 | CompressedTexImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLsizei , GLsizei , GLint , GLsizei , const GLvoid *)>(context->getProcAddress(QByteArrayLiteral("glCompressedTexImage2D")));)); | - | ||||||||||||
| 229 | ActiveTexture = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum )>(context->getProcAddress(QByteArrayLiteral("glActiveTexture")));)); | - | ||||||||||||
| 230 | - | |||||||||||||
| 231 | // OpenGL 3.0 | - | ||||||||||||
| 232 | GenerateMipmap = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum )>(context->getProcAddress(QByteArrayLiteral("glGenerateMipmap")));)); | - | ||||||||||||
| 233 | - | |||||||||||||
| 234 | // OpenGL 3.2 | - | ||||||||||||
| 235 | TexImage3DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLint , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTexImage3DMultisample")));)); | - | ||||||||||||
| 236 | TexImage2DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLint , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTexImage2DMultisample")));)); | - | ||||||||||||
| 237 | - | |||||||||||||
| 238 | // OpenGL 4.2 | - | ||||||||||||
| 239 | TexStorage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLsizei )>(context->getProcAddress(QByteArrayLiteral("glTexStorage3D")));)); | - | ||||||||||||
| 240 | TexStorage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei , GLsizei )>(context->getProcAddress(QByteArrayLiteral("glTexStorage2D")));)); | - | ||||||||||||
| 241 | TexStorage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei )>(context->getProcAddress(QByteArrayLiteral("glTexStorage1D")));)); | - | ||||||||||||
| 242 | - | |||||||||||||
| 243 | // OpenGL 4.3 | - | ||||||||||||
| 244 | TexStorage3DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTexStorage3DMultisample")));)); | - | ||||||||||||
| 245 | TexStorage2DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLboolean )>(context->getProcAddress(QByteArrayLiteral("glTexStorage2DMultisample")));)); | - | ||||||||||||
| 246 | TexBufferRange = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint , GLintptr , GLsizeiptr )>(context->getProcAddress(QByteArrayLiteral("glTexBufferRange")));)); | - | ||||||||||||
| 247 | TextureView = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint , GLenum , GLuint , GLuint , GLuint , GLuint )>(context->getProcAddress(QByteArrayLiteral("glTextureView")));)); | - | ||||||||||||
| 248 | #endif | - | ||||||||||||
| 249 | } never executed: end of block | 0 | ||||||||||||
| 250 | - | |||||||||||||
| 251 | void QOpenGLTextureHelper::dsa_TextureParameteri(GLuint texture, GLenum target, GLenum bindingTarget, GLenum pname, GLint param) | - | ||||||||||||
| 252 | { | - | ||||||||||||
| 253 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 254 | TextureParameteriEXT(texture, target, pname, param); | - | ||||||||||||
| 255 | } | - | ||||||||||||
| 256 | - | |||||||||||||
| 257 | void QOpenGLTextureHelper::dsa_TextureParameteriv(GLuint texture, GLenum target, GLenum bindingTarget, GLenum pname, const GLint *params) | - | ||||||||||||
| 258 | { | - | ||||||||||||
| 259 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 260 | TextureParameterivEXT(texture, target, pname, params); | - | ||||||||||||
| 261 | } | - | ||||||||||||
| 262 | - | |||||||||||||
| 263 | void QOpenGLTextureHelper::dsa_TextureParameterf(GLuint texture, GLenum target, GLenum bindingTarget, GLenum pname, GLfloat param) | - | ||||||||||||
| 264 | { | - | ||||||||||||
| 265 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 266 | TextureParameterfEXT(texture, target, pname, param); | - | ||||||||||||
| 267 | } | - | ||||||||||||
| 268 | - | |||||||||||||
| 269 | void QOpenGLTextureHelper::dsa_TextureParameterfv(GLuint texture, GLenum target, GLenum bindingTarget, GLenum pname, const GLfloat *params) | - | ||||||||||||
| 270 | { | - | ||||||||||||
| 271 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 272 | TextureParameterfvEXT(texture, target, pname, params); | - | ||||||||||||
| 273 | } | - | ||||||||||||
| 274 | - | |||||||||||||
| 275 | void QOpenGLTextureHelper::dsa_GenerateTextureMipmap(GLuint texture, GLenum target, GLenum bindingTarget) | - | ||||||||||||
| 276 | { | - | ||||||||||||
| 277 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 278 | GenerateTextureMipmapEXT(texture, target); | - | ||||||||||||
| 279 | } | - | ||||||||||||
| 280 | - | |||||||||||||
| 281 | void QOpenGLTextureHelper::dsa_TextureStorage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth) | - | ||||||||||||
| 282 | { | - | ||||||||||||
| 283 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 284 | TextureStorage3DEXT(texture, target, levels, internalFormat, width, height, depth); | - | ||||||||||||
| 285 | } | - | ||||||||||||
| 286 | - | |||||||||||||
| 287 | void QOpenGLTextureHelper::dsa_TextureStorage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height) | - | ||||||||||||
| 288 | { | - | ||||||||||||
| 289 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 290 | TextureStorage2DEXT(texture, target, levels, internalFormat, width, height); | - | ||||||||||||
| 291 | } | - | ||||||||||||
| 292 | - | |||||||||||||
| 293 | void QOpenGLTextureHelper::dsa_TextureStorage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei levels, GLenum internalFormat, GLsizei width) | - | ||||||||||||
| 294 | { | - | ||||||||||||
| 295 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 296 | TextureStorage1DEXT(texture, target, levels, internalFormat, width); | - | ||||||||||||
| 297 | } | - | ||||||||||||
| 298 | - | |||||||||||||
| 299 | void QOpenGLTextureHelper::dsa_TextureStorage3DMultisample(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) | - | ||||||||||||
| 300 | { | - | ||||||||||||
| 301 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 302 | TextureStorage3DMultisampleEXT(texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations); | - | ||||||||||||
| 303 | } | - | ||||||||||||
| 304 | - | |||||||||||||
| 305 | void QOpenGLTextureHelper::dsa_TextureStorage2DMultisample(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) | - | ||||||||||||
| 306 | { | - | ||||||||||||
| 307 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 308 | TextureStorage2DMultisampleEXT(texture, target, samples, internalFormat, width, height, fixedSampleLocations); | - | ||||||||||||
| 309 | } | - | ||||||||||||
| 310 | - | |||||||||||||
| 311 | void QOpenGLTextureHelper::dsa_TextureImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 312 | { | - | ||||||||||||
| 313 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 314 | TextureImage3DEXT(texture, target, level, internalFormat, width, height, depth, border, format, type, pixels); | - | ||||||||||||
| 315 | } | - | ||||||||||||
| 316 | - | |||||||||||||
| 317 | void QOpenGLTextureHelper::dsa_TextureImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 318 | { | - | ||||||||||||
| 319 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 320 | TextureImage2DEXT(texture, target, level, internalFormat, width, height, border, format, type, pixels); | - | ||||||||||||
| 321 | } | - | ||||||||||||
| 322 | - | |||||||||||||
| 323 | void QOpenGLTextureHelper::dsa_TextureImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 324 | { | - | ||||||||||||
| 325 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 326 | TextureImage1DEXT(texture, target, level, internalFormat, width, border, format, type, pixels); | - | ||||||||||||
| 327 | } | - | ||||||||||||
| 328 | - | |||||||||||||
| 329 | void QOpenGLTextureHelper::dsa_TextureSubImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 330 | { | - | ||||||||||||
| 331 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 332 | TextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); | - | ||||||||||||
| 333 | } | - | ||||||||||||
| 334 | - | |||||||||||||
| 335 | void QOpenGLTextureHelper::dsa_TextureSubImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 336 | { | - | ||||||||||||
| 337 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 338 | TextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); | - | ||||||||||||
| 339 | } | - | ||||||||||||
| 340 | - | |||||||||||||
| 341 | void QOpenGLTextureHelper::dsa_TextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 342 | { | - | ||||||||||||
| 343 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 344 | TextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); | - | ||||||||||||
| 345 | } | - | ||||||||||||
| 346 | - | |||||||||||||
| 347 | void QOpenGLTextureHelper::dsa_TextureImage3DMultisample(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) | - | ||||||||||||
| 348 | { | - | ||||||||||||
| 349 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 350 | TextureImage3DMultisampleNV(texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations); | - | ||||||||||||
| 351 | } | - | ||||||||||||
| 352 | - | |||||||||||||
| 353 | void QOpenGLTextureHelper::dsa_TextureImage2DMultisample(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) | - | ||||||||||||
| 354 | { | - | ||||||||||||
| 355 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 356 | TextureImage2DMultisampleNV(texture, target, samples, internalFormat, width, height, fixedSampleLocations); | - | ||||||||||||
| 357 | } | - | ||||||||||||
| 358 | - | |||||||||||||
| 359 | void QOpenGLTextureHelper::dsa_CompressedTextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 360 | { | - | ||||||||||||
| 361 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 362 | CompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, imageSize, bits); | - | ||||||||||||
| 363 | } | - | ||||||||||||
| 364 | - | |||||||||||||
| 365 | void QOpenGLTextureHelper::dsa_CompressedTextureSubImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 366 | { | - | ||||||||||||
| 367 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 368 | CompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, imageSize, bits); | - | ||||||||||||
| 369 | } | - | ||||||||||||
| 370 | - | |||||||||||||
| 371 | void QOpenGLTextureHelper::dsa_CompressedTextureSubImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 372 | { | - | ||||||||||||
| 373 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 374 | CompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits); | - | ||||||||||||
| 375 | } | - | ||||||||||||
| 376 | - | |||||||||||||
| 377 | void QOpenGLTextureHelper::dsa_CompressedTextureImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 378 | { | - | ||||||||||||
| 379 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 380 | CompressedTextureImage1DEXT(texture, target, level, internalFormat, width, border, imageSize, bits); | - | ||||||||||||
| 381 | } | - | ||||||||||||
| 382 | - | |||||||||||||
| 383 | void QOpenGLTextureHelper::dsa_CompressedTextureImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 384 | { | - | ||||||||||||
| 385 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 386 | CompressedTextureImage2DEXT(texture, target, level, internalFormat, width, height, border, imageSize, bits); | - | ||||||||||||
| 387 | } | - | ||||||||||||
| 388 | - | |||||||||||||
| 389 | void QOpenGLTextureHelper::dsa_CompressedTextureImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 390 | { | - | ||||||||||||
| 391 | Q_UNUSED(bindingTarget); | - | ||||||||||||
| 392 | CompressedTextureImage3DEXT(texture, target, level, internalFormat, width, height, depth, border, imageSize, bits); | - | ||||||||||||
| 393 | } | - | ||||||||||||
| 394 | - | |||||||||||||
| 395 | namespace { | - | ||||||||||||
| 396 | - | |||||||||||||
| 397 | class TextureBinder | - | ||||||||||||
| 398 | { | - | ||||||||||||
| 399 | public: | - | ||||||||||||
| 400 | TextureBinder(QOpenGLTextureHelperQOpenGLFunctions *textureFunctionsfunctions, GLuint texture, GLenum target, GLenum bindingTarget) | - | ||||||||||||
| 401 | : m_textureFunctionsm_functions(textureFunctionsfunctions) | - | ||||||||||||
| 402 | { | - | ||||||||||||
| 403 | // For cubemaps we can't use the standard DSA emulation as it is illegal to | - | ||||||||||||
| 404 | // try to bind a texture to one of the cubemap face targets. So we force the | - | ||||||||||||
| 405 | // target and binding target to the cubemap values in this case. | - | ||||||||||||
| 406 | switch (target) { | - | ||||||||||||
| 407 | case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: never executed: case 0x8516: | 0 | ||||||||||||
| 408 | case GL_TEXTURE_CUBE_MAP_POSITIVE_X: never executed: case 0x8515: | 0 | ||||||||||||
| 409 | case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: never executed: case 0x8518: | 0 | ||||||||||||
| 410 | case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: never executed: case 0x8517: | 0 | ||||||||||||
| 411 | case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: never executed: case 0x851A: | 0 | ||||||||||||
| 412 | case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: never executed: case 0x8519: | 0 | ||||||||||||
| 413 | bindingTarget = GL_TEXTURE_BINDING_CUBE_MAP; | - | ||||||||||||
| 414 | m_target = GL_TEXTURE_CUBE_MAP; | - | ||||||||||||
| 415 | break; never executed: break; | 0 | ||||||||||||
| 416 | - | |||||||||||||
| 417 | default: never executed: default: | 0 | ||||||||||||
| 418 | m_target = target; | - | ||||||||||||
| 419 | break; never executed: break; | 0 | ||||||||||||
| 420 | } | - | ||||||||||||
| 421 | - | |||||||||||||
| 422 | m_textureFunctionsm_functions->glGetIntegerv(bindingTarget, &m_oldTexture); | - | ||||||||||||
| 423 | m_textureFunctionsm_functions->glBindTexture(m_target, texture); | - | ||||||||||||
| 424 | } never executed: end of block | 0 | ||||||||||||
| 425 | - | |||||||||||||
| 426 | ~TextureBinder() | - | ||||||||||||
| 427 | { | - | ||||||||||||
| 428 | m_textureFunctionsm_functions->glBindTexture(m_target, m_oldTexture); | - | ||||||||||||
| 429 | } never executed: end of block | 0 | ||||||||||||
| 430 | - | |||||||||||||
| 431 | private: | - | ||||||||||||
| 432 | QOpenGLTextureHelperQOpenGLFunctions *m_textureFunctionsm_functions; | - | ||||||||||||
| 433 | GLenum m_target; | - | ||||||||||||
| 434 | GLint m_oldTexture; | - | ||||||||||||
| 435 | }; | - | ||||||||||||
| 436 | - | |||||||||||||
| 437 | } // namespace | - | ||||||||||||
| 438 | - | |||||||||||||
| 439 | void QOpenGLTextureHelper::qt_TextureParameteri(GLuint texture, GLenum target, GLenum bindingTarget, GLenum pname, GLint param) | - | ||||||||||||
| 440 | { | - | ||||||||||||
| 441 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 442 | functions->glTexParameteri(target, pname, param); | - | ||||||||||||
| 443 | } never executed: end of block | 0 | ||||||||||||
| 444 | - | |||||||||||||
| 445 | void QOpenGLTextureHelper::qt_TextureParameteriv(GLuint texture, GLenum target, GLenum bindingTarget, GLenum pname, const GLint *params) | - | ||||||||||||
| 446 | { | - | ||||||||||||
| 447 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 448 | functions->glTexParameteriv(target, pname, params); | - | ||||||||||||
| 449 | } never executed: end of block | 0 | ||||||||||||
| 450 | - | |||||||||||||
| 451 | void QOpenGLTextureHelper::qt_TextureParameterf(GLuint texture, GLenum target, GLenum bindingTarget, GLenum pname, GLfloat param) | - | ||||||||||||
| 452 | { | - | ||||||||||||
| 453 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 454 | functions->glTexParameterf(target, pname, param); | - | ||||||||||||
| 455 | } never executed: end of block | 0 | ||||||||||||
| 456 | - | |||||||||||||
| 457 | void QOpenGLTextureHelper::qt_TextureParameterfv(GLuint texture, GLenum target, GLenum bindingTarget, GLenum pname, const GLfloat *params) | - | ||||||||||||
| 458 | { | - | ||||||||||||
| 459 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 460 | functions->glTexParameterfv(target, pname, params); | - | ||||||||||||
| 461 | } never executed: end of block | 0 | ||||||||||||
| 462 | - | |||||||||||||
| 463 | void QOpenGLTextureHelper::qt_GenerateTextureMipmap(GLuint texture, GLenum target, GLenum bindingTarget) | - | ||||||||||||
| 464 | { | - | ||||||||||||
| 465 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 466 | functions->glGenerateMipmap(target); | - | ||||||||||||
| 467 | } never executed: end of block | 0 | ||||||||||||
| 468 | - | |||||||||||||
| 469 | void QOpenGLTextureHelper::qt_TextureStorage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth) | - | ||||||||||||
| 470 | { | - | ||||||||||||
| 471 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 472 | glTexStorage3D(target, levels, internalFormat, width, height, depth); | - | ||||||||||||
| 473 | } never executed: end of block | 0 | ||||||||||||
| 474 | - | |||||||||||||
| 475 | void QOpenGLTextureHelper::qt_TextureStorage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height) | - | ||||||||||||
| 476 | { | - | ||||||||||||
| 477 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 478 | glTexStorage2D(target, levels, internalFormat, width, height); | - | ||||||||||||
| 479 | } never executed: end of block | 0 | ||||||||||||
| 480 | - | |||||||||||||
| 481 | void QOpenGLTextureHelper::qt_TextureStorage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei levels, GLenum internalFormat, GLsizei width) | - | ||||||||||||
| 482 | { | - | ||||||||||||
| 483 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 484 | glTexStorage1D(target, levels, internalFormat, width); | - | ||||||||||||
| 485 | } never executed: end of block | 0 | ||||||||||||
| 486 | - | |||||||||||||
| 487 | void QOpenGLTextureHelper::qt_TextureStorage3DMultisample(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) | - | ||||||||||||
| 488 | { | - | ||||||||||||
| 489 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 490 | glTexStorage3DMultisample(target, samples, internalFormat, width, height, depth, fixedSampleLocations); | - | ||||||||||||
| 491 | } never executed: end of block | 0 | ||||||||||||
| 492 | - | |||||||||||||
| 493 | void QOpenGLTextureHelper::qt_TextureStorage2DMultisample(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) | - | ||||||||||||
| 494 | { | - | ||||||||||||
| 495 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 496 | glTexStorage2DMultisample(target, samples, internalFormat, width, height, fixedSampleLocations); | - | ||||||||||||
| 497 | } never executed: end of block | 0 | ||||||||||||
| 498 | - | |||||||||||||
| 499 | void QOpenGLTextureHelper::qt_TextureImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 500 | { | - | ||||||||||||
| 501 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 502 | glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); | - | ||||||||||||
| 503 | } never executed: end of block | 0 | ||||||||||||
| 504 | - | |||||||||||||
| 505 | void QOpenGLTextureHelper::qt_TextureImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 506 | { | - | ||||||||||||
| 507 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 508 | functions->glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels); | - | ||||||||||||
| 509 | } never executed: end of block | 0 | ||||||||||||
| 510 | - | |||||||||||||
| 511 | void QOpenGLTextureHelper::qt_TextureImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 512 | { | - | ||||||||||||
| 513 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 514 | glTexImage1D(target, level, internalFormat, width, border, format, type, pixels); | - | ||||||||||||
| 515 | } never executed: end of block | 0 | ||||||||||||
| 516 | - | |||||||||||||
| 517 | void QOpenGLTextureHelper::qt_TextureSubImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 518 | { | - | ||||||||||||
| 519 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 520 | glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); | - | ||||||||||||
| 521 | } never executed: end of block | 0 | ||||||||||||
| 522 | - | |||||||||||||
| 523 | void QOpenGLTextureHelper::qt_TextureSubImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 524 | { | - | ||||||||||||
| 525 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 526 | functions->glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); | - | ||||||||||||
| 527 | } never executed: end of block | 0 | ||||||||||||
| 528 | - | |||||||||||||
| 529 | void QOpenGLTextureHelper::qt_TextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) | - | ||||||||||||
| 530 | { | - | ||||||||||||
| 531 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 532 | glTexSubImage1D(target, level, xoffset, width, format, type, pixels); | - | ||||||||||||
| 533 | } never executed: end of block | 0 | ||||||||||||
| 534 | - | |||||||||||||
| 535 | void QOpenGLTextureHelper::qt_TextureImage3DMultisample(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) | - | ||||||||||||
| 536 | { | - | ||||||||||||
| 537 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 538 | glTexImage3DMultisample(target, samples, internalFormat, width, height, depth, fixedSampleLocations); | - | ||||||||||||
| 539 | } never executed: end of block | 0 | ||||||||||||
| 540 | - | |||||||||||||
| 541 | void QOpenGLTextureHelper::qt_TextureImage2DMultisample(GLuint texture, GLenum target, GLenum bindingTarget, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) | - | ||||||||||||
| 542 | { | - | ||||||||||||
| 543 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 544 | glTexImage2DMultisample(target, samples, internalFormat, width, height, fixedSampleLocations); | - | ||||||||||||
| 545 | } never executed: end of block | 0 | ||||||||||||
| 546 | - | |||||||||||||
| 547 | void QOpenGLTextureHelper::qt_CompressedTextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 548 | { | - | ||||||||||||
| 549 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 550 | glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, bits); | - | ||||||||||||
| 551 | } never executed: end of block | 0 | ||||||||||||
| 552 | - | |||||||||||||
| 553 | void QOpenGLTextureHelper::qt_CompressedTextureSubImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 554 | { | - | ||||||||||||
| 555 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 556 | glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, bits); | - | ||||||||||||
| 557 | } never executed: end of block | 0 | ||||||||||||
| 558 | - | |||||||||||||
| 559 | void QOpenGLTextureHelper::qt_CompressedTextureSubImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 560 | { | - | ||||||||||||
| 561 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 562 | glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits); | - | ||||||||||||
| 563 | } never executed: end of block | 0 | ||||||||||||
| 564 | - | |||||||||||||
| 565 | void QOpenGLTextureHelper::qt_CompressedTextureImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 566 | { | - | ||||||||||||
| 567 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 568 | glCompressedTexImage1D(target, level, internalFormat, width, border, imageSize, bits); | - | ||||||||||||
| 569 | } never executed: end of block | 0 | ||||||||||||
| 570 | - | |||||||||||||
| 571 | void QOpenGLTextureHelper::qt_CompressedTextureImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 572 | { | - | ||||||||||||
| 573 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 574 | glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, bits); | - | ||||||||||||
| 575 | } never executed: end of block | 0 | ||||||||||||
| 576 | - | |||||||||||||
| 577 | void QOpenGLTextureHelper::qt_CompressedTextureImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits) | - | ||||||||||||
| 578 | { | - | ||||||||||||
| 579 | TextureBinder binder(thisfunctions, texture, target, bindingTarget); | - | ||||||||||||
| 580 | glCompressedTexImage3D(target, level, internalFormat, width, height, depth, border, imageSize, bits); | - | ||||||||||||
| 581 | } never executed: end of block | 0 | ||||||||||||
| 582 | - | |||||||||||||
| 583 | QT_END_NAMESPACE | - | ||||||||||||
| Source code | Switch to Preprocessed file |