From 553361b81a69b0a86cec4664e7895ef8dd5f08e3 Mon Sep 17 00:00:00 2001 From: BZLZHH <69153940+BZLZHH@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:34:29 +0800 Subject: [PATCH] [Fix] (TestDrawing.cpp): Fix the wrong gl stub callings. --- MG/MG_RHI/GLES/Test/TestDrawing.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MG/MG_RHI/GLES/Test/TestDrawing.cpp b/MG/MG_RHI/GLES/Test/TestDrawing.cpp index 0d1830ba..e3123ea2 100644 --- a/MG/MG_RHI/GLES/Test/TestDrawing.cpp +++ b/MG/MG_RHI/GLES/Test/TestDrawing.cpp @@ -54,13 +54,13 @@ namespace MG_RHI::GLES::Test { FragColor = texture(uTex, vUV); })"; - GLuint vs = glCreateShader(GL_VERTEX_SHADER); - GLuint fs = glCreateShader(GL_FRAGMENT_SHADER); + GLuint vs = ::GLES::glCreateShader(GL_VERTEX_SHADER); + GLuint fs = ::GLES::glCreateShader(GL_FRAGMENT_SHADER); ::GLES::glShaderSource(vs, 1, &vsSrc, NULL); ::GLES::glShaderSource(fs, 1, &fsSrc, NULL); ::GLES::glCompileShader(vs); ::GLES::glCompileShader(fs); - sRes.program = glCreateProgram(); + sRes.program = ::GLES::glCreateProgram(); ::GLES::glAttachShader(sRes.program, vs); ::GLES::glAttachShader(sRes.program, fs); ::GLES::glLinkProgram(sRes.program); @@ -154,7 +154,7 @@ namespace MG_RHI::GLES::Test { } } - GLboolean origDepthTest = glIsEnabled(GL_DEPTH_TEST); + GLboolean origDepthTest = ::GLES::glIsEnabled(GL_DEPTH_TEST); GLint origProgram; GLint origViewport[4]; ::GLES::glGetIntegerv(GL_VIEWPORT, origViewport); @@ -168,7 +168,7 @@ namespace MG_RHI::GLES::Test { ::GLES::glBindVertexArray(sRes.quadVAO); glm::mat4 proj = glm::ortho(-1.0f, 1.0f, -1.0f, 1.0f); - GLint uMVPLoc = glGetUniformLocation(sRes.program, "uMVP"); + GLint uMVPLoc = ::GLES::glGetUniformLocation(sRes.program, "uMVP"); glm::mat4 identity(1.0f); ::GLES::glUniformMatrix4fv(uMVPLoc, 1, GL_FALSE, &identity[0][0]);