示例#1
0
文件: ogl_graphics.go 项目: chsc/g3
func (p *openGLShader) SetTexture(location uint, unit uint) {
	p.program.Use()
	gl.UniformLocation(location).Uniform1i(int(unit))
}
示例#2
0
文件: ogl_graphics.go 项目: chsc/g3
func (p *openGLShader) SetVec3(location uint, v *Vec3) {
	p.program.Use()
	gl.UniformLocation(location).Uniform3f(v.X, v.Y, v.Z)
}