renderer_opengl: Drop macros for message decorations
This commit is contained in:
parent
056f049b26
commit
75cc501d52
@ -97,40 +97,45 @@ std::array<GLfloat, 3 * 2> MakeOrthographicMatrix(float width, float height) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char* GetSource(GLenum source) {
|
const char* GetSource(GLenum source) {
|
||||||
#define RET(s) \
|
|
||||||
case GL_DEBUG_SOURCE_##s: \
|
|
||||||
return #s
|
|
||||||
switch (source) {
|
switch (source) {
|
||||||
RET(API);
|
case GL_DEBUG_SOURCE_API:
|
||||||
RET(WINDOW_SYSTEM);
|
return "API";
|
||||||
RET(SHADER_COMPILER);
|
case GL_DEBUG_SOURCE_WINDOW_SYSTEM:
|
||||||
RET(THIRD_PARTY);
|
return "WINDOW_SYSTEM";
|
||||||
RET(APPLICATION);
|
case GL_DEBUG_SOURCE_SHADER_COMPILER:
|
||||||
RET(OTHER);
|
return "SHADER_COMPILER";
|
||||||
|
case GL_DEBUG_SOURCE_THIRD_PARTY:
|
||||||
|
return "THIRD_PARTY";
|
||||||
|
case GL_DEBUG_SOURCE_APPLICATION:
|
||||||
|
return "APPLICATION";
|
||||||
|
case GL_DEBUG_SOURCE_OTHER:
|
||||||
|
return "OTHER";
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return "Unknown source";
|
return "Unknown source";
|
||||||
}
|
}
|
||||||
#undef RET
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* GetType(GLenum type) {
|
const char* GetType(GLenum type) {
|
||||||
#define RET(t) \
|
|
||||||
case GL_DEBUG_TYPE_##t: \
|
|
||||||
return #t
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
RET(ERROR);
|
case GL_DEBUG_TYPE_ERROR:
|
||||||
RET(DEPRECATED_BEHAVIOR);
|
return "ERROR";
|
||||||
RET(UNDEFINED_BEHAVIOR);
|
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
|
||||||
RET(PORTABILITY);
|
return "DEPRECATED_BEHAVIOR";
|
||||||
RET(PERFORMANCE);
|
case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
|
||||||
RET(OTHER);
|
return "UNDEFINED_BEHAVIOR";
|
||||||
RET(MARKER);
|
case GL_DEBUG_TYPE_PORTABILITY:
|
||||||
|
return "PORTABILITY";
|
||||||
|
case GL_DEBUG_TYPE_PERFORMANCE:
|
||||||
|
return "PERFORMANCE";
|
||||||
|
case GL_DEBUG_TYPE_OTHER:
|
||||||
|
return "OTHER";
|
||||||
|
case GL_DEBUG_TYPE_MARKER:
|
||||||
|
return "MARKER";
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return "Unknown type";
|
return "Unknown type";
|
||||||
}
|
}
|
||||||
#undef RET
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
|
void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
|
||||||
|
Loading…
Reference in New Issue
Block a user