예제 #1
0
파일: framebuffer.go 프로젝트: num5/steven
func BindFragDataLocation(p Program, cn int, name string) {
	n := gl.Str(name + "\x00")
	gl.BindFragDataLocation(uint32(p), uint32(cn), n)
}
예제 #2
0
파일: shader.go 프로젝트: num5/steven
// Source sets the source of the shader.
func (s Shader) Source(src string) {
	ss := gl.Str(src + "\x00")
	gl.ShaderSource(uint32(s), 1, &ss, nil)
}
예제 #3
0
파일: shader.go 프로젝트: num5/steven
// UniformLocation returns the uniform with the given name in
// the program.
func (p Program) UniformLocation(name string) Uniform {
	n := gl.Str(name + "\x00")
	return Uniform(gl.GetUniformLocation(uint32(p), n))
}
예제 #4
0
파일: shader.go 프로젝트: num5/steven
// AttributeLocation returns the attribute with the given name in
// the program.
func (p Program) AttributeLocation(name string) Attribute {
	n := gl.Str(name + "\x00")
	return Attribute(gl.GetAttribLocation(uint32(p), n))
}