The following code is showing different results. In debug, the shaders appear compiled and the program operates fine, in release, this code fails, and the shaders don’t seem to work well either.
bool GLSLShader::IsCompiled() const
{
std::cout << "GLSLShader: checking compile status for id = " << _id << std::endl;
GLint result( GL_FALSE );
glGetObjectParameterivARB( _id , GL_OBJECT_COMPILE_STATUS_ARB , &result );
return( result==GL_TRUE );
}
I’ve verified that the shader source code is being loaded the same for both builds. Does anyone know why the shaders would work in debug builds and not release?
There is one more strange aspect to this. My program has 4 shaders in total, 2 vertex and 2 fragment. The first vertex shader shows no problems when I check the compile status. However, checking all other shaders after this check fails. Again, this only happens in release builds running from the command line. Running from the IDE with either build seems to work.