mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
graphicsdriver/opengl: Refactoring
This commit is contained in:
parent
d927241223
commit
3d8a45a770
@ -322,10 +322,9 @@ func (d *Driver) useProgram(mode graphics.CompositeMode, colorM *affine.ColorM,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if filter != graphics.FilterNearest {
|
||||||
sw := graphics.InternalImageSize(srcW)
|
sw := graphics.InternalImageSize(srcW)
|
||||||
sh := graphics.InternalImageSize(srcH)
|
sh := graphics.InternalImageSize(srcH)
|
||||||
|
|
||||||
if filter != graphics.FilterNearest {
|
|
||||||
if d.state.lastSourceWidth != sw || d.state.lastSourceHeight != sh {
|
if d.state.lastSourceWidth != sw || d.state.lastSourceHeight != sh {
|
||||||
d.context.uniformFloats(program, "source_size", []float32{float32(sw), float32(sh)})
|
d.context.uniformFloats(program, "source_size", []float32{float32(sw), float32(sh)})
|
||||||
d.state.lastSourceWidth = sw
|
d.state.lastSourceWidth = sw
|
||||||
|
Loading…
Reference in New Issue
Block a user