Dreams Come True Studio

LIBGDX basic code 본문

Game publisher/LibGDX

LIBGDX basic code

Dream Come True 2017. 11. 13. 17:02
반응형
package com.mygdx.game;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class MyGdxGame extends ApplicationAdapter {
SpriteBatch batch;
Texture img;



@Override
public void create () {
batch = new SpriteBatch();
img = new Texture("badlogic.jpg");
}

@Override
public void render () {
Gdx.gl.glClearColor(1, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
batch.draw(img, 0, 0);
batch.end();
}

@Override
public void dispose () {
batch.dispose();
img.dispose();
}
}


반응형

'Game publisher > LibGDX' 카테고리의 다른 글

LIBGDX lunch with android and desktop  (0) 2017.11.14
OBS Studio 설치 화면 녹화  (0) 2017.11.14
VisEditor  (0) 2017.11.13
libgdx 로그 출력  (0) 2017.11.13
LIBGDX DESKTOP SCREEN SIZE 변경  (0) 2017.11.13
Comments