diff --git a/core/src/love/distributedrebirth/demo4d/MainScreen.java b/core/src/love/distributedrebirth/demo4d/MainScreen.java new file mode 100644 index 00000000..dcccbbf5 --- /dev/null +++ b/core/src/love/distributedrebirth/demo4d/MainScreen.java @@ -0,0 +1,31 @@ +package love.distributedrebirth.demo4d; + +import com.badlogic.gdx.ApplicationAdapter; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.utils.ScreenUtils; + +public class MainScreen extends ApplicationAdapter { + SpriteBatch batch; + BitmapFont font; + + @Override + public void create () { + batch = new SpriteBatch(); + font = new BitmapFont(); + } + + @Override + public void render () { + ScreenUtils.clear(1, 0, 0, 1); + batch.begin(); + font.draw(batch, "Hello World.", 33, 33); + batch.end(); + } + + @Override + public void dispose () { + batch.dispose(); + font.dispose(); + } +} diff --git a/desktop/src/love/distributedrebirth/demo4d/desktop/DesktopLauncher.java b/desktop/src/love/distributedrebirth/demo4d/desktop/DesktopLauncher.java new file mode 100644 index 00000000..8ed403c7 --- /dev/null +++ b/desktop/src/love/distributedrebirth/demo4d/desktop/DesktopLauncher.java @@ -0,0 +1,12 @@ +package love.distributedrebirth.demo4d.desktop; + +import com.badlogic.gdx.backends.lwjgl.LwjglApplication; +import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; +import love.distributedrebirth.demo4d.MainScreen; + +public class DesktopLauncher { + public static void main (String[] arg) { + LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); + new LwjglApplication(new MainScreen(), config); + } +}