1
0
forked from 0ad/0ad

Fix OpenGL ES build after ae32055c9b.

This was SVN commit r26163.
This commit is contained in:
Stan 2022-01-04 00:21:37 +00:00
parent 2f90becb28
commit 3d2be697a2
2 changed files with 23 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -91,6 +91,25 @@
// GL_KHR_debug
#define glPopDebugGroupKHR glPopDebugGroup
#define glPushDebugGroupKHR glPushDebugGroup
#define GL_DEBUG_SOURCE_API_KHR GL_DEBUG_SOURCE_API
#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR GL_DEBUG_SOURCE_WINDOW_SYSTEM
#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR GL_DEBUG_SOURCE_SHADER_COMPILER
#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR GL_DEBUG_SOURCE_THIRD_PARTY
#define GL_DEBUG_SOURCE_APPLICATION_KHR GL_DEBUG_SOURCE_APPLICATION
#define GL_DEBUG_SOURCE_OTHER_KHR GL_DEBUG_SOURCE_OTHER
#define GL_DEBUG_TYPE_ERROR_KHR GL_DEBUG_TYPE_ERROR
#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR
#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR
#define GL_DEBUG_TYPE_PORTABILITY_KHR GL_DEBUG_TYPE_PORTABILITY
#define GL_DEBUG_TYPE_PERFORMANCE_KHR GL_DEBUG_TYPE_PERFORMANCE
#define GL_DEBUG_TYPE_OTHER_KHR GL_DEBUG_TYPE_OTHER
#define GL_DEBUG_TYPE_MARKER_KHR GL_DEBUG_TYPE_MARKER
#define GL_DEBUG_TYPE_PUSH_GROUP_KHR GL_DEBUG_TYPE_PUSH_GROUP
#define GL_DEBUG_TYPE_POP_GROUP_KHR GL_DEBUG_TYPE_POP_GROUP
#define GL_DEBUG_SEVERITY_HIGH_KHR GL_DEBUG_SEVERITY_HIGH
#define GL_DEBUG_SEVERITY_MEDIUM_KHR GL_DEBUG_SEVERITY_MEDIUM
#define GL_DEBUG_SEVERITY_LOW_KHR GL_DEBUG_SEVERITY_LOW
#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR GL_DEBUG_SEVERITY_NOTIFICATION
#endif // CONFIG2_GLES

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -375,6 +375,7 @@ void ogl_WarnIfErrorLoc(const char *file, int line)
debug_printf("%s:%d: OpenGL error(s) occurred: %s (%04x)\n", file, line, ogl_GetErrorName(first_error), (unsigned int)first_error);
}
#if KHR_DEBUG_ENABLED
void GLAD_API_PTR ogl_OnDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei UNUSED(length), const GLchar* message, const void* UNUSED(user_param))
{
std::string debugSource = "unknown";
@ -452,6 +453,7 @@ void GLAD_API_PTR ogl_OnDebugMessage(GLenum source, GLenum type, GLuint id, GLen
debug_printf("OpenGL | %s: %s source: %s id %u: %s\n", debugSeverity.c_str(), debugType.c_str(), debugSource.c_str(), id, message);
}
#endif
// ignore and reset the specified error (as returned by glGetError).