qglextensions.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4static QFunctionPointer qt_gl_getProcAddress_search -
5 (QGLContext *ctx, const char *name1, const char *name2, -
6 const char *name3, const char *name4) -
7{ -
8 QFunctionPointer addr = ctx->getProcAddress(QLatin1String(name1)); -
9 if (addr)
never evaluated: addr
0
10 return addr;
never executed: return addr;
0
11 -
12 addr = ctx->getProcAddress(QLatin1String(name2)); -
13 if (addr)
never evaluated: addr
0
14 return addr;
never executed: return addr;
0
15 -
16 addr = ctx->getProcAddress(QLatin1String(name3)); -
17 if (addr)
never evaluated: addr
0
18 return addr;
never executed: return addr;
0
19 -
20 if (name4)
never evaluated: name4
0
21 return ctx->getProcAddress(QLatin1String(name4));
never executed: return ctx->getProcAddress(QLatin1String(name4));
0
22 -
23 return 0;
never executed: return 0;
0
24} -
25bool qt_resolve_framebufferobject_extensions(QGLContext *ctx) -
26{ -
27 -
28 -
29 -
30 -
31 -
32 -
33 if (QGLContextPrivate::extensionFuncs(ctx).qt_glIsRenderbuffer != 0)
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glIsRenderbuffer != 0
0
34 return true;
never executed: return true;
0
35 -
36 -
37 if (ctx == 0) {
never evaluated: ctx == 0
0
38 QMessageLogger("qglextensions.cpp", 104, __PRETTY_FUNCTION__).warning("QGLFramebufferObject: Unable to resolve framebuffer object extensions -" -
39 " make sure there is a current context when creating the framebuffer object."); -
40 return false;
never executed: return false;
0
41 } -
42 -
43 -
44 QGLContextPrivate::extensionFuncs(ctx).qt_glBlitFramebufferEXT = (_glBlitFramebufferEXT) qt_gl_getProcAddress_search((ctx), "glBlitFramebuffer" "EXT", "glBlitFramebuffer", "glBlitFramebuffer" "ARB", 0); -
45 QGLContextPrivate::extensionFuncs(ctx).qt_glRenderbufferStorageMultisampleEXT = -
46 (_glRenderbufferStorageMultisampleEXT) qt_gl_getProcAddress_search((ctx), "glRenderbufferStorageMultisample" "EXT", "glRenderbufferStorageMultisample", "glRenderbufferStorageMultisample" "ARB", 0); -
47 -
48 -
49 QGLContextPrivate::extensionFuncs(ctx).qt_glIsRenderbuffer = (_glIsRenderbuffer) qt_gl_getProcAddress_search((ctx), "glIsRenderbuffer" "EXT", "glIsRenderbuffer", "glIsRenderbuffer" "ARB", 0); -
50 if (!QGLContextPrivate::extensionFuncs(ctx).qt_glIsRenderbuffer)
never evaluated: !QGLContextPrivate::extensionFuncs(ctx).qt_glIsRenderbuffer
0
51 return false;
never executed: return false;
0
52 QGLContextPrivate::extensionFuncs(ctx).qt_glBindRenderbuffer = (_glBindRenderbuffer) qt_gl_getProcAddress_search((ctx), "glBindRenderbuffer" "EXT", "glBindRenderbuffer", "glBindRenderbuffer" "ARB", 0); -
53 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteRenderbuffers = (_glDeleteRenderbuffers) qt_gl_getProcAddress_search((ctx), "glDeleteRenderbuffers" "EXT", "glDeleteRenderbuffers", "glDeleteRenderbuffers" "ARB", 0); -
54 QGLContextPrivate::extensionFuncs(ctx).qt_glGenRenderbuffers = (_glGenRenderbuffers) qt_gl_getProcAddress_search((ctx), "glGenRenderbuffers" "EXT", "glGenRenderbuffers", "glGenRenderbuffers" "ARB", 0); -
55 QGLContextPrivate::extensionFuncs(ctx).qt_glRenderbufferStorage = (_glRenderbufferStorage) qt_gl_getProcAddress_search((ctx), "glRenderbufferStorage" "EXT", "glRenderbufferStorage", "glRenderbufferStorage" "ARB", 0); -
56 QGLContextPrivate::extensionFuncs(ctx).qt_glGetRenderbufferParameteriv = -
57 (_glGetRenderbufferParameteriv) qt_gl_getProcAddress_search((ctx), "glGetRenderbufferParameteriv" "EXT", "glGetRenderbufferParameteriv", "glGetRenderbufferParameteriv" "ARB", 0); -
58 QGLContextPrivate::extensionFuncs(ctx).qt_glIsFramebuffer = (_glIsFramebuffer) qt_gl_getProcAddress_search((ctx), "glIsFramebuffer" "EXT", "glIsFramebuffer", "glIsFramebuffer" "ARB", 0); -
59 QGLContextPrivate::extensionFuncs(ctx).qt_glBindFramebuffer = (_glBindFramebuffer) qt_gl_getProcAddress_search((ctx), "glBindFramebuffer" "EXT", "glBindFramebuffer", "glBindFramebuffer" "ARB", 0); -
60 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteFramebuffers = (_glDeleteFramebuffers) qt_gl_getProcAddress_search((ctx), "glDeleteFramebuffers" "EXT", "glDeleteFramebuffers", "glDeleteFramebuffers" "ARB", 0); -
61 QGLContextPrivate::extensionFuncs(ctx).qt_glGenFramebuffers = (_glGenFramebuffers) qt_gl_getProcAddress_search((ctx), "glGenFramebuffers" "EXT", "glGenFramebuffers", "glGenFramebuffers" "ARB", 0); -
62 QGLContextPrivate::extensionFuncs(ctx).qt_glCheckFramebufferStatus = (_glCheckFramebufferStatus) qt_gl_getProcAddress_search((ctx), "glCheckFramebufferStatus" "EXT", "glCheckFramebufferStatus", "glCheckFramebufferStatus" "ARB", 0); -
63 QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferTexture2D = (_glFramebufferTexture2D) qt_gl_getProcAddress_search((ctx), "glFramebufferTexture2D" "EXT", "glFramebufferTexture2D", "glFramebufferTexture2D" "ARB", 0); -
64 QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferRenderbuffer = (_glFramebufferRenderbuffer) qt_gl_getProcAddress_search((ctx), "glFramebufferRenderbuffer" "EXT", "glFramebufferRenderbuffer", "glFramebufferRenderbuffer" "ARB", 0); -
65 QGLContextPrivate::extensionFuncs(ctx).qt_glGetFramebufferAttachmentParameteriv = -
66 (_glGetFramebufferAttachmentParameteriv) qt_gl_getProcAddress_search((ctx), "glGetFramebufferAttachmentParameteriv" "EXT", "glGetFramebufferAttachmentParameteriv", "glGetFramebufferAttachmentParameteriv" "ARB", 0); -
67 QGLContextPrivate::extensionFuncs(ctx).qt_glGenerateMipmap = (_glGenerateMipmap) qt_gl_getProcAddress_search((ctx), "glGenerateMipmap" "EXT", "glGenerateMipmap", "glGenerateMipmap" "ARB", 0); -
68 -
69 return QGLContextPrivate::extensionFuncs(ctx).qt_glIsRenderbuffer != 0;
never executed: return QGLContextPrivate::extensionFuncs(ctx).qt_glIsRenderbuffer != 0;
0
70 -
71 -
72 -
73} -
74 -
75 -
76bool qt_resolve_version_1_3_functions(QGLContext *ctx) -
77{ -
78 if (QGLContextPrivate::extensionFuncs(ctx).qt_glMultiTexCoord4f != 0)
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glMultiTexCoord4f != 0
0
79 return true;
never executed: return true;
0
80 -
81 QGLContext cx(QGLFormat::defaultFormat()); -
82 QGLContextPrivate::extensionFuncs(ctx).qt_glMultiTexCoord4f = (_glMultiTexCoord4f) ctx->getProcAddress(QLatin1String("glMultiTexCoord4f")); -
83 -
84 QGLContextPrivate::extensionFuncs(ctx).qt_glActiveTexture = (_glActiveTexture) ctx->getProcAddress(QLatin1String("glActiveTexture")); -
85 return QGLContextPrivate::extensionFuncs(ctx).qt_glMultiTexCoord4f && QGLContextPrivate::extensionFuncs(ctx).qt_glActiveTexture;
never executed: return QGLContextPrivate::extensionFuncs(ctx).qt_glMultiTexCoord4f && QGLContextPrivate::extensionFuncs(ctx).qt_glActiveTexture;
0
86} -
87 -
88 -
89 -
90bool qt_resolve_stencil_face_extension(QGLContext *ctx) -
91{ -
92 if (QGLContextPrivate::extensionFuncs(ctx).qt_glActiveStencilFaceEXT != 0)
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glActiveStencilFaceEXT != 0
0
93 return true;
never executed: return true;
0
94 -
95 QGLContext cx(QGLFormat::defaultFormat()); -
96 QGLContextPrivate::extensionFuncs(ctx).qt_glActiveStencilFaceEXT = (_glActiveStencilFaceEXT) ctx->getProcAddress(QLatin1String("glActiveStencilFaceEXT")); -
97 -
98 return QGLContextPrivate::extensionFuncs(ctx).qt_glActiveStencilFaceEXT;
never executed: return QGLContextPrivate::extensionFuncs(ctx).qt_glActiveStencilFaceEXT;
0
99} -
100 -
101 -
102 -
103 -
104bool qt_resolve_frag_program_extensions(QGLContext *ctx) -
105{ -
106 if (QGLContextPrivate::extensionFuncs(ctx).qt_glProgramStringARB != 0)
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glProgramStringARB != 0
0
107 return true;
never executed: return true;
0
108 -
109 -
110 QGLContextPrivate::extensionFuncs(ctx).qt_glProgramStringARB = (_glProgramStringARB) ctx->getProcAddress(QLatin1String("glProgramStringARB")); -
111 QGLContextPrivate::extensionFuncs(ctx).qt_glBindProgramARB = (_glBindProgramARB) ctx->getProcAddress(QLatin1String("glBindProgramARB")); -
112 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgramsARB = (_glDeleteProgramsARB) ctx->getProcAddress(QLatin1String("glDeleteProgramsARB")); -
113 QGLContextPrivate::extensionFuncs(ctx).qt_glGenProgramsARB = (_glGenProgramsARB) ctx->getProcAddress(QLatin1String("glGenProgramsARB")); -
114 QGLContextPrivate::extensionFuncs(ctx).qt_glProgramLocalParameter4fvARB = (_glProgramLocalParameter4fvARB) ctx->getProcAddress(QLatin1String("glProgramLocalParameter4fvARB")); -
115 -
116 return QGLContextPrivate::extensionFuncs(ctx).qt_glProgramStringARB 0
117 && QGLContextPrivate::extensionFuncs(ctx).qt_glBindProgramARB 0
118 && QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgramsARB 0
119 && QGLContextPrivate::extensionFuncs(ctx).qt_glGenProgramsARB 0
120 && QGLContextPrivate::extensionFuncs(ctx).qt_glProgramLocalParameter4fvARB;
never executed: return QGLContextPrivate::extensionFuncs(ctx).qt_glProgramStringARB && QGLContextPrivate::extensionFuncs(ctx).qt_glBindProgramARB && QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgramsARB && QGLContextPrivate::extensionFuncs(ctx).qt_glGenProgramsARB && QGLContextPrivate::extensionFuncs(ctx).qt_glProgramLocalParameter4fvARB;
0
121} -
122 -
123 -
124 -
125bool qt_resolve_buffer_extensions(QGLContext *ctx) -
126{ -
127 -
128 if (QGLContextPrivate::extensionFuncs(ctx).qt_glBindBuffer && QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteBuffers && QGLContextPrivate::extensionFuncs(ctx).qt_glGenBuffers && QGLContextPrivate::extensionFuncs(ctx).qt_glBufferData
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glBindBuffer
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteBuffers
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glGenBuffers
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glBufferData
0
129 && QGLContextPrivate::extensionFuncs(ctx).qt_glBufferSubData && QGLContextPrivate::extensionFuncs(ctx).qt_glGetBufferParameteriv)
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glBufferSubData
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glGetBufferParameteriv
0
130 return true;
never executed: return true;
0
131 -
132 -
133 -
134 QGLContextPrivate::extensionFuncs(ctx).qt_glBindBuffer = (_glBindBuffer) qt_gl_getProcAddress_search((ctx), "glBindBuffer" "ARB", "glBindBuffer", "glBindBuffer" "EXT", 0); -
135 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteBuffers = (_glDeleteBuffers) qt_gl_getProcAddress_search((ctx), "glDeleteBuffers" "ARB", "glDeleteBuffers", "glDeleteBuffers" "EXT", 0); -
136 QGLContextPrivate::extensionFuncs(ctx).qt_glGenBuffers = (_glGenBuffers) qt_gl_getProcAddress_search((ctx), "glGenBuffers" "ARB", "glGenBuffers", "glGenBuffers" "EXT", 0); -
137 QGLContextPrivate::extensionFuncs(ctx).qt_glBufferData = (_glBufferData) qt_gl_getProcAddress_search((ctx), "glBufferData" "ARB", "glBufferData", "glBufferData" "EXT", 0); -
138 QGLContextPrivate::extensionFuncs(ctx).qt_glBufferSubData = (_glBufferSubData) qt_gl_getProcAddress_search((ctx), "glBufferSubData" "ARB", "glBufferSubData", "glBufferSubData" "EXT", 0); -
139 QGLContextPrivate::extensionFuncs(ctx).qt_glGetBufferSubData = (_glGetBufferSubData) qt_gl_getProcAddress_search((ctx), "glGetBufferSubData" "ARB", "glGetBufferSubData", "glGetBufferSubData" "EXT", 0); -
140 QGLContextPrivate::extensionFuncs(ctx).qt_glGetBufferParameteriv = (_glGetBufferParameteriv) qt_gl_getProcAddress_search((ctx), "glGetBufferParameteriv" "ARB", "glGetBufferParameteriv", "glGetBufferParameteriv" "EXT", 0); -
141 -
142 QGLContextPrivate::extensionFuncs(ctx).qt_glMapBufferARB = (_glMapBufferARB) qt_gl_getProcAddress_search((ctx), "glMapBuffer" "ARB", "glMapBuffer", "glMapBuffer" "EXT", 0); -
143 QGLContextPrivate::extensionFuncs(ctx).qt_glUnmapBufferARB = (_glUnmapBufferARB) qt_gl_getProcAddress_search((ctx), "glUnmapBuffer" "ARB", "glUnmapBuffer", "glUnmapBuffer" "EXT", 0); -
144 -
145 -
146 return QGLContextPrivate::extensionFuncs(ctx).qt_glBindBuffer 0
147 && QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteBuffers 0
148 && QGLContextPrivate::extensionFuncs(ctx).qt_glGenBuffers 0
149 && QGLContextPrivate::extensionFuncs(ctx).qt_glBufferData 0
150 && QGLContextPrivate::extensionFuncs(ctx).qt_glBufferSubData 0
151 && QGLContextPrivate::extensionFuncs(ctx).qt_glGetBufferParameteriv;
never executed: return QGLContextPrivate::extensionFuncs(ctx).qt_glBindBuffer && QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteBuffers && QGLContextPrivate::extensionFuncs(ctx).qt_glGenBuffers && QGLContextPrivate::extensionFuncs(ctx).qt_glBufferData && QGLContextPrivate::extensionFuncs(ctx).qt_glBufferSubData && QGLContextPrivate::extensionFuncs(ctx).qt_glGetBufferParameteriv;
0
152 -
153 -
154 -
155 -
156} -
157 -
158bool qt_resolve_glsl_extensions(QGLContext *ctx) -
159{ -
160 if (QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader)
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader
0
161 return true;
never executed: return true;
0
162 -
163 -
164 QGLContextPrivate::extensionFuncs(ctx).qt_glProgramParameteriEXT = (_glProgramParameteriEXT) ctx->getProcAddress(QLatin1String("glProgramParameteriEXT")); -
165 QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferTextureEXT = (_glFramebufferTextureEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureEXT")); -
166 QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferTextureLayerEXT = (_glFramebufferTextureLayerEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureLayerEXT")); -
167 QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferTextureFaceEXT = (_glFramebufferTextureFaceEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureFaceEXT")); -
168 -
169 -
170 if (!(QGLExtensions::glExtensions() & QGLExtensions::FragmentShader))
never evaluated: !(QGLExtensions::glExtensions() & QGLExtensions::FragmentShader)
0
171 return false;
never executed: return false;
0
172 -
173 QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader = (_glCreateShader) ctx->getProcAddress(QLatin1String("glCreateShader")); -
174 if (QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader) {
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader
0
175 QGLContextPrivate::extensionFuncs(ctx).qt_glShaderSource = (_glShaderSource) ctx->getProcAddress(QLatin1String("glShaderSource")); -
176 QGLContextPrivate::extensionFuncs(ctx).qt_glShaderBinary = (_glShaderBinary) ctx->getProcAddress(QLatin1String("glShaderBinary")); -
177 QGLContextPrivate::extensionFuncs(ctx).qt_glCompileShader = (_glCompileShader) ctx->getProcAddress(QLatin1String("glCompileShader")); -
178 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteShader = (_glDeleteShader) ctx->getProcAddress(QLatin1String("glDeleteShader")); -
179 QGLContextPrivate::extensionFuncs(ctx).qt_glIsShader = (_glIsShader) ctx->getProcAddress(QLatin1String("glIsShader")); -
180 -
181 QGLContextPrivate::extensionFuncs(ctx).qt_glCreateProgram = (_glCreateProgram) ctx->getProcAddress(QLatin1String("glCreateProgram")); -
182 QGLContextPrivate::extensionFuncs(ctx).qt_glAttachShader = (_glAttachShader) ctx->getProcAddress(QLatin1String("glAttachShader")); -
183 QGLContextPrivate::extensionFuncs(ctx).qt_glDetachShader = (_glDetachShader) ctx->getProcAddress(QLatin1String("glDetachShader")); -
184 QGLContextPrivate::extensionFuncs(ctx).qt_glLinkProgram = (_glLinkProgram) ctx->getProcAddress(QLatin1String("glLinkProgram")); -
185 QGLContextPrivate::extensionFuncs(ctx).qt_glUseProgram = (_glUseProgram) ctx->getProcAddress(QLatin1String("glUseProgram")); -
186 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgram = (_glDeleteProgram) ctx->getProcAddress(QLatin1String("glDeleteProgram")); -
187 QGLContextPrivate::extensionFuncs(ctx).qt_glIsProgram = (_glIsProgram) ctx->getProcAddress(QLatin1String("glIsProgram")); -
188 -
189 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderInfoLog = (_glGetShaderInfoLog) ctx->getProcAddress(QLatin1String("glGetShaderInfoLog")); -
190 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderiv = (_glGetShaderiv) ctx->getProcAddress(QLatin1String("glGetShaderiv")); -
191 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderSource = (_glGetShaderSource) ctx->getProcAddress(QLatin1String("glGetShaderSource")); -
192 QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramiv = (_glGetProgramiv) ctx->getProcAddress(QLatin1String("glGetProgramiv")); -
193 QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramInfoLog = (_glGetProgramInfoLog) ctx->getProcAddress(QLatin1String("glGetProgramInfoLog")); -
194 -
195 QGLContextPrivate::extensionFuncs(ctx).qt_glGetUniformLocation = (_glGetUniformLocation) ctx->getProcAddress(QLatin1String("glGetUniformLocation")); -
196 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform4fv = (_glUniform4fv) ctx->getProcAddress(QLatin1String("glUniform4fv")); -
197 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform3fv = (_glUniform3fv) ctx->getProcAddress(QLatin1String("glUniform3fv")); -
198 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform2fv = (_glUniform2fv) ctx->getProcAddress(QLatin1String("glUniform2fv")); -
199 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1fv = (_glUniform1fv) ctx->getProcAddress(QLatin1String("glUniform1fv")); -
200 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1i = (_glUniform1i) ctx->getProcAddress(QLatin1String("glUniform1i")); -
201 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1iv = (_glUniform1iv) ctx->getProcAddress(QLatin1String("glUniform1iv")); -
202 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2fv = (_glUniformMatrix2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2fv")); -
203 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3fv = (_glUniformMatrix3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3fv")); -
204 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4fv = (_glUniformMatrix4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4fv")); -
205 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2x3fv = (_glUniformMatrix2x3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2x3fv")); -
206 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2x4fv = (_glUniformMatrix2x4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2x4fv")); -
207 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3x2fv = (_glUniformMatrix3x2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3x2fv")); -
208 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3x4fv = (_glUniformMatrix3x4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3x4fv")); -
209 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4x2fv = (_glUniformMatrix4x2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4x2fv")); -
210 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4x3fv = (_glUniformMatrix4x3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4x3fv")); -
211 -
212 QGLContextPrivate::extensionFuncs(ctx).qt_glBindAttribLocation = (_glBindAttribLocation) ctx->getProcAddress(QLatin1String("glBindAttribLocation")); -
213 QGLContextPrivate::extensionFuncs(ctx).qt_glGetAttribLocation = (_glGetAttribLocation) ctx->getProcAddress(QLatin1String("glGetAttribLocation")); -
214 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib1fv = (_glVertexAttrib1fv) ctx->getProcAddress(QLatin1String("glVertexAttrib1fv")); -
215 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib2fv = (_glVertexAttrib2fv) ctx->getProcAddress(QLatin1String("glVertexAttrib2fv")); -
216 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib3fv = (_glVertexAttrib3fv) ctx->getProcAddress(QLatin1String("glVertexAttrib3fv")); -
217 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib4fv = (_glVertexAttrib4fv) ctx->getProcAddress(QLatin1String("glVertexAttrib4fv")); -
218 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttribPointer = (_glVertexAttribPointer) ctx->getProcAddress(QLatin1String("glVertexAttribPointer")); -
219 QGLContextPrivate::extensionFuncs(ctx).qt_glDisableVertexAttribArray = (_glDisableVertexAttribArray) ctx->getProcAddress(QLatin1String("glDisableVertexAttribArray")); -
220 QGLContextPrivate::extensionFuncs(ctx).qt_glEnableVertexAttribArray = (_glEnableVertexAttribArray) ctx->getProcAddress(QLatin1String("glEnableVertexAttribArray")); -
221 -
222 } else {
never executed: }
0
223 -
224 -
225 QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader = (_glCreateShader) ctx->getProcAddress(QLatin1String("glCreateShaderObjectARB")); -
226 QGLContextPrivate::extensionFuncs(ctx).qt_glShaderSource = (_glShaderSource) ctx->getProcAddress(QLatin1String("glShaderSourceARB")); -
227 QGLContextPrivate::extensionFuncs(ctx).qt_glShaderBinary = (_glShaderBinary) ctx->getProcAddress(QLatin1String("glShaderBinaryARB")); -
228 QGLContextPrivate::extensionFuncs(ctx).qt_glCompileShader = (_glCompileShader) ctx->getProcAddress(QLatin1String("glCompileShaderARB")); -
229 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteShader = (_glDeleteShader) ctx->getProcAddress(QLatin1String("glDeleteObjectARB")); -
230 QGLContextPrivate::extensionFuncs(ctx).qt_glIsShader = 0; -
231 -
232 QGLContextPrivate::extensionFuncs(ctx).qt_glCreateProgram = (_glCreateProgram) ctx->getProcAddress(QLatin1String("glCreateProgramObjectARB")); -
233 QGLContextPrivate::extensionFuncs(ctx).qt_glAttachShader = (_glAttachShader) ctx->getProcAddress(QLatin1String("glAttachObjectARB")); -
234 QGLContextPrivate::extensionFuncs(ctx).qt_glDetachShader = (_glDetachShader) ctx->getProcAddress(QLatin1String("glDetachObjectARB")); -
235 QGLContextPrivate::extensionFuncs(ctx).qt_glLinkProgram = (_glLinkProgram) ctx->getProcAddress(QLatin1String("glLinkProgramARB")); -
236 QGLContextPrivate::extensionFuncs(ctx).qt_glUseProgram = (_glUseProgram) ctx->getProcAddress(QLatin1String("glUseProgramObjectARB")); -
237 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgram = (_glDeleteProgram) ctx->getProcAddress(QLatin1String("glDeleteObjectARB")); -
238 QGLContextPrivate::extensionFuncs(ctx).qt_glIsProgram = 0; -
239 -
240 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderInfoLog = (_glGetShaderInfoLog) ctx->getProcAddress(QLatin1String("glGetInfoLogARB")); -
241 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderiv = (_glGetShaderiv) ctx->getProcAddress(QLatin1String("glGetObjectParameterivARB")); -
242 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderSource = (_glGetShaderSource) ctx->getProcAddress(QLatin1String("glGetShaderSourceARB")); -
243 QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramiv = (_glGetProgramiv) ctx->getProcAddress(QLatin1String("glGetObjectParameterivARB")); -
244 QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramInfoLog = (_glGetProgramInfoLog) ctx->getProcAddress(QLatin1String("glGetInfoLogARB")); -
245 -
246 QGLContextPrivate::extensionFuncs(ctx).qt_glGetUniformLocation = (_glGetUniformLocation) ctx->getProcAddress(QLatin1String("glGetUniformLocationARB")); -
247 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform4fv = (_glUniform4fv) ctx->getProcAddress(QLatin1String("glUniform4fvARB")); -
248 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform3fv = (_glUniform3fv) ctx->getProcAddress(QLatin1String("glUniform3fvARB")); -
249 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform2fv = (_glUniform2fv) ctx->getProcAddress(QLatin1String("glUniform2fvARB")); -
250 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1fv = (_glUniform1fv) ctx->getProcAddress(QLatin1String("glUniform1fvARB")); -
251 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1i = (_glUniform1i) ctx->getProcAddress(QLatin1String("glUniform1iARB")); -
252 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1iv = (_glUniform1iv) ctx->getProcAddress(QLatin1String("glUniform1ivARB")); -
253 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2fv = (_glUniformMatrix2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2fvARB")); -
254 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3fv = (_glUniformMatrix3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3fvARB")); -
255 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4fv = (_glUniformMatrix4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4fvARB")); -
256 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2x3fv = (_glUniformMatrix2x3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2x3fvARB")); -
257 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2x4fv = (_glUniformMatrix2x4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2x4fvARB")); -
258 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3x2fv = (_glUniformMatrix3x2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3x2fvARB")); -
259 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3x4fv = (_glUniformMatrix3x4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3x4fvARB")); -
260 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4x2fv = (_glUniformMatrix4x2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4x2fvARB")); -
261 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4x3fv = (_glUniformMatrix4x3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4x3fvARB")); -
262 -
263 QGLContextPrivate::extensionFuncs(ctx).qt_glBindAttribLocation = (_glBindAttribLocation) ctx->getProcAddress(QLatin1String("glBindAttribLocationARB")); -
264 QGLContextPrivate::extensionFuncs(ctx).qt_glGetAttribLocation = (_glGetAttribLocation) ctx->getProcAddress(QLatin1String("glGetAttribLocationARB")); -
265 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib1fv = (_glVertexAttrib1fv) ctx->getProcAddress(QLatin1String("glVertexAttrib1fvARB")); -
266 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib2fv = (_glVertexAttrib2fv) ctx->getProcAddress(QLatin1String("glVertexAttrib2fvARB")); -
267 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib3fv = (_glVertexAttrib3fv) ctx->getProcAddress(QLatin1String("glVertexAttrib3fvARB")); -
268 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib4fv = (_glVertexAttrib4fv) ctx->getProcAddress(QLatin1String("glVertexAttrib4fvARB")); -
269 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttribPointer = (_glVertexAttribPointer) ctx->getProcAddress(QLatin1String("glVertexAttribPointerARB")); -
270 QGLContextPrivate::extensionFuncs(ctx).qt_glDisableVertexAttribArray = (_glDisableVertexAttribArray) ctx->getProcAddress(QLatin1String("glDisableVertexAttribArrayARB")); -
271 QGLContextPrivate::extensionFuncs(ctx).qt_glEnableVertexAttribArray = (_glEnableVertexAttribArray) ctx->getProcAddress(QLatin1String("glEnableVertexAttribArrayARB")); -
272 }
never executed: }
0
273 -
274 -
275 -
276 -
277 -
278 return QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader && 0
279 QGLContextPrivate::extensionFuncs(ctx).qt_glShaderSource && 0
280 QGLContextPrivate::extensionFuncs(ctx).qt_glCompileShader && 0
281 QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgram && 0
282 QGLContextPrivate::extensionFuncs(ctx).qt_glCreateProgram && 0
283 QGLContextPrivate::extensionFuncs(ctx).qt_glAttachShader && 0
284 QGLContextPrivate::extensionFuncs(ctx).qt_glDetachShader && 0
285 QGLContextPrivate::extensionFuncs(ctx).qt_glLinkProgram && 0
286 QGLContextPrivate::extensionFuncs(ctx).qt_glUseProgram && 0
287 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderInfoLog && 0
288 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderiv && 0
289 QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderSource && 0
290 QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramiv && 0
291 QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramInfoLog && 0
292 QGLContextPrivate::extensionFuncs(ctx).qt_glGetUniformLocation && 0
293 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1fv && 0
294 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform2fv && 0
295 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform3fv && 0
296 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform4fv && 0
297 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1i && 0
298 QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1iv && 0
299 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2fv && 0
300 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3fv && 0
301 QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4fv && 0
302 QGLContextPrivate::extensionFuncs(ctx).qt_glBindAttribLocation && 0
303 QGLContextPrivate::extensionFuncs(ctx).qt_glGetAttribLocation && 0
304 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib1fv && 0
305 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib2fv && 0
306 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib3fv && 0
307 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib4fv && 0
308 QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttribPointer && 0
309 QGLContextPrivate::extensionFuncs(ctx).qt_glDisableVertexAttribArray && 0
310 QGLContextPrivate::extensionFuncs(ctx).qt_glEnableVertexAttribArray;
never executed: return QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader && QGLContextPrivate::extensionFuncs(ctx).qt_glShaderSource && QGLContextPrivate::extensionFuncs(ctx).qt_glCompileShader && QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgram && QGLContextPrivate::extensionFuncs(ctx).qt_glCreateProgram && QGLContextPrivate::extensionFuncs(ctx).qt_glAttachShader && QGLContextPrivate::extensionFuncs(ctx).qt_glDetachShader && QGLContextPrivate::extensionFuncs(ctx).qt_glLinkProgram && QGLContextPrivate::extensionFuncs(ctx).qt_glUseProgram && QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderInfoLog && QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderiv && QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderSource && QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramiv && QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramInfoLog && QGLContextPrivate::extensionFuncs(ctx).qt_glGetUniformLocation && QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1fv && QGLContextPrivate::extensionFuncs(ctx).qt_glUniform2fv && QGLContextPrivate::extensionFuncs(ctx).qt_glUniform3fv && QGLContextPrivate::extensionFuncs(ctx).qt_glUniform4fv && QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1i && QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1iv && QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2fv && QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3fv && QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4fv && QGLContextPrivate::extensionFuncs(ctx).qt_glBindAttribLocation && QGLContextPrivate::extensionFuncs(ctx).qt_glGetAttribLocation && QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib1fv && QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib2fv && QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib3fv && QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib4fv && QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttribPointer && QGLContextPrivate::extensionFuncs(ctx).qt_glDisableVertexAttribArray && QGLContextPrivate::extensionFuncs(ctx).qt_glEnableVertexAttribArray;
0
311 -
312} -
313 -
314 -
315bool qt_resolve_version_2_0_functions(QGLContext *ctx) -
316{ -
317 bool gl2supported = true; -
318 if (!qt_resolve_glsl_extensions(ctx))
never evaluated: !qt_resolve_glsl_extensions(ctx)
0
319 gl2supported = false;
never executed: gl2supported = false;
0
320 -
321 if (!qt_resolve_version_1_3_functions(ctx))
never evaluated: !qt_resolve_version_1_3_functions(ctx)
0
322 gl2supported = false;
never executed: gl2supported = false;
0
323 -
324 if (QGLContextPrivate::extensionFuncs(ctx).qt_glStencilOpSeparate)
never evaluated: QGLContextPrivate::extensionFuncs(ctx).qt_glStencilOpSeparate
0
325 return gl2supported;
never executed: return gl2supported;
0
326 -
327 QGLContextPrivate::extensionFuncs(ctx).qt_glBlendColor = (_glBlendColor) ctx->getProcAddress(QLatin1String("glBlendColor")); -
328 QGLContextPrivate::extensionFuncs(ctx).qt_glStencilOpSeparate = (_glStencilOpSeparate) ctx->getProcAddress(QLatin1String("glStencilOpSeparate")); -
329 if (!QGLContextPrivate::extensionFuncs(ctx).qt_glBlendColor || !QGLContextPrivate::extensionFuncs(ctx).qt_glStencilOpSeparate)
never evaluated: !QGLContextPrivate::extensionFuncs(ctx).qt_glBlendColor
never evaluated: !QGLContextPrivate::extensionFuncs(ctx).qt_glStencilOpSeparate
0
330 gl2supported = false;
never executed: gl2supported = false;
0
331 -
332 return gl2supported;
never executed: return gl2supported;
0
333} -
334 -
335 -
336 -
337 -
338 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial