Esempio n. 1
0
func (c *Context) ValidateProgram(program *Program) {
	if program == nil {
		gl.ValidateProgram(0)
		return
	}
	gl.ValidateProgram(program.uint32)
}
Esempio n. 2
0
func (s *Shader) compile() error {
	gl.LinkProgram(s.program)
	var result int32
	gl.GetProgramiv(s.program, gl.LINK_STATUS, &result)
	if result == 0 {
		return s.getProgramInfoLog("shader compilation error")
	}
	gl.ValidateProgram(s.program)
	gl.GetProgramiv(s.program, gl.VALIDATE_STATUS, &result)
	if result == 0 {
		return s.getProgramInfoLog("shader compilation error: %s")
	}

	return nil
}
Esempio n. 3
0
// ValidateProgram checks to see whether the executables contained in
// program can execute given the current OpenGL state.
//
// Typically only used for debugging.
//
// http://www.khronos.org/opengles/sdk/docs/man3/html/glValidateProgram.xhtml
func ValidateProgram(p Program) {
	gl.ValidateProgram(uint32(p.Value))
}
Esempio n. 4
0
// ValidateProgram checks to see whether the executables contained in
// program can execute given the current OpenGL state.
//
// Typically only used for debugging.
//
// http://www.khronos.org/opengles/sdk/docs/man3/html/glValidateProgram.xhtml
func ValidateProgram(p Program) {
	gl.ValidateProgram(p.Value)
}