Пример #1
0
func (s *VoxelsMesh) Render(camera *glutils.Camera,
	program *glutils.ShaderProgram, bindfunc func(prog *glutils.ShaderProgram)) {

	s.Process()

	for id, _ := range s.blockArray {
		block := &s.blockArray[id]
		if block.Mesh != nil {
			rop := glutils.NewShaderRenderOp(
				false, program, bindfunc, block.Mesh)
			rop.Render(camera, v.MatrixOne())
		}
	}
}
Пример #2
0
func (self *Camera) SetModelviewOne() {
	self.ModelviewMatrix = *v.MatrixOne()
}