trillek-team / trillek-vcomputer-module

Trillek Virtual Computer implementation
GNU Lesser General Public License v3.0
46 stars 12 forks source link

Fixed the shader compilation error check condition #68

Closed capturcus closed 7 years ago

capturcus commented 7 years ago

In tools/src/gl_engine.cpp where shaders are compiled, in shader compilation error handling, a check is performed whether the compilation actually failed (lines 297, 311). The condition actually checked is vertexshader_error_msg[0] != '\0'. This makes the emulator think that the compilation failed, while the Result variable is equal to GL_TRUE, which according to the docs (https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGetShaderiv.xml) means that compilation finished succesfully. InfoLogLength is also equal to 0. I changed the condition being checked according to the documentation. This makes the computer emulator work on my machine.