Start trying to improve support for KHR_debug

This commit is contained in:
Joshua Granick
2018-02-27 09:00:58 -08:00
parent 440d0b8866
commit 14ff4649f7

View File

@@ -183,6 +183,13 @@ namespace lime {
}
void GLAPIENTRY gl_debug_callback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam) {
puts (message);
}
void lime_gl_active_texture (int texture) {
glActiveTexture (texture);
@@ -1156,6 +1163,16 @@ namespace lime {
if (!init) {
if (strcmp (name.__s, "KHR_debug") == 0) {
#ifdef LIME_GLES
glDebugMessageCallbackKHR ((GLDEBUGPROCARB)gl_debug_callback, NULL);
#elif !defined(HX_MACOS)
glDebugMessageCallback ((GLDEBUGPROCARB)gl_debug_callback, NULL);
#endif
}
init = true;
kind_share (&functionKind, "function");