Last active
July 29, 2022 05:18
-
-
Save fedejordan/153ed5f2440a7b435016679444eb9339 to your computer and use it in GitHub Desktop.
Blog16 - Initial LibGDX3DTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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