![]() | ProgramValidate Method |
Namespace: Ooogles
Exception | Condition |
---|---|
ShaderException | With any validation errors. |
If validation is successful, the program is guaranteed to execute given the current state. Otherwise, the program is guaranteed to not execute.
This function is typically useful only during application development. The informational string stored in the exception message is completely implementation dependent; therefore, an application should not expect different OpenGL implementations to produce identical information strings.
Note: this function mimics the validation operation that OpenGL implementations must perform when rendering commands are issued while programmable shaders are part of current state. The error InvalidOperation will be generated by DrawArrays(glPrimitiveType, Int32) or DrawElements(glPrimitiveType, Byte) if any two active samplers in the current program object are of different types, but refer to the same texture image unit.
Note: it may be difficult or cause a performance degradation for applications to catch these errors when rendering commands are issued. Therefore, applications are advised to make calls to Validate to detect these issues during application development.
OpenGL API: glValidateProgram, glGetProgramInfoLog, glGetProgramiv(GL_VALIDATE_STATUS/GL_INFO_LOG_LENGTH)