Skip to content

Instantly share code, notes, and snippets.

@fedejordan
Last active July 29, 2022 05:18
Show Gist options
  • Save fedejordan/153ed5f2440a7b435016679444eb9339 to your computer and use it in GitHub Desktop.
Save fedejordan/153ed5f2440a7b435016679444eb9339 to your computer and use it in GitHub Desktop.
Blog16 - Initial LibGDX3DTest.kt
package com.fedejordan.libgdx3dtest
import com.badlogic.gdx.ApplicationAdapter
import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.utils.ScreenUtils
class LibGDX3DTest: ApplicationAdapter() {
private lateinit var batch: SpriteBatch
private lateinit var img: Texture
override fun create() {
super.create()
batch = SpriteBatch()
img = Texture("badlogic.jpg")
}
override fun render() {
super.render()
ScreenUtils.clear(1f, 0f, 0f, 1f)
batch.begin()
batch.draw(img, 0f, 0f)
batch.end()
}
override fun dispose() {
super.dispose()
batch.dispose()
img.dispose()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment