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() }
func (m *Model) Render() { if globals.UseShader { program.SetModelMatrix(m.Mat) m.data.Render() } else { gl.PushMatrix() gl.MultMatrixf(m.Mat.Ptr32()) m.data.Render() gl.PopMatrix() } }
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() }