qopenglfunctions.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3const QLoggingCategory &lcGLES3() { static const QLoggingCategory category("qt.opengl.es3"); return
never executed: return category;
category;
never executed: return category;
}
0
4struct QOpenGLFunctionsPrivateEx : public QOpenGLExtensionsPrivate, public QOpenGLSharedResource-
5{-
6 QOpenGLFunctionsPrivateEx(QOpenGLContext *context)-
7 : QOpenGLExtensionsPrivate(context)-
8 , QOpenGLSharedResource(context->shareGroup())-
9 , m_features(-1)-
10 , m_extensions(-1)-
11 {}
never executed: end of block
0
12-
13 void invalidateResource() override-
14 {-
15 m_features = -1;-
16 m_extensions = -1;-
17 }
never executed: end of block
0
18-
19 void freeResource(QOpenGLContext *) override-
20 {-
21-
22 }-
23-
24 int m_features;-
25 int m_extensions;-
26};-
27-
28namespace { namespace Q_QGS_qt_gl_functions_resource { typedef QOpenGLMultiGroupSharedResource Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
never executed: guard.store(QtGlobalStatic::Destroyed);
}
never executed: end of block
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
never executed: return &holder.value;
&holder.value;
never executed: return &holder.value;
} } } static QGlobalStatic<QOpenGLMultiGroupSharedResource, Q_QGS_qt_gl_functions_resource::innerFunction, Q_QGS_qt_gl_functions_resource::guard> qt_gl_functions_resource;
0
29-
30static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = 0)-
31{-
32 if (!context
!contextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
33 context = QOpenGLContext::currentContext();
never executed: context = QOpenGLContext::currentContext();
0
34 ((!(context)) ? qt_assert("context",__FILE__,244) : qt_noop());-
35 QOpenGLFunctionsPrivateEx *funcs =-
36 qt_gl_functions_resource()->value<QOpenGLFunctionsPrivateEx>(context);-
37 return
never executed: return funcs;
funcs;
never executed: return funcs;
0
38}-
39QOpenGLFunctions::QOpenGLFunctions()-
40 : d_ptr(0)-
41{-
42}
never executed: end of block
0
43QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext *context)-
44 : d_ptr(0)-
45{-
46 if (context
contextDescription
TRUEnever evaluated
FALSEnever evaluated
&& QOpenGLContextGroup::currentContextGroup() == context->shareGroup()
QOpenGLContext...->shareGroup()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
47 d_ptr = qt_gl_functions(context);
never executed: d_ptr = qt_gl_functions(context);
0
48 else-
49 QMessageLogger(__FILE__, 280, __PRETTY_FUNCTION__).warning("QOpenGLFunctions created with non-current context");
never executed: QMessageLogger(__FILE__, 280, __PRETTY_FUNCTION__).warning("QOpenGLFunctions created with non-current context");
0
50}-
51-
52QOpenGLExtensions::QOpenGLExtensions()-
53{-
54}-
55-
56QOpenGLExtensions::QOpenGLExtensions(QOpenGLContext *context)-
57 : QOpenGLExtraFunctions(context)-
58{-
59}
never executed: end of block
0
60-
61-
62-
63-
64-
65-
66-
67static int qt_gl_resolve_features()-
68{-
69 QOpenGLContext *ctx = QOpenGLContext::currentContext();-
70 if (ctx->isOpenGLES()
ctx->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
71-
72 int features = QOpenGLFunctions::Multitexture |-
73 QOpenGLFunctions::Shaders |-
74 QOpenGLFunctions::Buffers |-
75 QOpenGLFunctions::Framebuffers |-
76 QOpenGLFunctions::BlendColor |-
77 QOpenGLFunctions::BlendEquation |-
78 QOpenGLFunctions::BlendEquationSeparate |-
79 QOpenGLFunctions::BlendFuncSeparate |-
80 QOpenGLFunctions::BlendSubtract |-
81 QOpenGLFunctions::CompressedTextures |-
82 QOpenGLFunctions::Multisample |-
83 QOpenGLFunctions::StencilSeparate;-
84 QOpenGLExtensionMatcher extensions;-
85 if (extensions.match("GL_IMG_texture_npot")
extensions.mat...texture_npot")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
86 features |= QOpenGLFunctions::NPOTTextures;
never executed: features |= QOpenGLFunctions::NPOTTextures;
0
87 if (extensions.match("GL_OES_texture_npot")
extensions.mat...texture_npot")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
88 features |= QOpenGLFunctions::NPOTTextures |
never executed: features |= QOpenGLFunctions::NPOTTextures | QOpenGLFunctions::NPOTTextureRepeat;
0
89 QOpenGLFunctions::NPOTTextureRepeat;
never executed: features |= QOpenGLFunctions::NPOTTextures | QOpenGLFunctions::NPOTTextureRepeat;
0
90 if (ctx->format().majorVersion() >= 3
ctx->format()....Version() >= 3Description
TRUEnever evaluated
FALSEnever evaluated
|| extensions.match("GL_EXT_texture_rg")
extensions.mat...T_texture_rg")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
91-
92 const char *renderer = reinterpret_cast<const char *>(ctx->functions()->glGetString(0x1F01));-
93 if (!(renderer
rendererDescription
TRUEnever evaluated
FALSEnever evaluated
&& strstr(renderer, "Mesa")
strstr(renderer, "Mesa")Description
TRUEnever evaluated
FALSEnever evaluated
))
0
94 features |= QOpenGLFunctions::TextureRGFormats;
never executed: features |= QOpenGLFunctions::TextureRGFormats;
0
95 }
never executed: end of block
0
96 if (ctx->format().majorVersion() >= 3
ctx->format()....Version() >= 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
97 features |= QOpenGLFunctions::MultipleRenderTargets;
never executed: features |= QOpenGLFunctions::MultipleRenderTargets;
0
98 return
never executed: return features;
features;
never executed: return features;
0
99 } else {-
100-
101 int features = QOpenGLFunctions::TextureRGFormats;-
102 QSurfaceFormat format = QOpenGLContext::currentContext()->format();-
103 QOpenGLExtensionMatcher extensions;-
104-
105 if (format.majorVersion() >= 3
format.majorVersion() >= 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
106 features |= QOpenGLFunctions::Framebuffers | QOpenGLFunctions::MultipleRenderTargets;
never executed: features |= QOpenGLFunctions::Framebuffers | QOpenGLFunctions::MultipleRenderTargets;
0
107 else if (extensions.match("GL_EXT_framebuffer_object")
extensions.mat...uffer_object")Description
TRUEnever evaluated
FALSEnever evaluated
|| extensions.match("GL_ARB_framebuffer_object")
extensions.mat...uffer_object")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
108 features |= QOpenGLFunctions::Framebuffers | QOpenGLFunctions::MultipleRenderTargets;
never executed: features |= QOpenGLFunctions::Framebuffers | QOpenGLFunctions::MultipleRenderTargets;
0
109-
110 if (format.majorVersion() >= 2
format.majorVersion() >= 2Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
111 features |= QOpenGLFunctions::BlendColor |-
112 QOpenGLFunctions::BlendEquation |-
113 QOpenGLFunctions::BlendSubtract |-
114 QOpenGLFunctions::Multitexture |-
115 QOpenGLFunctions::CompressedTextures |-
116 QOpenGLFunctions::Multisample |-
117 QOpenGLFunctions::BlendFuncSeparate |-
118 QOpenGLFunctions::Buffers |-
119 QOpenGLFunctions::Shaders |-
120 QOpenGLFunctions::StencilSeparate |-
121 QOpenGLFunctions::BlendEquationSeparate |-
122 QOpenGLFunctions::NPOTTextures |-
123 QOpenGLFunctions::NPOTTextureRepeat;-
124 }
never executed: end of block
else {
0
125-
126 if (extensions.match("GL_ARB_multitexture")
extensions.mat...multitexture")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
127 features |= QOpenGLFunctions::Multitexture;
never executed: features |= QOpenGLFunctions::Multitexture;
0
128 if (extensions.match("GL_ARB_shader_objects")
extensions.mat...ader_objects")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
129 features |= QOpenGLFunctions::Shaders;
never executed: features |= QOpenGLFunctions::Shaders;
0
130 if (extensions.match("GL_EXT_blend_color")
extensions.mat..._blend_color")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
131 features |= QOpenGLFunctions::BlendColor;
never executed: features |= QOpenGLFunctions::BlendColor;
0
132 if (extensions.match("GL_EXT_blend_equation_separate")
extensions.mat...ion_separate")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
133 features |= QOpenGLFunctions::BlendEquationSeparate;
never executed: features |= QOpenGLFunctions::BlendEquationSeparate;
0
134 if (extensions.match("GL_EXT_blend_subtract")
extensions.mat...end_subtract")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
135 features |= QOpenGLFunctions::BlendSubtract;
never executed: features |= QOpenGLFunctions::BlendSubtract;
0
136 if (extensions.match("GL_EXT_blend_func_separate")
extensions.mat...unc_separate")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
137 features |= QOpenGLFunctions::BlendFuncSeparate;
never executed: features |= QOpenGLFunctions::BlendFuncSeparate;
0
138 if (extensions.match("GL_ARB_texture_compression")
extensions.mat..._compression")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
139 features |= QOpenGLFunctions::CompressedTextures;
never executed: features |= QOpenGLFunctions::CompressedTextures;
0
140 if (extensions.match("GL_ARB_multisample")
extensions.mat..._multisample")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
141 features |= QOpenGLFunctions::Multisample;
never executed: features |= QOpenGLFunctions::Multisample;
0
142 if (extensions.match("GL_ARB_texture_non_power_of_two")
extensions.mat...power_of_two")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
143 features |= QOpenGLFunctions::NPOTTextures |
never executed: features |= QOpenGLFunctions::NPOTTextures | QOpenGLFunctions::NPOTTextureRepeat;
0
144 QOpenGLFunctions::NPOTTextureRepeat;
never executed: features |= QOpenGLFunctions::NPOTTextures | QOpenGLFunctions::NPOTTextureRepeat;
0
145 }
never executed: end of block
0
146-
147 const QPair<int, int> version = format.version();-
148 if (version < qMakePair(3, 0)
version < qMakePair(3, 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
149 || (version == qMakePair(3, 0)
version == qMakePair(3, 0)Description
TRUEnever evaluated
FALSEnever evaluated
&& format.testOption(QSurfaceFormat::DeprecatedFunctions)
format.testOpt...atedFunctions)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
150 || (version == qMakePair(3, 1)
version == qMakePair(3, 1)Description
TRUEnever evaluated
FALSEnever evaluated
&& extensions.match("GL_ARB_compatibility")
extensions.mat...ompatibility")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
151 || (version >= qMakePair(3, 2)
version >= qMakePair(3, 2)Description
TRUEnever evaluated
FALSEnever evaluated
&& format.profile() == QSurfaceFormat::CompatibilityProfile
format.profile...ibilityProfileDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0
152 features |= QOpenGLFunctions::FixedFunctionPipeline;-
153 }
never executed: end of block
0
154 return
never executed: return features;
features;
never executed: return features;
0
155 }-
156}-
157-
158static int qt_gl_resolve_extensions()-
159{-
160 int extensions = 0;-
161 QOpenGLExtensionMatcher extensionMatcher;-
162 QOpenGLContext *ctx = QOpenGLContext::currentContext();-
163 QSurfaceFormat format = ctx->format();-
164-
165 if (extensionMatcher.match("GL_EXT_bgra")
extensionMatch..."GL_EXT_bgra")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
166 extensions |= QOpenGLExtensions::BGRATextureFormat;
never executed: extensions |= QOpenGLExtensions::BGRATextureFormat;
0
167 if (extensionMatcher.match("GL_ARB_texture_rectangle")
extensionMatch...re_rectangle")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
168 extensions |= QOpenGLExtensions::TextureRectangle;
never executed: extensions |= QOpenGLExtensions::TextureRectangle;
0
169 if (extensionMatcher.match("GL_ARB_texture_compression")
extensionMatch..._compression")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
170 extensions |= QOpenGLExtensions::TextureCompression;
never executed: extensions |= QOpenGLExtensions::TextureCompression;
0
171 if (extensionMatcher.match("GL_EXT_texture_compression_s3tc")
extensionMatch...ression_s3tc")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
172 extensions |= QOpenGLExtensions::DDSTextureCompression;
never executed: extensions |= QOpenGLExtensions::DDSTextureCompression;
0
173 if (extensionMatcher.match("GL_OES_compressed_ETC1_RGB8_texture")
extensionMatch...RGB8_texture")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
174 extensions |= QOpenGLExtensions::ETC1TextureCompression;
never executed: extensions |= QOpenGLExtensions::ETC1TextureCompression;
0
175 if (extensionMatcher.match("GL_IMG_texture_compression_pvrtc")
extensionMatch...ession_pvrtc")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
176 extensions |= QOpenGLExtensions::PVRTCTextureCompression;
never executed: extensions |= QOpenGLExtensions::PVRTCTextureCompression;
0
177 if (extensionMatcher.match("GL_ARB_texture_mirrored_repeat")
extensionMatch...rored_repeat")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
178 extensions |= QOpenGLExtensions::MirroredRepeat;
never executed: extensions |= QOpenGLExtensions::MirroredRepeat;
0
179 if (extensionMatcher.match("GL_EXT_stencil_two_side")
extensionMatch...cil_two_side")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
180 extensions |= QOpenGLExtensions::StencilTwoSide;
never executed: extensions |= QOpenGLExtensions::StencilTwoSide;
0
181 if (extensionMatcher.match("GL_EXT_stencil_wrap")
extensionMatch...stencil_wrap")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
182 extensions |= QOpenGLExtensions::StencilWrap;
never executed: extensions |= QOpenGLExtensions::StencilWrap;
0
183 if (extensionMatcher.match("GL_NV_float_buffer")
extensionMatch...float_buffer")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
184 extensions |= QOpenGLExtensions::NVFloatBuffer;
never executed: extensions |= QOpenGLExtensions::NVFloatBuffer;
0
185 if (extensionMatcher.match("GL_ARB_pixel_buffer_object")
extensionMatch...uffer_object")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
186 extensions |= QOpenGLExtensions::PixelBufferObject;
never executed: extensions |= QOpenGLExtensions::PixelBufferObject;
0
187-
188 if (ctx->isOpenGLES()
ctx->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
189 if (format.majorVersion() >= 2
format.majorVersion() >= 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
190 extensions |= QOpenGLExtensions::GenerateMipmap;
never executed: extensions |= QOpenGLExtensions::GenerateMipmap;
0
191-
192 if (format.majorVersion() >= 3
format.majorVersion() >= 3Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
193 extensions |= QOpenGLExtensions::PackedDepthStencil-
194 | QOpenGLExtensions::Depth24-
195 | QOpenGLExtensions::ElementIndexUint-
196 | QOpenGLExtensions::MapBufferRange-
197 | QOpenGLExtensions::FramebufferBlit-
198 | QOpenGLExtensions::FramebufferMultisample-
199 | QOpenGLExtensions::Sized8Formats;-
200 }
never executed: end of block
else {
0
201-
202 if (extensionMatcher.match("GL_OES_packed_depth_stencil")
extensionMatch...epth_stencil")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
203 extensions |= QOpenGLExtensions::PackedDepthStencil;
never executed: extensions |= QOpenGLExtensions::PackedDepthStencil;
0
204 if (extensionMatcher.match("GL_OES_depth24")
extensionMatch..._OES_depth24")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
205 extensions |= QOpenGLExtensions::Depth24;
never executed: extensions |= QOpenGLExtensions::Depth24;
0
206 if (extensionMatcher.match("GL_ANGLE_framebuffer_blit")
extensionMatch...ebuffer_blit")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
207 extensions |= QOpenGLExtensions::FramebufferBlit;
never executed: extensions |= QOpenGLExtensions::FramebufferBlit;
0
208 if (extensionMatcher.match("GL_ANGLE_framebuffer_multisample")
extensionMatch..._multisample")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
209 extensions |= QOpenGLExtensions::FramebufferMultisample;
never executed: extensions |= QOpenGLExtensions::FramebufferMultisample;
0
210 if (extensionMatcher.match("GL_NV_framebuffer_blit")
extensionMatch...ebuffer_blit")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
211 extensions |= QOpenGLExtensions::FramebufferBlit;
never executed: extensions |= QOpenGLExtensions::FramebufferBlit;
0
212 if (extensionMatcher.match("GL_NV_framebuffer_multisample")
extensionMatch..._multisample")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
213 extensions |= QOpenGLExtensions::FramebufferMultisample;
never executed: extensions |= QOpenGLExtensions::FramebufferMultisample;
0
214 if (extensionMatcher.match("GL_OES_rgb8_rgba8")
extensionMatch...S_rgb8_rgba8")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
215 extensions |= QOpenGLExtensions::Sized8Formats;
never executed: extensions |= QOpenGLExtensions::Sized8Formats;
0
216 }
never executed: end of block
0
217-
218 if (extensionMatcher.match("GL_OES_mapbuffer")
extensionMatch...ES_mapbuffer")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
219 extensions |= QOpenGLExtensions::MapBuffer;
never executed: extensions |= QOpenGLExtensions::MapBuffer;
0
220 if (extensionMatcher.match("GL_OES_element_index_uint")
extensionMatch...t_index_uint")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
221 extensions |= QOpenGLExtensions::ElementIndexUint;
never executed: extensions |= QOpenGLExtensions::ElementIndexUint;
0
222-
223 if (extensionMatcher.match("GL_IMG_texture_format_BGRA8888")
extensionMatch...mat_BGRA8888")Description
TRUEnever evaluated
FALSEnever evaluated
|| extensionMatcher.match("GL_EXT_texture_format_BGRA8888")
extensionMatch...mat_BGRA8888")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
224 extensions |= QOpenGLExtensions::BGRATextureFormat;
never executed: extensions |= QOpenGLExtensions::BGRATextureFormat;
0
225 if (extensionMatcher.match("GL_EXT_discard_framebuffer")
extensionMatch..._framebuffer")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
226 extensions |= QOpenGLExtensions::DiscardFramebuffer;
never executed: extensions |= QOpenGLExtensions::DiscardFramebuffer;
0
227 if (extensionMatcher.match("GL_EXT_texture_norm16")
extensionMatch...xture_norm16")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
228 extensions |= QOpenGLExtensions::Sized16Formats;
never executed: extensions |= QOpenGLExtensions::Sized16Formats;
0
229 }
never executed: end of block
else {
0
230 extensions |= QOpenGLExtensions::ElementIndexUint-
231 | QOpenGLExtensions::MapBuffer-
232 | QOpenGLExtensions::Sized16Formats;-
233-
234 if (format.version() >= qMakePair(1, 2)
format.version...MakePair(1, 2)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
235 extensions |= QOpenGLExtensions::BGRATextureFormat;
never executed: extensions |= QOpenGLExtensions::BGRATextureFormat;
0
236-
237 if (format.version() >= qMakePair(1, 4)
format.version...MakePair(1, 4)Description
TRUEnever evaluated
FALSEnever evaluated
|| extensionMatcher.match("GL_SGIS_generate_mipmap")
extensionMatch...erate_mipmap")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
238 extensions |= QOpenGLExtensions::GenerateMipmap;
never executed: extensions |= QOpenGLExtensions::GenerateMipmap;
0
239-
240 if (format.majorVersion() >= 3
format.majorVersion() >= 3Description
TRUEnever evaluated
FALSEnever evaluated
|| extensionMatcher.match("GL_ARB_framebuffer_object")
extensionMatch...uffer_object")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
241 extensions |= QOpenGLExtensions::FramebufferMultisample-
242 | QOpenGLExtensions::FramebufferBlit-
243 | QOpenGLExtensions::PackedDepthStencil-
244 | QOpenGLExtensions::Sized8Formats;-
245 }
never executed: end of block
else {
0
246-
247 if (extensionMatcher.match("GL_EXT_framebuffer_multisample")
extensionMatch..._multisample")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
248 extensions |= QOpenGLExtensions::FramebufferMultisample;
never executed: extensions |= QOpenGLExtensions::FramebufferMultisample;
0
249 if (extensionMatcher.match("GL_EXT_framebuffer_blit")
extensionMatch...ebuffer_blit")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
250 extensions |= QOpenGLExtensions::FramebufferBlit;
never executed: extensions |= QOpenGLExtensions::FramebufferBlit;
0
251 if (extensionMatcher.match("GL_EXT_packed_depth_stencil")
extensionMatch...epth_stencil")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
252 extensions |= QOpenGLExtensions::PackedDepthStencil;
never executed: extensions |= QOpenGLExtensions::PackedDepthStencil;
0
253 }
never executed: end of block
0
254-
255 if (format.version() >= qMakePair(3, 2)
format.version...MakePair(3, 2)Description
TRUEnever evaluated
FALSEnever evaluated
|| extensionMatcher.match("GL_ARB_geometry_shader4")
extensionMatch...etry_shader4")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
256 extensions |= QOpenGLExtensions::GeometryShaders;
never executed: extensions |= QOpenGLExtensions::GeometryShaders;
0
257-
258 if (extensionMatcher.match("GL_ARB_map_buffer_range")
extensionMatch...buffer_range")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
259 extensions |= QOpenGLExtensions::MapBufferRange;
never executed: extensions |= QOpenGLExtensions::MapBufferRange;
0
260-
261 if (extensionMatcher.match("GL_EXT_framebuffer_sRGB")
extensionMatch...ebuffer_sRGB")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
262 GLboolean srgbCapableFramebuffers = false;-
263 ctx->functions()->glGetBooleanv(0x8DBA, &srgbCapableFramebuffers);-
264 if (srgbCapableFramebuffers
srgbCapableFramebuffersDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
265 extensions |= QOpenGLExtensions::SRGBFrameBuffer;
never executed: extensions |= QOpenGLExtensions::SRGBFrameBuffer;
0
266 }
never executed: end of block
0
267 }
never executed: end of block
0
268-
269 return
never executed: return extensions;
extensions;
never executed: return extensions;
0
270}-
271QOpenGLFunctions::OpenGLFeatures QOpenGLFunctions::openGLFeatures() const-
272{-
273 QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);-
274 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
275 return
never executed: return 0;
0;
never executed: return 0;
0
276 if (d->m_features == -1
d->m_features == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
277 d->m_features = qt_gl_resolve_features();
never executed: d->m_features = qt_gl_resolve_features();
0
278 return
never executed: return QOpenGLFunctions::OpenGLFeatures(d->m_features);
QOpenGLFunctions::OpenGLFeatures(d->m_features);
never executed: return QOpenGLFunctions::OpenGLFeatures(d->m_features);
0
279}-
280bool QOpenGLFunctions::hasOpenGLFeature(QOpenGLFunctions::OpenGLFeature feature) const-
281{-
282 QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);-
283 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
284 return
never executed: return false;
false;
never executed: return false;
0
285 if (d->m_features == -1
d->m_features == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
286 d->m_features = qt_gl_resolve_features();
never executed: d->m_features = qt_gl_resolve_features();
0
287 return
never executed: return (d->m_features & int(feature)) != 0;
(d->m_features & int(feature)) != 0;
never executed: return (d->m_features & int(feature)) != 0;
0
288}-
289QOpenGLExtensions::OpenGLExtensions QOpenGLExtensions::openGLExtensions()-
290{-
291 QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);-
292 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
293 return
never executed: return 0;
0;
never executed: return 0;
0
294 if (d->m_extensions == -1
d->m_extensions == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
295 d->m_extensions = qt_gl_resolve_extensions();
never executed: d->m_extensions = qt_gl_resolve_extensions();
0
296 return
never executed: return QOpenGLExtensions::OpenGLExtensions(d->m_extensions);
QOpenGLExtensions::OpenGLExtensions(d->m_extensions);
never executed: return QOpenGLExtensions::OpenGLExtensions(d->m_extensions);
0
297}-
298bool QOpenGLExtensions::hasOpenGLExtension(QOpenGLExtensions::OpenGLExtension extension) const-
299{-
300 QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);-
301 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
302 return
never executed: return false;
false;
never executed: return false;
0
303 if (d->m_extensions == -1
d->m_extensions == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
304 d->m_extensions = qt_gl_resolve_extensions();
never executed: d->m_extensions = qt_gl_resolve_extensions();
0
305 return
never executed: return (d->m_extensions & int(extension)) != 0;
(d->m_extensions & int(extension)) != 0;
never executed: return (d->m_extensions & int(extension)) != 0;
0
306}-
307void QOpenGLFunctions::initializeOpenGLFunctions()-
308{-
309 d_ptr = qt_gl_functions();-
310}
never executed: end of block
0
311namespace {-
312-
313-
314-
315-
316static QFunctionPointer getProcAddress(QOpenGLContext *context, const char *funcName)-
317{-
318 QFunctionPointer function = context->getProcAddress(funcName);-
319-
320 static const struct {-
321 const char *name;-
322 int len;-
323 } extensions[] = {-
324 { "ARB", 4 },-
325 { "OES", 4 },-
326 { "EXT", 4 },-
327 { "ANGLE", 6 },-
328 { "NV", 3 },-
329 };-
330-
331 if (!function
!functionDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
332 char fn[512];-
333 size_t size = strlen(funcName);-
334 ((!(size < 500)) ? qt_assert("size < 500",__FILE__,2126) : qt_noop());-
335 memcpy(fn, funcName, size);-
336 char *ext = fn + size;-
337-
338 for (const auto &e : extensions) {-
339 memcpy(ext, e.name, e.len);-
340 function = context->getProcAddress(fn);-
341 if (function
functionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
342 break;
never executed: break;
0
343 }
never executed: end of block
0
344 }
never executed: end of block
0
345-
346 return
never executed: return function;
function;
never executed: return function;
0
347}-
348-
349template <typename Func>-
350Func resolve(QOpenGLContext *context, const char *name, Func)-
351{-
352 return
never executed: return reinterpret_cast<Func>(getProcAddress(context, name));
reinterpret_cast<Func>(getProcAddress(context, name));
never executed: return reinterpret_cast<Func>(getProcAddress(context, name));
0
353}-
354-
355}-
356-
357-
358-
359-
360-
361-
362-
363static void qopenglfSpecialClearDepthf(GLclampf depth)-
364{-
365 QOpenGLContext *context = QOpenGLContext::currentContext();-
366 QOpenGLFunctionsPrivate *funcs = qt_gl_functions(context);-
367 funcs->f.ClearDepth((GLdouble) depth);-
368}
never executed: end of block
0
369-
370static void qopenglfSpecialDepthRangef(GLclampf zNear, GLclampf zFar)-
371{-
372 QOpenGLContext *context = QOpenGLContext::currentContext();-
373 QOpenGLFunctionsPrivate *funcs = qt_gl_functions(context);-
374 funcs->f.DepthRange((GLdouble) zNear, (GLdouble) zFar);-
375}
never executed: end of block
0
376-
377static void qopenglfSpecialGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)-
378{-
379 (void)shadertype;;-
380 (void)precisiontype;;-
381 range[0] = range[1] = precision[0] = 0;-
382}
never executed: end of block
0
383-
384static GLboolean qopenglfSpecialIsProgram(GLuint program)-
385{-
386 return
never executed: return program != 0;
program != 0;
never executed: return program != 0;
0
387}-
388-
389static GLboolean qopenglfSpecialIsShader(GLuint shader)-
390{-
391 return
never executed: return shader != 0;
shader != 0;
never executed: return shader != 0;
0
392}-
393-
394static void qopenglfSpecialReleaseShaderCompiler()-
395{-
396}-
397-
398-
399-
400-
401QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *c)-
402{-
403 init(c);-
404-
405-
406-
407 if (!f.ClearDepthf
!f.ClearDepthfDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
408 f.ClearDepthf = qopenglfSpecialClearDepthf;
never executed: f.ClearDepthf = qopenglfSpecialClearDepthf;
0
409 if (!f.DepthRangef
!f.DepthRangefDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
410 f.DepthRangef = qopenglfSpecialDepthRangef;
never executed: f.DepthRangef = qopenglfSpecialDepthRangef;
0
411 if (!f.GetShaderPrecisionFormat
!f.GetShaderPrecisionFormatDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
412 f.GetShaderPrecisionFormat = qopenglfSpecialGetShaderPrecisionFormat;
never executed: f.GetShaderPrecisionFormat = qopenglfSpecialGetShaderPrecisionFormat;
0
413 if (!f.IsProgram
!f.IsProgramDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
414 f.IsProgram = qopenglfSpecialIsProgram;
never executed: f.IsProgram = qopenglfSpecialIsProgram;
0
415 if (!f.IsShader
!f.IsShaderDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
416 f.IsShader = qopenglfSpecialIsShader;
never executed: f.IsShader = qopenglfSpecialIsShader;
0
417 if (!f.ReleaseShaderCompiler
!f.ReleaseShaderCompilerDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
418 f.ReleaseShaderCompiler = qopenglfSpecialReleaseShaderCompiler;
never executed: f.ReleaseShaderCompiler = qopenglfSpecialReleaseShaderCompiler;
0
419-
420}
never executed: end of block
0
421-
422-
423void QOpenGLFunctionsPrivate::init(QOpenGLContext *context) { const char *names = "gl""BindTexture""\0" "gl""BlendFunc""\0" "gl""Clear""\0" "gl""ClearColor""\0" "gl""ClearDepthf""\0" "gl""ClearStencil""\0" "gl""ColorMask""\0" "gl""CopyTexImage2D""\0" "gl""CopyTexSubImage2D""\0" "gl""CullFace""\0" "gl""DeleteTextures""\0" "gl""DepthFunc""\0" "gl""DepthMask""\0" "gl""DepthRangef""\0" "gl""Disable""\0" "gl""DrawArrays""\0" "gl""DrawElements""\0" "gl""Enable""\0" "gl""Finish""\0" "gl""Flush""\0" "gl""FrontFace""\0" "gl""GenTextures""\0" "gl""GetBooleanv""\0" "gl""GetError""\0" "gl""GetFloatv""\0" "gl""GetIntegerv""\0" "gl""GetString""\0" "gl""GetTexParameterfv""\0" "gl""GetTexParameteriv""\0" "gl""Hint""\0" "gl""IsEnabled""\0" "gl""IsTexture""\0" "gl""LineWidth""\0" "gl""PixelStorei""\0" "gl""PolygonOffset""\0" "gl""ReadPixels""\0" "gl""Scissor""\0" "gl""StencilFunc""\0" "gl""StencilMask""\0" "gl""StencilOp""\0" "gl""TexImage2D""\0" "gl""TexParameterf""\0" "gl""TexParameterfv""\0" "gl""TexParameteri""\0" "gl""TexParameteriv""\0" "gl""TexSubImage2D""\0" "gl""Viewport""\0" "gl""ActiveTexture""\0" "gl""AttachShader""\0" "gl""BindAttribLocation""\0" "gl""BindBuffer""\0" "gl""BindFramebuffer""\0" "gl""BindRenderbuffer""\0" "gl""BlendColor""\0" "gl""BlendEquation""\0" "gl""BlendEquationSeparate""\0" "gl""BlendFuncSeparate""\0" "gl""BufferData""\0" "gl""BufferSubData""\0" "gl""CheckFramebufferStatus""\0" "gl""CompileShader""\0" "gl""CompressedTexImage2D""\0" "gl""CompressedTexSubImage2D""\0" "gl""CreateProgram""\0" "gl""CreateShader""\0" "gl""DeleteBuffers""\0" "gl""DeleteFramebuffers""\0" "gl""DeleteProgram""\0" "gl""DeleteRenderbuffers""\0" "gl""DeleteShader""\0" "gl""DetachShader""\0" "gl""DisableVertexAttribArray""\0" "gl""EnableVertexAttribArray""\0" "gl""FramebufferRenderbuffer""\0" "gl""FramebufferTexture2D""\0" "gl""GenBuffers""\0" "gl""GenerateMipmap""\0" "gl""GenFramebuffers""\0" "gl""GenRenderbuffers""\0" "gl""GetActiveAttrib""\0" "gl""GetActiveUniform""\0" "gl""GetAttachedShaders""\0" "gl""GetAttribLocation""\0" "gl""GetBufferParameteriv""\0" "gl""GetFramebufferAttachmentParameteriv""\0" "gl""GetProgramiv""\0" "gl""GetProgramInfoLog""\0" "gl""GetRenderbufferParameteriv""\0" "gl""GetShaderiv""\0" "gl""GetShaderInfoLog""\0" "gl""GetShaderPrecisionFormat""\0" "gl""GetShaderSource""\0" "gl""GetUniformfv""\0" "gl""GetUniformiv""\0" "gl""GetUniformLocation""\0" "gl""GetVertexAttribfv""\0" "gl""GetVertexAttribiv""\0" "gl""GetVertexAttribPointerv""\0" "gl""IsBuffer""\0" "gl""IsFramebuffer""\0" "gl""IsProgram""\0" "gl""IsRenderbuffer""\0" "gl""IsShader""\0" "gl""LinkProgram""\0" "gl""ReleaseShaderCompiler""\0" "gl""RenderbufferStorage""\0" "gl""SampleCoverage""\0" "gl""ShaderBinary""\0" "gl""ShaderSource""\0" "gl""StencilFuncSeparate""\0" "gl""StencilMaskSeparate""\0" "gl""StencilOpSeparate""\0" "gl""Uniform1f""\0" "gl""Uniform1fv""\0" "gl""Uniform1i""\0" "gl""Uniform1iv""\0" "gl""Uniform2f""\0" "gl""Uniform2fv""\0" "gl""Uniform2i""\0" "gl""Uniform2iv""\0" "gl""Uniform3f""\0" "gl""Uniform3fv""\0" "gl""Uniform3i""\0" "gl""Uniform3iv""\0" "gl""Uniform4f""\0" "gl""Uniform4fv""\0" "gl""Uniform4i""\0" "gl""Uniform4iv""\0" "gl""UniformMatrix2fv""\0" "gl""UniformMatrix3fv""\0" "gl""UniformMatrix4fv""\0" "gl""UseProgram""\0" "gl""ValidateProgram""\0" "gl""VertexAttrib1f""\0" "gl""VertexAttrib1fv""\0" "gl""VertexAttrib2f""\0" "gl""VertexAttrib2fv""\0" "gl""VertexAttrib3f""\0" "gl""VertexAttrib3fv""\0" "gl""VertexAttrib4f""\0" "gl""VertexAttrib4fv""\0" "gl""VertexAttribPointer""\0" "gl""ClearDepth""\0" "gl""DepthRange""\0"; const char *name = names; for (int i = 0; i < +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1
i < +1 +1 +1 +...+1 +1 +1 +1 +1Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) { functions[i] = ::getProcAddress(context, name); name += strlen(name) + 1; }
never executed: end of block
}
never executed: end of block
0
424QOpenGLExtraFunctions::QOpenGLExtraFunctions()-
425{-
426}-
427QOpenGLExtraFunctions::QOpenGLExtraFunctions(QOpenGLContext *context)-
428 : QOpenGLFunctions(context)-
429{-
430}
never executed: end of block
0
431-
432QOpenGLExtraFunctionsPrivate::QOpenGLExtraFunctionsPrivate(QOpenGLContext *ctx)-
433 : QOpenGLFunctionsPrivate(ctx)-
434{-
435 init(ctx);-
436}
never executed: end of block
0
437-
438void QOpenGLExtraFunctionsPrivate::init(QOpenGLContext *context) { const char *names = "gl""ReadBuffer""\0" "gl""DrawRangeElements""\0" "gl""TexImage3D""\0" "gl""TexSubImage3D""\0" "gl""CopyTexSubImage3D""\0" "gl""CompressedTexImage3D""\0" "gl""CompressedTexSubImage3D""\0" "gl""GenQueries""\0" "gl""DeleteQueries""\0" "gl""IsQuery""\0" "gl""BeginQuery""\0" "gl""EndQuery""\0" "gl""GetQueryiv""\0" "gl""GetQueryObjectuiv""\0" "gl""UnmapBuffer""\0" "gl""GetBufferPointerv""\0" "gl""DrawBuffers""\0" "gl""UniformMatrix2x3fv""\0" "gl""UniformMatrix3x2fv""\0" "gl""UniformMatrix2x4fv""\0" "gl""UniformMatrix4x2fv""\0" "gl""UniformMatrix3x4fv""\0" "gl""UniformMatrix4x3fv""\0" "gl""BlitFramebuffer""\0" "gl""RenderbufferStorageMultisample""\0" "gl""FramebufferTextureLayer""\0" "gl""MapBufferRange""\0" "gl""FlushMappedBufferRange""\0" "gl""BindVertexArray""\0" "gl""DeleteVertexArrays""\0" "gl""GenVertexArrays""\0" "gl""IsVertexArray""\0" "gl""GetIntegeri_v""\0" "gl""BeginTransformFeedback""\0" "gl""EndTransformFeedback""\0" "gl""BindBufferRange""\0" "gl""BindBufferBase""\0" "gl""TransformFeedbackVaryings""\0" "gl""GetTransformFeedbackVarying""\0" "gl""VertexAttribIPointer""\0" "gl""GetVertexAttribIiv""\0" "gl""GetVertexAttribIuiv""\0" "gl""VertexAttribI4i""\0" "gl""VertexAttribI4ui""\0" "gl""VertexAttribI4iv""\0" "gl""VertexAttribI4uiv""\0" "gl""GetUniformuiv""\0" "gl""GetFragDataLocation""\0" "gl""Uniform1ui""\0" "gl""Uniform2ui""\0" "gl""Uniform3ui""\0" "gl""Uniform4ui""\0" "gl""Uniform1uiv""\0" "gl""Uniform2uiv""\0" "gl""Uniform3uiv""\0" "gl""Uniform4uiv""\0" "gl""ClearBufferiv""\0" "gl""ClearBufferuiv""\0" "gl""ClearBufferfv""\0" "gl""ClearBufferfi""\0" "gl""GetStringi""\0" "gl""CopyBufferSubData""\0" "gl""GetUniformIndices""\0" "gl""GetActiveUniformsiv""\0" "gl""GetUniformBlockIndex""\0" "gl""GetActiveUniformBlockiv""\0" "gl""GetActiveUniformBlockName""\0" "gl""UniformBlockBinding""\0" "gl""DrawArraysInstanced""\0" "gl""DrawElementsInstanced""\0" "gl""FenceSync""\0" "gl""IsSync""\0" "gl""DeleteSync""\0" "gl""ClientWaitSync""\0" "gl""WaitSync""\0" "gl""GetInteger64v""\0" "gl""GetSynciv""\0" "gl""GetInteger64i_v""\0" "gl""GetBufferParameteri64v""\0" "gl""GenSamplers""\0" "gl""DeleteSamplers""\0" "gl""IsSampler""\0" "gl""BindSampler""\0" "gl""SamplerParameteri""\0" "gl""SamplerParameteriv""\0" "gl""SamplerParameterf""\0" "gl""SamplerParameterfv""\0" "gl""GetSamplerParameteriv""\0" "gl""GetSamplerParameterfv""\0" "gl""VertexAttribDivisor""\0" "gl""BindTransformFeedback""\0" "gl""DeleteTransformFeedbacks""\0" "gl""GenTransformFeedbacks""\0" "gl""IsTransformFeedback""\0" "gl""PauseTransformFeedback""\0" "gl""ResumeTransformFeedback""\0" "gl""GetProgramBinary""\0" "gl""ProgramBinary""\0" "gl""ProgramParameteri""\0" "gl""InvalidateFramebuffer""\0" "gl""InvalidateSubFramebuffer""\0" "gl""TexStorage2D""\0" "gl""TexStorage3D""\0" "gl""GetInternalformativ""\0" "gl""DispatchCompute""\0" "gl""DispatchComputeIndirect""\0" "gl""DrawArraysIndirect""\0" "gl""DrawElementsIndirect""\0" "gl""FramebufferParameteri""\0" "gl""GetFramebufferParameteriv""\0" "gl""GetProgramInterfaceiv""\0" "gl""GetProgramResourceIndex""\0" "gl""GetProgramResourceName""\0" "gl""GetProgramResourceiv""\0" "gl""GetProgramResourceLocation""\0" "gl""UseProgramStages""\0" "gl""ActiveShaderProgram""\0" "gl""CreateShaderProgramv""\0" "gl""BindProgramPipeline""\0" "gl""DeleteProgramPipelines""\0" "gl""GenProgramPipelines""\0" "gl""IsProgramPipeline""\0" "gl""GetProgramPipelineiv""\0" "gl""ProgramUniform1i""\0" "gl""ProgramUniform2i""\0" "gl""ProgramUniform3i""\0" "gl""ProgramUniform4i""\0" "gl""ProgramUniform1ui""\0" "gl""ProgramUniform2ui""\0" "gl""ProgramUniform3ui""\0" "gl""ProgramUniform4ui""\0" "gl""ProgramUniform1f""\0" "gl""ProgramUniform2f""\0" "gl""ProgramUniform3f""\0" "gl""ProgramUniform4f""\0" "gl""ProgramUniform1iv""\0" "gl""ProgramUniform2iv""\0" "gl""ProgramUniform3iv""\0" "gl""ProgramUniform4iv""\0" "gl""ProgramUniform1uiv""\0" "gl""ProgramUniform2uiv""\0" "gl""ProgramUniform3uiv""\0" "gl""ProgramUniform4uiv""\0" "gl""ProgramUniform1fv""\0" "gl""ProgramUniform2fv""\0" "gl""ProgramUniform3fv""\0" "gl""ProgramUniform4fv""\0" "gl""ProgramUniformMatrix2fv""\0" "gl""ProgramUniformMatrix3fv""\0" "gl""ProgramUniformMatrix4fv""\0" "gl""ProgramUniformMatrix2x3fv""\0" "gl""ProgramUniformMatrix3x2fv""\0" "gl""ProgramUniformMatrix2x4fv""\0" "gl""ProgramUniformMatrix4x2fv""\0" "gl""ProgramUniformMatrix3x4fv""\0" "gl""ProgramUniformMatrix4x3fv""\0" "gl""ValidateProgramPipeline""\0" "gl""GetProgramPipelineInfoLog""\0" "gl""BindImageTexture""\0" "gl""GetBooleani_v""\0" "gl""MemoryBarrier""\0" "gl""MemoryBarrierByRegion""\0" "gl""TexStorage2DMultisample""\0" "gl""GetMultisamplefv""\0" "gl""SampleMaski""\0" "gl""GetTexLevelParameteriv""\0" "gl""GetTexLevelParameterfv""\0" "gl""BindVertexBuffer""\0" "gl""VertexAttribFormat""\0" "gl""VertexAttribIFormat""\0" "gl""VertexAttribBinding""\0" "gl""VertexBindingDivisor""\0"; const char *name = names; for (int i = 0; i < +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1
i < +1 +1 +1 +...+1 +1 +1 +1 +1Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) { functions[i] = ::getProcAddress(context, name); name += strlen(name) + 1; }
never executed: end of block
}
never executed: end of block
0
439-
440QOpenGLExtensionsPrivate::QOpenGLExtensionsPrivate(QOpenGLContext *ctx)-
441 : QOpenGLExtraFunctionsPrivate(ctx),-
442 flushVendorChecked(false)-
443{-
444 QOpenGLContext *context = QOpenGLContext::currentContext();-
445-
446 MapBuffer = resolve(context, "gl""MapBuffer", MapBuffer);-
447 GetBufferSubData = resolve(context, "gl""GetBufferSubData", GetBufferSubData);-
448 DiscardFramebuffer = resolve(context, "gl""DiscardFramebuffer", DiscardFramebuffer);-
449 }
never executed: end of block
0
450-
451void QOpenGLExtensions::flushShared()-
452{-
453 QOpenGLExtensionsPrivate * const d = d_func();-
454-
455 if (!d->flushVendorChecked
!d->flushVendorCheckedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
456 d->flushVendorChecked = true;-
457-
458-
459-
460-
461 d->flushIsSufficientToSyncContexts = false;-
462 const char *vendor = (const char *) glGetString(0x1F00);-
463 if (vendor
vendorDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
464 static const char *const flushEnough[] = { "Apple", "ATI", "Intel", "NVIDIA" };-
465 for (size_t i = 0; i < sizeof(flushEnough) / sizeof(const char *)
i < sizeof(flu...(const char *)Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
466 if (strstr(vendor, flushEnough[i])
strstr(vendor, flushEnough[i])Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
467 d->flushIsSufficientToSyncContexts = true;-
468 break;
never executed: break;
0
469 }-
470 }
never executed: end of block
0
471 }
never executed: end of block
0
472 }
never executed: end of block
0
473-
474 if (d->flushIsSufficientToSyncContexts
d->flushIsSuff...ToSyncContextsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
475 glFlush();
never executed: glFlush();
0
476 else-
477 glFinish();
never executed: glFinish();
0
478}-
479-
480-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9