//UNIFORMS ----------------------------------- func (p *Program) ResetUniforms() { for i := 0; i < globals.MaxLights; i++ { name := fmt.Sprintf("uLightSource[%v].enabled") p.UniformBool(name, false) //disable } p.SetTextureMatrix(mat4.Identity()) p.SetModelMatrix(mat4.Identity()) p.SetNormalMatrix(mat3.Identity()) p.UniformFloat("uFarClipplane", GFarClipplane) }
func (t *Nurbs) Render() { t.vbo.Enable() if globals.UseShader { program.SetModelMatrix(mat4.Identity()) t.vbo.Draw(gl.TRIANGLES) } else { gl.PushMatrix() gl.MultMatrixf(mat4.Identity().Ptr32()) t.vbo.Draw(gl.TRIANGLES) gl.PopMatrix() } t.vbo.Disable() }
func (this *Window) resetModelViewMatrix() { if globals.UseShader { program.SetModelMatrix(mat4.Identity()) } gl.MatrixMode(gl.MODELVIEW) gl.LoadIdentity() }
func (s *Spline) Render() { if globals.UseShader { program.SetModelMatrix(mat4.Identity()) } s.vbo.Enable() s.vbo.Draw(gl.TRIANGLES) s.vbo.Disable() }