From f8a2d74a2d588280e8cf99bba88996b0ea7c7c9a Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 13 Apr 2025 21:22:17 +0800 Subject: [PATCH] [Fix] (buffer): better logging --- src/main/cpp/gl/buffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/cpp/gl/buffer.cpp b/src/main/cpp/gl/buffer.cpp index d356a10..5079460 100644 --- a/src/main/cpp/gl/buffer.cpp +++ b/src/main/cpp/gl/buffer.cpp @@ -185,6 +185,7 @@ void glBindBuffer(GLenum target, GLuint buffer) { modify_buffer(buffer, real_buffer); CHECK_GL_ERROR } + LOG_D("glBindBuffer: %d -> %d", buffer, real_buffer) GLES.glBindBuffer(target, real_buffer); CHECK_GL_ERROR } @@ -434,16 +435,19 @@ void glBindVertexArray(GLuint array) { LOG_D("glBindVertexArray(%d)", array) bound_array = array; if (!has_array(array) || array == 0) { + LOG_D("Does not have va=%d found!", array) GLES.glBindVertexArray(array); CHECK_GL_ERROR return; } GLuint real_array = find_real_array(array); if (!real_array) { + LOG_D("va=%d not initialized, initializing...", array) GLES.glGenVertexArrays(1, &real_array); modify_array(array, real_array); CHECK_GL_ERROR } + LOG_D("glBindVertexArray: %d -> %d", array, real_array) GLES.glBindVertexArray(real_array); CHECK_GL_ERROR }