Skip to content

Commit

Permalink
removed OpenGL ES 1.x, fixed up all the things...
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Mar 2, 2014
1 parent 08711a2 commit 38e6533
Show file tree
Hide file tree
Showing 272 changed files with 1,100 additions and 6,406 deletions.
Expand Up @@ -16,7 +16,6 @@ public void onCreate (Bundle savedInstanceState) {
config.useAccelerometer = false; config.useAccelerometer = false;
config.useCompass = false; config.useCompass = false;
config.useWakelock = true; config.useWakelock = true;
config.useGL20 = true;
initialize(new Cubocy(), config); initialize(new Cubocy(), config);
} }
} }
Expand Up @@ -7,7 +7,7 @@


public class CubocDesktop { public class CubocDesktop {
public static void main (String[] argv) { public static void main (String[] argv) {
new LwjglApplication(new Cubocy(), "Cubocy", 480, 320, true); new LwjglApplication(new Cubocy(), "Cubocy", 480, 320);


// After creating the Application instance we can set the log level to // After creating the Application instance we can set the log level to
// show the output of calls to Gdx.app.debug // show the output of calls to Gdx.app.debug
Expand Down
6 changes: 3 additions & 3 deletions demos/cuboc/cuboc/src/com/badlogic/cubocy/MapRenderer.java
Expand Up @@ -3,7 +3,7 @@


import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.FPSLogger; import com.badlogic.gdx.graphics.FPSLogger;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Animation; import com.badlogic.gdx.graphics.g2d.Animation;
Expand Down Expand Up @@ -124,7 +124,7 @@ public void render (float deltaTime) {
renderLaserBeams(); renderLaserBeams();


cache.setProjectionMatrix(cam.combined); cache.setProjectionMatrix(cam.combined);
Gdx.gl.glDisable(GL10.GL_BLEND); Gdx.gl.glDisable(GL20.GL_BLEND);
cache.begin(); cache.begin();
int b = 0; int b = 0;
for (int blockY = 0; blockY < 4; blockY++) { for (int blockY = 0; blockY < 4; blockY++) {
Expand Down Expand Up @@ -226,7 +226,7 @@ private void renderLasers () {


private void renderLaserBeams () { private void renderLaserBeams () {
cam.update(false); cam.update(false);
renderer.begin(cam.combined, GL10.GL_LINES); renderer.begin(cam.combined, GL20.GL_LINES);
for (int i = 0; i < map.lasers.size; i++) { for (int i = 0; i < map.lasers.size; i++) {
Laser laser = map.lasers.get(i); Laser laser = map.lasers.get(i);
float sx = laser.startPoint.x, sy = laser.startPoint.y; float sx = laser.startPoint.x, sy = laser.startPoint.y;
Expand Down
Expand Up @@ -4,7 +4,7 @@
import com.badlogic.gdx.Game; import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
Expand All @@ -27,7 +27,7 @@ public void show () {


@Override @Override
public void render (float delta) { public void render (float delta) {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin(); batch.begin();
batch.draw(intro, 0, 0); batch.draw(intro, 0, 0);
batch.end(); batch.end();
Expand Down
Expand Up @@ -7,7 +7,7 @@
import com.badlogic.gdx.Game; import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;


public class GameScreen extends CubocScreen { public class GameScreen extends CubocScreen {
Map map; Map map;
Expand All @@ -30,7 +30,7 @@ public void render (float delta) {
delta = Math.min(0.06f, Gdx.graphics.getDeltaTime()); delta = Math.min(0.06f, Gdx.graphics.getDeltaTime());
map.update(delta); map.update(delta);
Gdx.gl.glClearColor(0.1f, 0.1f, 0.1f, 1); Gdx.gl.glClearColor(0.1f, 0.1f, 0.1f, 1);
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
renderer.render(delta); renderer.render(delta);
controlRenderer.render(); controlRenderer.render();


Expand Down
Expand Up @@ -4,7 +4,7 @@
import com.badlogic.gdx.Game; import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
Expand All @@ -27,7 +27,7 @@ public void show () {


@Override @Override
public void render (float delta) { public void render (float delta) {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin(); batch.begin();
batch.draw(intro, 0, 0); batch.draw(intro, 0, 0);
batch.end(); batch.end();
Expand Down
Expand Up @@ -4,7 +4,7 @@
import com.badlogic.gdx.Game; import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
Expand All @@ -27,7 +27,7 @@ public void show () {


@Override @Override
public void render (float delta) { public void render (float delta) {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin(); batch.begin();
batch.draw(title, 0, 0); batch.draw(title, 0, 0);
batch.end(); batch.end();
Expand Down
Expand Up @@ -15,7 +15,6 @@ public void onCreate (Bundle savedInstanceState) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
config.useWakelock = true; config.useWakelock = true;
config.useGL20 = true;
initialize(new GdxInvaders(), config); initialize(new GdxInvaders(), config);
} }
} }
25 changes: 13 additions & 12 deletions demos/invaders/gdx-invaders-html5/.classpath
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/> <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/gdx-backends-gwt"/> <classpathentry combineaccessrules="false" kind="src" path="/gdx-backends-gwt"/>
<classpathentry combineaccessrules="false" kind="src" path="/gdx"/> <classpathentry combineaccessrules="false" kind="src" path="/gdx"/>
<classpathentry combineaccessrules="false" kind="src" path="/gdx-invaders"/> <classpathentry combineaccessrules="false" kind="src" path="/gdx-invaders"/>
<classpathentry combineaccessrules="false" kind="src" path="/gdx-controllers"/> <classpathentry combineaccessrules="false" kind="src" path="/gdx-controllers"/>
<classpathentry combineaccessrules="false" kind="src" path="/gdx-controllers-gwt"/> <classpathentry combineaccessrules="false" kind="src" path="/gdx-controllers-gwt"/>
<classpathentry kind="output" path="war/WEB-INF/classes"/> <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER/GWT"/>
</classpath> <classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>
@@ -1,3 +1,4 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=gwt-servlet.jar filesCopiedToWebInfLib=gwt-servlet.jar
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14NTEybV1dPjwvdm0tYXJncz48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5iYWRsb2dpYy5nZHhpbnZhZGVycy5HZHhJbnZhZGVyc0d3dDwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+ gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14NTEybV1dPjwvdm0tYXJncz48ZW50cnktcG9pbnQtbW9kdWxlPmNvbS5iYWRsb2dpYy5nZHhpbnZhZGVycy5HZHhJbnZhZGVyc0d3dDwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
Expand Up @@ -23,7 +23,6 @@ public static void main (String[] argv) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.title = "Gdx Invaders"; config.title = "Gdx Invaders";
config.vSyncEnabled = true; config.vSyncEnabled = true;
config.useGL20 = true;
new LwjglApplication(new GdxInvaders(), config); new LwjglApplication(new GdxInvaders(), config);
} }
} }
Expand Up @@ -15,7 +15,7 @@


import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.GLCommon; import com.badlogic.gdx.graphics.GLCommon;
import com.badlogic.gdx.graphics.PerspectiveCamera; import com.badlogic.gdx.graphics.PerspectiveCamera;
import com.badlogic.gdx.graphics.Pixmap.Format; import com.badlogic.gdx.graphics.Pixmap.Format;
Expand Down Expand Up @@ -89,10 +89,10 @@ public void render (Simulation simulation, float delta) {
// We explicitly require GL10, otherwise we could've used the GLCommon // We explicitly require GL10, otherwise we could've used the GLCommon
// interface via Gdx.gl // interface via Gdx.gl
GLCommon gl = Gdx.gl; GLCommon gl = Gdx.gl;
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
renderBackground(); renderBackground();
gl.glEnable(GL10.GL_DEPTH_TEST); gl.glEnable(GL20.GL_DEPTH_TEST);
gl.glEnable(GL10.GL_CULL_FACE); gl.glEnable(GL20.GL_CULL_FACE);
setProjectionAndCamera(simulation.ship); setProjectionAndCamera(simulation.ship);


modelBatch.begin(camera); modelBatch.begin(camera);
Expand All @@ -104,8 +104,8 @@ public void render (Simulation simulation, float delta) {
modelBatch.render(simulation.shots); modelBatch.render(simulation.shots);
modelBatch.end(); modelBatch.end();


gl.glDisable(GL10.GL_CULL_FACE); gl.glDisable(GL20.GL_CULL_FACE);
gl.glDisable(GL10.GL_DEPTH_TEST); gl.glDisable(GL20.GL_DEPTH_TEST);


spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setProjectionMatrix(viewMatrix);
spriteBatch.begin(); spriteBatch.begin();
Expand Down
Expand Up @@ -15,7 +15,7 @@


import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.Texture.TextureFilter; import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.BitmapFont;
Expand Down Expand Up @@ -82,7 +82,7 @@ public boolean isDone () {


@Override @Override
public void draw (float delta) { public void draw (float delta) {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);


viewMatrix.setToOrtho2D(0, 0, 480, 320); viewMatrix.setToOrtho2D(0, 0, 480, 320);
spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setProjectionMatrix(viewMatrix);
Expand All @@ -95,7 +95,7 @@ public void draw (float delta) {
spriteBatch.draw(logo, 0, 320 - 128, 480, 128, 0, 256, 512, 256, false, false); spriteBatch.draw(logo, 0, 320 - 128, 480, 128, 0, 256, 512, 256, false, false);
String text = "It is the end my friend.\nTouch to continue!"; String text = "It is the end my friend.\nTouch to continue!";
TextBounds bounds = font.getMultiLineBounds(text); TextBounds bounds = font.getMultiLineBounds(text);
spriteBatch.setBlendFunction(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA); spriteBatch.setBlendFunction(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA);
font.drawMultiLine(spriteBatch, text, 0, 160 + bounds.height / 2, 480, HAlignment.CENTER); font.drawMultiLine(spriteBatch, text, 0, 160 + bounds.height / 2, 480, HAlignment.CENTER);
spriteBatch.end(); spriteBatch.end();
} }
Expand Down
Expand Up @@ -16,13 +16,12 @@
import com.badlogic.gdx.Application.ApplicationType; import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.Texture.TextureFilter; import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Matrix4; import com.badlogic.gdx.math.Matrix4;
import com.badlogic.gdx.math.Vector3;


/** The main menu screen showing a background, the logo of the game and a label telling the user to touch the screen to start the /** The main menu screen showing a background, the logo of the game and a label telling the user to touch the screen to start the
* game. Waits for the touch and returns isDone() == true when it's done so that the ochestrating GdxInvaders class can switch to * game. Waits for the touch and returns isDone() == true when it's done so that the ochestrating GdxInvaders class can switch to
Expand Down Expand Up @@ -83,7 +82,7 @@ public void update (float delta) {


@Override @Override
public void draw (float delta) { public void draw (float delta) {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);


viewMatrix.setToOrtho2D(0, 0, 480, 320); viewMatrix.setToOrtho2D(0, 0, 480, 320);
spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setProjectionMatrix(viewMatrix);
Expand All @@ -94,7 +93,7 @@ public void draw (float delta) {
spriteBatch.draw(background, 0, 0, 480, 320, 0, 0, 512, 512, false, false); spriteBatch.draw(background, 0, 0, 480, 320, 0, 0, 512, 512, false, false);
spriteBatch.enableBlending(); spriteBatch.enableBlending();
spriteBatch.draw(logo, 0, 320 - 128, 480, 128, 0, 0, 512, 256, false, false); spriteBatch.draw(logo, 0, 320 - 128, 480, 128, 0, 0, 512, 256, false, false);
spriteBatch.setBlendFunction(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA); spriteBatch.setBlendFunction(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA);
String text = "Touch screen to start!"; String text = "Touch screen to start!";
float width = font.getBounds(text).width; float width = font.getBounds(text).width;
font.draw(spriteBatch, text, 240 - width / 2, 128); font.draw(spriteBatch, text, 240 - width / 2, 128);
Expand Down
Expand Up @@ -16,7 +16,7 @@
import java.util.ArrayList; import java.util.ArrayList;


import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Mesh; import com.badlogic.gdx.graphics.Mesh;
import com.badlogic.gdx.graphics.Pixmap.Format; import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
Expand Down Expand Up @@ -81,7 +81,7 @@ private void populate () {
invaderModel.materials.get(0).set(TextureAttribute.createDiffuse(invaderTexture)); invaderModel.materials.get(0).set(TextureAttribute.createDiffuse(invaderTexture));


((ColorAttribute)blockModel.materials.get(0).get(ColorAttribute.Diffuse)).color.set(0, 0, 1, 0.5f); ((ColorAttribute)blockModel.materials.get(0).get(ColorAttribute.Diffuse)).color.set(0, 0, 1, 0.5f);
blockModel.materials.get(0).set(new BlendingAttribute(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA)); blockModel.materials.get(0).set(new BlendingAttribute(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA));


shotModel.materials.get(0).set(ColorAttribute.createDiffuse(1, 1, 0, 1f)); shotModel.materials.get(0).set(ColorAttribute.createDiffuse(1, 1, 0, 1f));


Expand Down Expand Up @@ -134,8 +134,8 @@ private void populate () {
explosionMesh.setVertices(vertices); explosionMesh.setVertices(vertices);
explosionMesh.setIndices(indices); explosionMesh.setIndices(indices);


explosionModel = ModelBuilder.createFromMesh(explosionMesh, GL10.GL_TRIANGLES, explosionModel = ModelBuilder.createFromMesh(explosionMesh, GL20.GL_TRIANGLES,
new Material(new BlendingAttribute(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA), new Material(new BlendingAttribute(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA),
TextureAttribute.createDiffuse(explosionTexture))); TextureAttribute.createDiffuse(explosionTexture)));


ship = new Ship(shipModel); ship = new Ship(shipModel);
Expand Down
Expand Up @@ -11,6 +11,6 @@ public class MetagunAndroid extends AndroidApplication {
@Override @Override
public void onCreate (Bundle savedInstanceState) { public void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
initialize(new Metagun(), false); initialize(new Metagun());
} }
} }
Expand Up @@ -3,7 +3,7 @@


import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.mojang.metagun.screen.Screen; import com.mojang.metagun.screen.Screen;
import com.mojang.metagun.screen.TitleScreen; import com.mojang.metagun.screen.TitleScreen;


Expand Down Expand Up @@ -47,7 +47,7 @@ public void setScreen (Screen newScreen) {


@Override @Override
public void render () { public void render () {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
accum += Gdx.graphics.getDeltaTime(); accum += Gdx.graphics.getDeltaTime();
while (accum > 1.0f / 60.0f) { while (accum > 1.0f / 60.0f) {
screen.tick(input); screen.tick(input);
Expand Down
Expand Up @@ -5,6 +5,6 @@


public class MetagunDesktop { public class MetagunDesktop {
public static void main (String[] argv) { public static void main (String[] argv) {
new LwjglApplication(new Metagun(), "Metagun", 320, 240, false); new LwjglApplication(new Metagun(), "Metagun", 320, 240);
} }
} }
Expand Up @@ -4,7 +4,6 @@


public class PaxBritannicaDesktop { public class PaxBritannicaDesktop {
public static void main(String[] args) { public static void main(String[] args) {
new LwjglApplication(new PaxBritannica(), new LwjglApplication(new PaxBritannica(), "Pax Britannica", 1024, 550);
"Pax Britannica", 1024, 550,false);
} }
} }
Expand Up @@ -4,7 +4,7 @@
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input; import com.badlogic.gdx.Input;
import com.badlogic.gdx.InputProcessor; import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture.TextureFilter; import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.BitmapFont;
Expand Down Expand Up @@ -91,7 +91,7 @@ public void show() {
@Override @Override
public void render(float delta) { public void render(float delta) {
Gdx.gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); Gdx.gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);


time += delta; time += delta;


Expand Down
@@ -1,15 +1,13 @@
package de.swagner.paxbritannica.mainmenu; package de.swagner.paxbritannica.mainmenu;


import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;


import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Game; import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input; import com.badlogic.gdx.Input;
import com.badlogic.gdx.InputProcessor; import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.Preferences; import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
Expand Down
Expand Up @@ -25,6 +25,6 @@ public class SuperJumperAndroid extends AndroidApplication {
@Override @Override
public void onCreate (Bundle savedInstanceState) { public void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
initialize(new SuperJumper(), false); initialize(new SuperJumper());
} }
} }
Expand Up @@ -16,12 +16,12 @@


package com.badlogicgames.superjumper; package com.badlogicgames.superjumper;


import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Game; import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.Screen; import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.GLCommon; import com.badlogic.gdx.graphics.GLCommon;
import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
Expand Down Expand Up @@ -192,7 +192,7 @@ private void updateGameOver () {


public void draw () { public void draw () {
GLCommon gl = Gdx.gl; GLCommon gl = Gdx.gl;
gl.glClear(GL10.GL_COLOR_BUFFER_BIT); gl.glClear(GL20.GL_COLOR_BUFFER_BIT);


renderer.render(); renderer.render();


Expand Down

0 comments on commit 38e6533

Please sign in to comment.