setup shader files
This commit is contained in:
@@ -18,6 +18,7 @@ import com.badlogic.gdx.graphics.g2d.ParticleEffect;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
|
||||
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter;
|
||||
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.CheckBox.CheckBoxStyle;
|
||||
@@ -50,6 +51,8 @@ public class Polyjet extends Game {
|
||||
TextureAtlas skinAtlas;
|
||||
private Preferences prefs;
|
||||
|
||||
public ShaderProgram defaultShader;
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
Gdx.app.setLogLevel(Application.LOG_DEBUG);
|
||||
@@ -86,6 +89,7 @@ public class Polyjet extends Game {
|
||||
assetManager.setLoader(ParticleEffect.class, new ParticleEffectLoader(genericFileFinder));
|
||||
assetManager.setLoader(Sound.class, new SoundLoader(genericFileFinder));
|
||||
|
||||
defaultShader = new ShaderProgram(Gdx.files.internal("shaders/default_vertex.glsl").readString(), Gdx.files.internal("shaders/default_frag.glsl").readString());
|
||||
|
||||
default_fontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/Gasalt-Regular.ttf"));
|
||||
darktech_ldr_fontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/darktech_ldr.ttf"));
|
||||
|
@@ -107,6 +107,7 @@ public class MainMenu extends ScreenAdapter implements TransitionAdapter {
|
||||
Gdx.gl.glClearColor(1f, 1f, 1f, 1f);
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
||||
stage.act();
|
||||
|
||||
stage.draw();
|
||||
if (stage.getCamera().position.x != targetPosition.x || stage.getCamera().position.y != targetPosition.y) {
|
||||
stage.getCamera().position.lerp(targetPosition, 0.25f);
|
||||
|
Reference in New Issue
Block a user