Skip to content

Commit

Permalink
Add comment about mipmap requiring POT textures
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz committed May 3, 2023
1 parent 0f0b25c commit 2936f60
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion korim/src/commonMain/kotlin/korlibs/image/bitmap/Bitmap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,13 @@ fun <T : Bitmap> T.checkMatchDimensions(other: T): T {
return other
}

/** Enable or disable mipmap generation for this [Bitmap] (Not used directly by KorIM, but KorGE) */
/**
* Enable or disable mipmap generation for this [Bitmap]
*
* Import: For this to work, both [Bitmap.width] and [Bitmap.height] must be power of two: 2, 4, 8, ..., 512, 1024, ..., 4096
*
* (Not used directly by KorIM, but KorGE)
* */
fun <T : Bitmap> T.mipmaps(enable: Boolean = true): T = this.apply { this.mipmaps = enable }

var Bitmap.baseMipmapLevel: Int? by Extra.Property { null }
Expand Down

0 comments on commit 2936f60

Please sign in to comment.