Day 368 - GL improvements
7 months, 3 weeks ago
Couldn't catch the stream live, but here are couple comments on today's code.
Instead of checking validation on program you should use check compile and link status. Compile/link status is exactly what it says - if compilation of shader, or linking of program succeeded or failed. Validate does a bit more. For example, for core context it checks if currently there is non zero VAO bound. Basically anything that might make glDrawArrays/glDrawElements to fail at place where the glValidateProgram is called. This is probably not what you want, because I assume you won't be bounding buffers, setting attribute pointers & friends at shader compilation place.
Visual Studio 2013 supports C++11 raw string literals that can be multiline. So instead of this:
you can write
which is maybe a bit nicer to use. And it will put \n symbols automatically in the string for better error reporting so. GCC and clang supports this C++11 feature for many years already.