mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
vector: use WritePixels instead of Fill for whiteImage
This commit is contained in:
parent
e53118235b
commit
c76201090a
@ -28,7 +28,13 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
whiteImage.Fill(color.White)
|
||||
b := whiteImage.Bounds()
|
||||
pix := make([]byte, 4*b.Dx()*b.Dy())
|
||||
for i := range pix {
|
||||
pix[i] = 0xff
|
||||
}
|
||||
// This is hacky, but WritePixels is better than Fill in term of automatic texture packing.
|
||||
whiteImage.WritePixels(pix)
|
||||
}
|
||||
|
||||
func drawVerticesForUtil(dst *ebiten.Image, vs []ebiten.Vertex, is []uint16, clr color.Color) {
|
||||
|
Loading…
Reference in New Issue
Block a user