コード例 #1
0
ファイル: gl_gl2.go プロジェクト: EngoEngine/gl
func (c *Context) ValidateProgram(program *Program) {
	if program == nil {
		gl.ValidateProgram(0)
		return
	}
	gl.ValidateProgram(program.uint32)
}
コード例 #2
0
ファイル: shader.go プロジェクト: theGeekPirate/wolfengo
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
}
コード例 #3
0
ファイル: gl_opengl.go プロジェクト: tanema/amore
// 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))
}
コード例 #4
0
ファイル: gl_opengl.go プロジェクト: carlTLR/gl
// 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)
}