Esempio n. 1
0
func (this *Window) resetModelViewMatrix() {
	if globals.UseShader {
		program.SetModelMatrix(mat4.Identity())
	}
	gl.MatrixMode(gl.MODELVIEW)
	gl.LoadIdentity()
}
Esempio n. 2
0
func (s *Spline) Render() {
	if globals.UseShader {
		program.SetModelMatrix(mat4.Identity())
	}
	s.vbo.Enable()
	s.vbo.Draw(gl.TRIANGLES)
	s.vbo.Disable()
}
Esempio n. 3
0
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()
	}
}
Esempio n. 4
0
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()
}