Not sure if this really has anything to do with LWJGL-- I’m not quite sure what’s going on here.
My game runs perfectly fine on both windows and mac, if I run from eclipse.
If I compile under my mac, I can run the jar on both my mac and my pc
If I compile under my pc, I can only run the jar on my pc. When I attempt to run it on my mac, I get some JVM crash:
crash report
Any ideas what’s going on?
[EDIT] After reading the crash report with some highlighting, I see that it has to do with creating the display. Here is my display creation code:
public static boolean initDisplay(int width, int height, boolean fullscreen) {
try{
PixelFormat pixelFormat = new PixelFormat(24, 0, 0, 0, 0);
ContextAttribs contextAttributes = new ContextAttribs(3, 2)
.withForwardCompatible(true)
.withProfileCore(true)
.withProfileCompatibility(false)
.withDebug(false);
if ( GameSettings.fullscreen ) {
Display.setDisplayMode(getDisplayMode( width, height ));
} else {
Display.setDisplayMode(new DisplayMode( width, height) );
}
Display.setFullscreen(fullscreen);
Display.setTitle("Game Engine");
Display.create(pixelFormat, contextAttributes);
return true;
}catch(Exception e) {
e.printStackTrace();
}
return false;
}