Closed CrushedPixel closed 5 years ago
Thanks! I didn't know this was an issue.
Yeah, this is definitely an obscure one. Perhaps printing out the shader compilation error information would be helpful?
Something along the lines of
int success;
char info[512];
glGetShaderiv(vertexShaderHandle, GL_COMPILE_STATUS, &success);
if (!success) {
glGetShaderInfoLog(vertexShaderHandle, 512, nullptr, info);
std::cout << "vertex shader compilation failed\n" << info << "\n";
}
Some GPUs, for example the Intel GPUs built into most MacBook models, don't support specifying floating-point values with integers in GLSL shaders. Therefore, the constant
1
in the context of avec2
must be changed to1.0
to make the vertex shader compile on these GPUs.I had this issue on my Late 2013 MacBook Pro with the Built-in Intel Iris GPU. This small modification fixed the issue of the vertex shader not compiling on my system.
This should resolve issue #20.