Start trying to improve support for KHR_debug
This commit is contained in:
@@ -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) {
|
void lime_gl_active_texture (int texture) {
|
||||||
|
|
||||||
glActiveTexture (texture);
|
glActiveTexture (texture);
|
||||||
@@ -1156,6 +1163,16 @@ namespace lime {
|
|||||||
|
|
||||||
if (!init) {
|
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;
|
init = true;
|
||||||
kind_share (&functionKind, "function");
|
kind_share (&functionKind, "function");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user