gouessej/libgdx — pull request #2 by xranby (2013-01-05 02:58:35+00:00)
Title: Use gdx-joal for gdx-backend-jogl

It works!
Example on how to update the existing libgdx gdx-invaders project to use the JogAmp JOGL 2
gdx-backend-jogl with gdx-joal.

1. First edit the Eclipse project .classpath
demos/invaders/gdx-invaders/.classpath
and change

to

2. Find the main method and switch to use of JoglApplication and JoglApplicationConfiguration
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/GdxInvadersDesktop.java
@@ -13,17 +13,17 @@

package com.badlogic.gdxinvaders;

-import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
-import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
+import com.badlogic.gdx.backends.jogl.JoglApplication;
+import com.badlogic.gdx.backends.jogl.JoglApplicationConfiguration;

/** Entry point for desktop version of Gdx Invaders. Constructs an LwjglApplication and registers the renderer.
* @author mzechner */
public class GdxInvadersDesktop {
public static void main (String[] argv) {
- LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
+ JoglApplicationConfiguration config = new JoglApplicationConfiguration();
config.title = "Gdx Invaders";
config.vSyncEnabled = true;
config.useGL20 = true;
- new LwjglApplication(new GdxInvaders(), config);
+ new JoglApplication(new GdxInvaders(), config);
}
}

3. Thats all! Compile, run and Enjoy.