@@ -130,46 +130,51 @@ void RasterizerGLES3::end_frame(bool p_swap_buffers) {
130
130
131
131
#ifdef CAN_DEBUG
132
132
static void GLAPIENTRY _gl_debug_print (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam) {
133
- if (type == _EXT_DEBUG_TYPE_OTHER_ARB)
133
+ if (type == _EXT_DEBUG_TYPE_OTHER_ARB) {
134
134
return ;
135
+ }
135
136
136
- if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB)
137
+ if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB) {
137
138
return ; // these are ultimately annoying, so removing for now
139
+ }
138
140
139
141
char debSource[256 ], debType[256 ], debSev[256 ];
140
142
141
- if (source == _EXT_DEBUG_SOURCE_API_ARB)
143
+ if (source == _EXT_DEBUG_SOURCE_API_ARB) {
142
144
strcpy (debSource, " OpenGL" );
143
- else if (source == _EXT_DEBUG_SOURCE_WINDOW_SYSTEM_ARB)
145
+ } else if (source == _EXT_DEBUG_SOURCE_WINDOW_SYSTEM_ARB) {
144
146
strcpy (debSource, " Windows" );
145
- else if (source == _EXT_DEBUG_SOURCE_SHADER_COMPILER_ARB)
147
+ } else if (source == _EXT_DEBUG_SOURCE_SHADER_COMPILER_ARB) {
146
148
strcpy (debSource, " Shader Compiler" );
147
- else if (source == _EXT_DEBUG_SOURCE_THIRD_PARTY_ARB)
149
+ } else if (source == _EXT_DEBUG_SOURCE_THIRD_PARTY_ARB) {
148
150
strcpy (debSource, " Third Party" );
149
- else if (source == _EXT_DEBUG_SOURCE_APPLICATION_ARB)
151
+ } else if (source == _EXT_DEBUG_SOURCE_APPLICATION_ARB) {
150
152
strcpy (debSource, " Application" );
151
- else if (source == _EXT_DEBUG_SOURCE_OTHER_ARB)
153
+ } else if (source == _EXT_DEBUG_SOURCE_OTHER_ARB) {
152
154
strcpy (debSource, " Other" );
155
+ }
153
156
154
- if (type == _EXT_DEBUG_TYPE_ERROR_ARB)
157
+ if (type == _EXT_DEBUG_TYPE_ERROR_ARB) {
155
158
strcpy (debType, " Error" );
156
- else if (type == _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB)
159
+ } else if (type == _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB) {
157
160
strcpy (debType, " Deprecated behavior" );
158
- else if (type == _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB)
161
+ } else if (type == _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB) {
159
162
strcpy (debType, " Undefined behavior" );
160
- else if (type == _EXT_DEBUG_TYPE_PORTABILITY_ARB)
163
+ } else if (type == _EXT_DEBUG_TYPE_PORTABILITY_ARB) {
161
164
strcpy (debType, " Portability" );
162
- else if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB)
165
+ } else if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB) {
163
166
strcpy (debType, " Performance" );
164
- else if (type == _EXT_DEBUG_TYPE_OTHER_ARB)
167
+ } else if (type == _EXT_DEBUG_TYPE_OTHER_ARB) {
165
168
strcpy (debType, " Other" );
169
+ }
166
170
167
- if (severity == _EXT_DEBUG_SEVERITY_HIGH_ARB)
171
+ if (severity == _EXT_DEBUG_SEVERITY_HIGH_ARB) {
168
172
strcpy (debSev, " High" );
169
- else if (severity == _EXT_DEBUG_SEVERITY_MEDIUM_ARB)
173
+ } else if (severity == _EXT_DEBUG_SEVERITY_MEDIUM_ARB) {
170
174
strcpy (debSev, " Medium" );
171
- else if (severity == _EXT_DEBUG_SEVERITY_LOW_ARB)
175
+ } else if (severity == _EXT_DEBUG_SEVERITY_LOW_ARB) {
172
176
strcpy (debSev, " Low" );
177
+ }
173
178
174
179
String output = String () + " GL ERROR: Source: " + debSource + " \t Type: " + debType + " \t ID: " + itos (id) + " \t Severity: " + debSev + " \t Message: " + message;
175
180
@@ -203,7 +208,7 @@ void RasterizerGLES3::initialize() {
203
208
if (OS::get_singleton ()->is_stdout_verbose ()) {
204
209
if (GLAD_GL_ARB_debug_output) {
205
210
glEnable (_EXT_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
206
- glDebugMessageCallbackARB (_gl_debug_print, NULL );
211
+ glDebugMessageCallbackARB (_gl_debug_print, nullptr );
207
212
glEnable (_EXT_DEBUG_OUTPUT);
208
213
} else {
209
214
print_line (" OpenGL debugging not supported!" );
@@ -215,12 +220,12 @@ void RasterizerGLES3::initialize() {
215
220
#ifdef CAN_DEBUG
216
221
#ifdef GLES_OVER_GL
217
222
if (OS::get_singleton ()->is_stdout_verbose () && GLAD_GL_ARB_debug_output) {
218
- glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_ERROR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , NULL , GL_TRUE);
219
- glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , NULL , GL_TRUE);
220
- glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , NULL , GL_TRUE);
221
- glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_PORTABILITY_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , NULL , GL_TRUE);
222
- glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_PERFORMANCE_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , NULL , GL_TRUE);
223
- glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_OTHER_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , NULL , GL_TRUE);
223
+ glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_ERROR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , nullptr , GL_TRUE);
224
+ glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , nullptr , GL_TRUE);
225
+ glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , nullptr , GL_TRUE);
226
+ glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_PORTABILITY_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , nullptr , GL_TRUE);
227
+ glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_PERFORMANCE_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , nullptr , GL_TRUE);
228
+ glDebugMessageControlARB (_EXT_DEBUG_SOURCE_API_ARB, _EXT_DEBUG_TYPE_OTHER_ARB, _EXT_DEBUG_SEVERITY_HIGH_ARB, 0 , nullptr , GL_TRUE);
224
229
// glDebugMessageInsertARB(
225
230
// GL_DEBUG_SOURCE_API_ARB,
226
231
// GL_DEBUG_TYPE_OTHER_ARB, 1,
@@ -299,8 +304,9 @@ void RasterizerGLES3::blit_render_targets_to_screen(DisplayServer::WindowID p_sc
299
304
}
300
305
301
306
void RasterizerGLES3::set_boot_image (const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter) {
302
- if (p_image.is_null () || p_image->is_empty ())
307
+ if (p_image.is_null () || p_image->is_empty ()) {
303
308
return ;
309
+ }
304
310
305
311
Size2i win_size = DisplayServer::get_singleton ()->screen_get_size ();
306
312
0 commit comments