all repos — mgba @ be2641c77b4a438e0db487bc82b43bc27a26e0c2

mGBA Game Boy Advance Emulator

OpenGL: Log shader compilation failure
Jeffrey Pfau jeffrey@endrift.com
Sun, 06 Mar 2016 18:36:36 -0800
commit

be2641c77b4a438e0db487bc82b43bc27a26e0c2

parent

9d0865d5d4ed433f629811e8372d307b46e6a6d5

2 files changed, 8 insertions(+), 3 deletions(-)

jump to
M CHANGESCHANGES

@@ -27,6 +27,7 @@ - Qt: Update 360 input profile on OS X to reflect newer drivers

- Qt: Remove use of NaN - 3DS: Use blip_add_delta_fast for a small speed improvement - FFmpeg: Update dependencies on Ubuntu + - OpenGL: Log shader compilation failure 0.4.0: (2016-02-02) Features:
M src/platform/opengl/gles2.csrc/platform/opengl/gles2.c

@@ -5,10 +5,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this

* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "gles2.h" +#include "core/log.h" #include "util/configuration.h" #include "util/formatting.h" #include "util/vector.h" #include "util/vfs.h" + +mLOG_DECLARE_CATEGORY(OPENGL); +mLOG_DEFINE_CATEGORY(OPENGL, "OpenGL"); #define MAX_PASSES 8

@@ -381,17 +385,17 @@ char log[1024];

glCompileShader(shader->fragmentShader); glGetShaderInfoLog(shader->fragmentShader, 1024, 0, log); if (log[0]) { - printf("%s\n", log); + mLOG(OPENGL, ERROR, "%s\n", log); } glCompileShader(shader->vertexShader); glGetShaderInfoLog(shader->vertexShader, 1024, 0, log); if (log[0]) { - printf("%s\n", log); + mLOG(OPENGL, ERROR, "%s\n", log); } glLinkProgram(shader->program); glGetProgramInfoLog(shader->program, 1024, 0, log); if (log[0]) { - printf("%s\n", log); + mLOG(OPENGL, ERROR, "%s\n", log); } shader->texLocation = glGetUniformLocation(shader->program, "tex");