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