Fixed bugs in BRDF tools. Extended GLUS.

Added debug function in GLUS: Logging with glGetError() output.