Graphic problems in my video game

I am having some problems with my video game, i think the problem is in the graphic card. I use this tow sentences to establish the size of the game's window:

game.getSettings().setWidth(1024);

game.getSettings().setHeight(768);

But when i launch the game it does not create a windows with 1024x768, it redimensionate my screen resolution to that resolution. And to set the title of the window i use this sentence:

game.getDisplay().setTitle("Compas // D'Arte Games");

But it does not work fine, if i make this comprobation: if(game.getDisplay() == null), it returns true, i need help, anyone knows what could be the cause of my problem?. Thanks.



PS: i am programing in a laptop, compaq model cq61 110es, and the graphic card is a nvidia gforce 103

What you are seeing is the game starting in fullscreen mode.  It seems like you would like it to start in windowed mode, where it will act like any other application on your screen.  This can be achieved by using:



DisplaySystem.getDisplaySystem().recreateWindow(1024, 768, depth, frequency, false);



The last argument controls fullscreen mode on or off

When i use that instruction, the window is created but the game does not work fine, i obtain an error like this:



02-ene-2010 13:51:37 com.jme.system.lwjgl.LWJGLDisplaySystem initDisplay

GRAVE: Cannot create window

02-ene-2010 13:51:37 class com.jme.system.lwjgl.LWJGLDisplaySystem initDisplay()

GRAVE: Exception

java.lang.IllegalStateException: From thread Thread[OpenGL,5,main]: Thread[main,5,main] already has the context current

at org.lwjgl.opengl.Context.checkAccess(Context.java:172)

at org.lwjgl.opengl.Context.makeCurrent(Context.java:177)

at org.lwjgl.opengl.Display.makeCurrent(Display.java:713)

at org.lwjgl.opengl.Display.makeCurrentAndSetSwapInterval(Display.java:865)

at org.lwjgl.opengl.Display.setDisplayMode(Display.java:252)

at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(LWJGLDisplaySystem.java:418)

at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(LWJGLDisplaySystem.java:143)

at com.jmex.game.StandardGame.initSystem(StandardGame.java:296)

at com.jmex.game.StandardGame.run(StandardGame.java:210)

at java.lang.Thread.run(Thread.java:595)

02-ene-2010 13:51:37 com.jmex.game.DefaultUncaughtExceptionHandler uncaughtException

GRAVE: Main game loop broken by uncaught exception

com.jme.system.JmeException: Cannot create window: From thread Thread[OpenGL,5,main]: Thread[main,5,main] already has the context current

at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(LWJGLDisplaySystem.java:444)

at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(LWJGLDisplaySystem.java:143)

at com.jmex.game.StandardGame.initSystem(StandardGame.java:296)

at com.jmex.game.StandardGame.run(StandardGame.java:210)

at java.lang.Thread.run(Thread.java:595)

What can be the problem? thanks

Again the question did you ever started anything in jME on this computer? like jmetest-examples?

ttrocha said:

Again the question did you ever started anything in jME on this computer? like jmetest-examples?


Yes i did, and all the examples worked fine on my computer. I have also to say that i started the develop of this game in other computer, another laptop, but similar to this.