mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-14 23:17:27 +01:00
internal/graphicscommand: refactoring
This commit is contained in:
parent
6fd9044bcf
commit
6cf235daef
@ -18,6 +18,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"image"
|
"image"
|
||||||
"math"
|
"math"
|
||||||
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/v2/internal/graphics"
|
"github.com/hajimehoshi/ebiten/v2/internal/graphics"
|
||||||
@ -187,14 +188,9 @@ func (c *drawTrianglesCommand) CanMergeWithDrawTrianglesCommand(dst *Image, srcs
|
|||||||
if c.shader != shader {
|
if c.shader != shader {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if len(c.uniforms) != len(uniforms) {
|
if !slices.Equal(c.uniforms, uniforms) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for i := range c.uniforms {
|
|
||||||
if c.uniforms[i] != uniforms[i] {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if c.dst != dst {
|
if c.dst != dst {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user