diff --git a/internal/graphics/command.go b/internal/graphics/command.go index 5beb3aa2f..010f21759 100644 --- a/internal/graphics/command.go +++ b/internal/graphics/command.go @@ -213,8 +213,7 @@ func (c *drawImageCommand) Exec(indexOffsetInBytes int) error { if n == 0 { return nil } - _, dh := c.dst.Size() - proj := f.projectionMatrix(dh) + proj := f.projectionMatrix() theOpenGLState.useProgram(proj, c.src.texture.native, c.dst, c.src, c.color, c.filter) // TODO: We should call glBindBuffer here? // The buffer is already bound at begin() but it is counterintuitive. diff --git a/internal/graphics/framebuffer.go b/internal/graphics/framebuffer.go index 66cec60d8..a4f941226 100644 --- a/internal/graphics/framebuffer.go +++ b/internal/graphics/framebuffer.go @@ -103,7 +103,7 @@ func (f *framebuffer) setAsViewport() { // A projection matrix converts the coodinates on the framebuffer // (0, 0) - (viewport width, viewport height) // to the normalized device coodinates (-1, -1) - (1, 1) with adjustment. -func (f *framebuffer) projectionMatrix(height int) []float32 { +func (f *framebuffer) projectionMatrix() []float32 { if f.proMatrix != nil { return f.proMatrix }