@@ -59,6 +59,9 @@ bool OpenGLContext::queryOpenGLVersion(GLint* major, GLint* minor) noexcept {
59
59
// OpenGL version
60
60
glGetIntegerv (GL_MAJOR_VERSION, major);
61
61
glGetIntegerv (GL_MINOR_VERSION, minor);
62
+
63
+ CHECK_GL_INIT_ERROR_FOR_OPTIMIZED_BUILD (utils::slog.e )
64
+
62
65
return (glGetError () == GL_NO_ERROR);
63
66
#endif
64
67
}
@@ -109,6 +112,8 @@ OpenGLContext::OpenGLContext(OpenGLPlatform& platform,
109
112
glGetIntegerv (GL_MAX_3D_TEXTURE_SIZE, &gets .max_3d_texture_size );
110
113
glGetIntegerv (GL_MAX_ARRAY_TEXTURE_LAYERS, &gets .max_array_texture_layers );
111
114
115
+ CHECK_GL_INIT_ERROR_FOR_OPTIMIZED_BUILD (utils::slog.e )
116
+
112
117
mFeatureLevel = resolveFeatureLevel (state.major , state.minor , ext, gets , bugs);
113
118
114
119
#ifdef BACKEND_OPENGL_VERSION_GLES
@@ -149,6 +154,7 @@ OpenGLContext::OpenGLContext(OpenGLPlatform& platform,
149
154
glGetIntegerv (GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT,
150
155
&gets .uniform_buffer_offset_alignment );
151
156
#endif
157
+ CHECK_GL_INIT_ERROR_FOR_OPTIMIZED_BUILD (utils::slog.e )
152
158
}
153
159
154
160
#ifdef BACKEND_OPENGL_VERSION_GLES
@@ -235,6 +241,7 @@ OpenGLContext::OpenGLContext(OpenGLPlatform& platform,
235
241
}
236
242
#endif
237
243
#endif
244
+ CHECK_GL_INIT_ERROR_FOR_OPTIMIZED_BUILD (utils::slog.e )
238
245
239
246
// in practice KHR_Debug has never been useful, and actually is confusing. We keep this
240
247
// only for our own debugging, in case we need it some day.
@@ -269,6 +276,7 @@ OpenGLContext::OpenGLContext(OpenGLPlatform& platform,
269
276
glDebugMessageCallback (cb, nullptr );
270
277
}
271
278
#endif
279
+ CHECK_GL_INIT_ERROR_FOR_OPTIMIZED_BUILD (utils::slog.e )
272
280
273
281
mTimerQueryFactory = TimerQueryFactory::init (platform, *this );
274
282
}
@@ -384,6 +392,8 @@ void OpenGLContext::setDefaultState() noexcept {
384
392
glEnable (GL_CLIP_DISTANCE0);
385
393
glEnable (GL_CLIP_DISTANCE1);
386
394
}
395
+
396
+ CHECK_GL_INIT_ERROR_FOR_OPTIMIZED_BUILD (utils::slog.e )
387
397
}
388
398
389
399
@@ -761,6 +771,8 @@ void OpenGLContext::initExtensionsGLES(Extensions* ext, GLint major, GLint minor
761
771
ext->EXT_discard_framebuffer = true ;
762
772
ext->OES_vertex_array_object = true ;
763
773
}
774
+
775
+ CHECK_GL_INIT_ERROR_FOR_OPTIMIZED_BUILD (utils::slog.e )
764
776
}
765
777
766
778
#endif // BACKEND_OPENGL_VERSION_GLES
@@ -831,6 +843,8 @@ void OpenGLContext::initExtensionsGL(Extensions* ext, GLint major, GLint minor)
831
843
if (major > 4 || (major == 4 && minor >= 5 )) {
832
844
ext->EXT_clip_control = true ;
833
845
}
846
+
847
+ CHECK_GL_INIT_ERROR_FOR_OPTIMIZED_BUILD (utils::slog.e )
834
848
}
835
849
836
850
#endif // BACKEND_OPENGL_VERSION_GL
0 commit comments