graphics: Remove unused argument from projectionMatrix

This commit is contained in:
Hajime Hoshi 2018-02-24 23:33:28 +09:00
parent 9da5099060
commit c5d1f11d95
2 changed files with 2 additions and 3 deletions

View File

@ -213,8 +213,7 @@ func (c *drawImageCommand) Exec(indexOffsetInBytes int) error {
if n == 0 { if n == 0 {
return nil return nil
} }
_, dh := c.dst.Size() proj := f.projectionMatrix()
proj := f.projectionMatrix(dh)
theOpenGLState.useProgram(proj, c.src.texture.native, c.dst, c.src, c.color, c.filter) theOpenGLState.useProgram(proj, c.src.texture.native, c.dst, c.src, c.color, c.filter)
// TODO: We should call glBindBuffer here? // TODO: We should call glBindBuffer here?
// The buffer is already bound at begin() but it is counterintuitive. // The buffer is already bound at begin() but it is counterintuitive.

View File

@ -103,7 +103,7 @@ func (f *framebuffer) setAsViewport() {
// A projection matrix converts the coodinates on the framebuffer // A projection matrix converts the coodinates on the framebuffer
// (0, 0) - (viewport width, viewport height) // (0, 0) - (viewport width, viewport height)
// to the normalized device coodinates (-1, -1) - (1, 1) with adjustment. // 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 { if f.proMatrix != nil {
return f.proMatrix return f.proMatrix
} }