Beispiel #1
0
func BindFragDataLocation(p Program, cn int, name string) {
	n := gl.Str(name + "\x00")
	gl.BindFragDataLocation(uint32(p), uint32(cn), n)
}
Beispiel #2
0
// 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)
}
Beispiel #3
0
// 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))
}
Beispiel #4
0
// 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))
}