Help with setting_up_eclipse_to_build_jme please

Hi there,



I'm new to jME, hello all :slight_smile: and I am relatively new to java, I have some extensive scripting background in PHP and AJAX and wish to try my hand at Java, so need a little hand holding.



I need some help resolving an error I keep getting after I have followed all the steps in 'setting_up_eclipse_to_build_jme' from http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_eclipse_to_build_jme



I have eclipse, (Version: 3.3.1.1) and I am using jre1.6.0_03 and jdk1.6.0_03 (or at least I hope I am).



I got to 'Run test' which asks you to run jmetest.renderer package TestTeapot.java when I do this it displays the following error…



29-Dec-2007 20:14:54 com.jme.app.BaseGame start
INFO: Application started.
29-Dec-2007 20:14:54 com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
29-Dec-2007 20:14:54 com.jme.system.PropertiesIO load
WARNING: Could not load properties. Creating a new one.




Can anyone tell me what this error is and how to get rid of it?

TIA

Trippy :)

Thanks for your reply, that makes sense.



I get the display up fine, however no matter which options I choose for the screen settings it fails to start. I have the error message for that aswell.




29-Dec-2007 21:42:11 com.jme.app.BaseGame start
INFO: Application started.
29-Dec-2007 21:42:11 com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
29-Dec-2007 21:42:11 com.jme.system.PropertiesIO load
INFO: Read properties
29-Dec-2007 21:42:26 com.jme.input.joystick.DummyJoystickInput <init>
INFO: Joystick support is disabled
29-Dec-2007 21:42:26 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
29-Dec-2007 21:42:26 com.jme.system.lwjgl.LWJGLDisplaySystem getValidDisplayMode
INFO: Selected DisplayMode: 1024 x 768 x 32 @75Hz
29-Dec-2007 21:42:26 com.jme.system.PropertiesIO save
INFO: Saved properties
29-Dec-2007 21:42:26 com.jme.app.BaseSimpleGame initSystem
INFO: jME version 1.0
29-Dec-2007 21:42:27 com.jme.system.lwjgl.LWJGLDisplaySystem getValidDisplayMode
INFO: Selected DisplayMode: 1024 x 768 x 32 @75Hz
29-Dec-2007 21:42:27 com.jme.system.lwjgl.LWJGLDisplaySystem initDisplay
SEVERE: Cannot create window
29-Dec-2007 21:42:27 class com.jme.system.lwjgl.LWJGLDisplaySystem initDisplay()
SEVERE: Exception
org.lwjgl.LWJGLException: Could not find a valid pixel format
   at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
   at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
   at org.lwjgl.opengl.WindowsDisplayPeerInfo.initDC(WindowsDisplayPeerInfo.java:54)
   at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:150)
   at org.lwjgl.opengl.Display.createWindow(Display.java:260)
   at org.lwjgl.opengl.Display.create(Display.java:742)
   at org.lwjgl.opengl.Display.create(Display.java:694)
   at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(LWJGLDisplaySystem.java:437)
   at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(LWJGLDisplaySystem.java:143)
   at com.jme.app.BaseSimpleGame.initSystem(BaseSimpleGame.java:341)
   at com.jme.app.BaseGame.start(BaseGame.java:65)
   at jmetest.renderer.TestTeapot.main(TestTeapot.java:61)
29-Dec-2007 21:42:27 com.jme.app.BaseSimpleGame initSystem
SEVERE: Could not create displaySystem
com.jme.system.JmeException: Cannot create window: Could not find a valid pixel format
   at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(LWJGLDisplaySystem.java:450)
   at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(LWJGLDisplaySystem.java:143)
   at com.jme.app.BaseSimpleGame.initSystem(BaseSimpleGame.java:341)
   at com.jme.app.BaseGame.start(BaseGame.java:65)
   at jmetest.renderer.TestTeapot.main(TestTeapot.java:61)



Any ideas?

thanks, Trip

That's not an error, just a warning…does nothing display?

Try downloading the latest drivers for your card.

Also, try telling it to display in a window and see if that makes a difference.

ok thanks I will try the graphics card drivers, I have already tried the open in window option and it gives me the same errors as above.



How is it that all 3d java games that I have used in the past don't have the graphics driver issue, how do they go about this?



tia



Trip

Those games probably use software rendering.

Ah ok, thanks, just looking it up, never heard of that before. This may mean a slight change in direction for me.



Does jME support software rendering, or do you know of an engine that does? I am trying to create a java applet game but I do not wish to have any user hardware issues such as graphics drivers, opengl 1.1 vs 2.0 etc.



thanks so much for your help so far.



Trip

jME wraps around LWJGL and it does support software rendering, it's just not engaged by default.

Thanks darkfrog,



Is it an easy thing to enable? and is there any documentation on how to do it that you could point me to?

Add this to your VM args:

-Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true

Wow is that it?



So what exactly does this do, does it literally just switch from graphics card rendering to software rendering as simple as that? Where does it pull it's GL resources from? (I'm assuming that the graphics card GL libs are different from the processors, or am I barking up the wrong tree?)

Not sure about linux and mac, but windows has a software GL implementor called "GDI Generic" which is used to emulate rendering through software. It is severely limited though, most OpenGL features are not supported, only OpenGL 1.1 and a small part of 1.2.

Generally if software rendering is crucial to your application then it is probably preferable to implement it yourself so that it fits your needs and provides maximum performance.

Thats useful to know. By implementing it yourself does that mean I need to load OpenGL onto the users computer or do you compile it in with Java?

You make your own software renderer, not affiliated in any way with OpenGL.

I suggest you do some research about this before you start doing anything, also please be aware that 3D graphics are very limited outside of hardware support, if you're making a 3D game, prepare to make many compromises in terms of graphics quality.

So in essence, I would need to recreate my own version of OpenGL and build it in with the game?