mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 03:15:35 -04:00
animated textures: fix mipmap generation
This commit is contained in:
parent
835a28bae9
commit
be61c3c84d
@ -61,10 +61,10 @@ class MemoryTexture(
|
||||
data.put(index++, pixel.alpha.toByte())
|
||||
}
|
||||
}
|
||||
this.mipmapData = generateMipMaps(data)
|
||||
}
|
||||
|
||||
this.data = data
|
||||
this.mipmapData = generateMipMaps(data)
|
||||
}
|
||||
|
||||
override val state: TextureStates = TextureStates.LOADED
|
||||
|
@ -61,6 +61,7 @@ class SpriteTexture(private val original: AbstractTexture) : AbstractTexture {
|
||||
splitTexture.data!!.let {
|
||||
it.copyFrom(original.data!!, bytesPerTexture * i, 0, bytesPerTexture)
|
||||
it.flip()
|
||||
splitTexture.mipmapData = splitTexture.generateMipMaps(it)
|
||||
}
|
||||
splitTextures += splitTexture
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user