示例#1
0
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))
}