(c *CameraSystem)
| 404 | } |
| 405 | |
| 406 | func (s *basicShader) SetCamera(c *CameraSystem) { |
| 407 | s.projViewChange = true |
| 408 | if s.cameraEnabled { |
| 409 | s.camera = c |
| 410 | s.viewMatrix.Identity().Translate(-s.camera.x, -s.camera.y).Rotate(s.camera.angle) |
| 411 | } else { |
| 412 | scaleX, scaleY := s.projectionMatrix.ScaleComponent() |
| 413 | s.viewMatrix.Translate(-1/scaleX, 1/scaleY) |
| 414 | } |
| 415 | } |
nothing calls this directly
no test coverage detected