mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
graphicsdriver/metal: Bug fix: Some tests failed due to wrong source size
This commit is contained in:
parent
7a76a5b42d
commit
a1b1bce43a
@ -581,10 +581,10 @@ func (d *Driver) Draw(indexLen int, indexOffset int, mode graphics.CompositeMode
|
||||
rce.SetVertexBytes(unsafe.Pointer(&viewportSize[0]), unsafe.Sizeof(viewportSize), 1)
|
||||
|
||||
sourceSize := [...]float32{float32(1), float32(1)}
|
||||
for sourceSize[0] < float32(w) {
|
||||
for sourceSize[0] < float32(d.src.width) {
|
||||
sourceSize[0] *= 2
|
||||
}
|
||||
for sourceSize[1] < float32(h) {
|
||||
for sourceSize[1] < float32(d.src.height) {
|
||||
sourceSize[1] *= 2
|
||||
}
|
||||
rce.SetFragmentBytes(unsafe.Pointer(&sourceSize[0]), unsafe.Sizeof(sourceSize), 2)
|
||||
|
Loading…
Reference in New Issue
Block a user