Hello,
I'm having a little problem understanding how do I use jME with jOGL, I've downloaded the project from svn to eclipse and noticed that jOGL was included in the lib folder. If someone could explain me how to change from lwjgl I would be very appreciated.
Welcome to the forums
This is an example for a SimpleGame implementation but it should work for all game types.
import com.jme.app.SimpleGame;
import com.jme.system.GameSettings;
public class JOGLGame extends SimpleGame {
public static void main( String[] args ) {
JOGLGame app = new JOGLGame();
app.setConfigShowMode( ConfigShowMode.NeverShow );
app.start();
}
protected GameSettings getNewSettings() {
final GameSettings gameSettings = super.getNewSettings();
gameSettings.setRenderer( "JOGL" );
return gameSettings;
}
}
The important thing is to override the getNewSettings() method and set the renderer as JOGL (or "LWJGL").
Or just app.setConfigShowMode( ConfigShowMode.AlwaysShow ); and shoose Jogl from the dropdown
Project-Setup wise, you only need to include the correct Jogl.jar for your OS as there are different jars for the Linux, Windows and MacOS.
Reonarudo said:
Hello,
I'm having a little problem understanding how do I use jME with jOGL, I've downloaded the project from svn to eclipse and noticed that jOGL was included in the lib folder. If someone could explain me how to change from lwjgl I would be very appreciated.
You can install JOGL 1.1.1 separately, you need to download the correct ZIP file that contains jogl.jar, gluegen-rt.jar and 4 .so/.jnilib/.dll files (depending on your operating system). You can deploy JOGL via Java Webstart by adding a simple line.
basixs suggested to use the class SimpleGame, it works but if you plan to use StandardGame, you have to know that there is a bug with it (reproducible at least under Linux).
Thank you very much!