| 49 | ) |
| 50 | |
| 51 | type basicShader struct { |
| 52 | BatchSize int |
| 53 | |
| 54 | indices []uint16 |
| 55 | indexBuffer *gl.Buffer |
| 56 | program *gl.Program |
| 57 | |
| 58 | vertices []float32 |
| 59 | vertexBuffer *gl.Buffer |
| 60 | lastTexture *gl.Texture |
| 61 | lastRepeating TextureRepeating |
| 62 | lastMagFilter, lastMinFilter ZoomFilter |
| 63 | |
| 64 | inPosition int |
| 65 | inTexCoords int |
| 66 | inColor int |
| 67 | |
| 68 | matrixProjView *gl.UniformLocation |
| 69 | |
| 70 | projectionMatrix *engo.Matrix |
| 71 | viewMatrix *engo.Matrix |
| 72 | projViewMatrix *engo.Matrix |
| 73 | modelMatrix *engo.Matrix |
| 74 | cullingMatrix *engo.Matrix |
| 75 | |
| 76 | projViewChange bool |
| 77 | |
| 78 | camera *CameraSystem |
| 79 | cameraEnabled bool |
| 80 | |
| 81 | idx int |
| 82 | } |
| 83 | |
| 84 | func (s *basicShader) Setup(w *ecs.World) error { |
| 85 | if s.BatchSize > MaxSprites { |
nothing calls this directly
no outgoing calls
no test coverage detected