
ktx.app.graphics.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktx-app Show documentation
Show all versions of ktx-app Show documentation
LibGDX general utilities for Kotlin applications.
package ktx.app
import com.badlogic.gdx.utils.ScreenUtils
/**
* Clears current screen with the selected color. Inlined to lower the total method count. Assumes alpha is 1f.
* Clears depth by default.
* @param red red color value.
* @param green green color value.
* @param blue blue color value.
* @param alpha color alpha value. Optional, defaults to 1f (non-transparent).
* @param clearDepth adds the GL_DEPTH_BUFFER_BIT mask if true.
* @see ScreenUtils.clear
*/
@Suppress("NOTHING_TO_INLINE")
inline fun clearScreen(
red: Float,
green: Float,
blue: Float,
alpha: Float = 1f,
clearDepth: Boolean = true,
) {
ScreenUtils.clear(red, green, blue, alpha, clearDepth)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy