Error opening OpenGL Window

Hello, i have downloaded the jmonkeysdk from http://hub.jmonkeyengine.org/downloads/ for Windows and installed it. When i launch the IDE, it generates error "Error opening OpenGL Window.

And now when i create new project and try to run it, it crashes after showing me the settings screen (as soon as i click Ok on the settings screen).



Here is the exception that is being thrown.

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.UnsupportedOperationException: GLSL and OpenGL2 is required for the LWJGL renderer!
at com.jme3.renderer.lwjgl.LwjglRenderer.initialize(LwjglRenderer.java:203)
at com.jme3.system.lwjgl.LwjglContext.initContextFirstTime(LwjglContext.java:136)
at com.jme3.system.lwjgl.LwjglContext.internalCreate(LwjglContext.java:173)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:128)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)
at java.lang.Thread.run(Thread.java:722)

Dec 12, 2011 8:53:26 PM com.jme3.renderer.lwjgl.LwjglRenderer cleanup
INFO: Deleting objects and invalidating state

Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "LWJGL Renderer Thread"


Kindly help me, what i need to do, in order to solve this.
Thanks

Make sure your graphics card supports OpenGL2 and install the latest drives. Also please do not double-post in the forum.

@normen: SOrry for double post. I actually first used other’s thread so i thought it’s not a good idea. Well, it will never happen again.

Make sure your graphics card supports OpenGL2 and install the latest drives. Also please do not double-post in the forum.

How to check if my graphics card support OpenGL2 or not? Sorry i am very new to Game Programming and also not good enough in hardware knowledge :)

Read the manual of your computer and google the graphics card name?

@normen said:
Read the manual of your computer and google the graphics card name?

I don't have the manual right now:( Anyother way?

http://bit.ly/uAXJjB

@normen said:
http://bit.ly/uAXJjB

Lol sorry for being so noob. I got the name it's ATI Radeon Xpress 200 Series but i am unable to find if it supports OpenGL 2 or not. I also tried google but still got no answer. I am searching but if you can tell me, that will be like saving my day.
Thanks

http://en.wikipedia.org/wiki/Xpress_200

Apparently it does support OpenGL2.0 (which is the minimum for jME3), make sure you install the driver from ATI and not the windows-internal one.

1 Like

I installed the updated driver, now when i launch jMonkey IDE, there is no error but when i run the helloworld program, after showing the setting window (after i press Ok), it generates the new exception again.

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.renderer.RendererException: Invalid ID (-2147483647) received when trying to create shader program.
at com.jme3.renderer.lwjgl.LwjglRenderer.updateShaderData(LwjglRenderer.java:1063)
at com.jme3.renderer.lwjgl.LwjglRenderer.setShader(LwjglRenderer.java:1153)
at com.jme3.material.Material.render(Material.java:1025)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:656)
at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:301)
at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:357)
at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:893)
at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:849)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1125)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1167)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:263)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:149)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:223)
at java.lang.Thread.run(Thread.java:722)

Dec 12, 2011 9:59:22 PM com.jme3.renderer.lwjgl.LwjglRenderer cleanup
INFO: Deleting objects and invalidating state
Dec 12, 2011 9:59:22 PM com.jme3.input.lwjgl.LwjglMouseInput destroy
INFO: Mouse destroyed.
Dec 12, 2011 9:59:22 PM com.jme3.input.lwjgl.LwjglKeyInput destroy
INFO: Keyboard destroyed.
Dec 12, 2011 9:59:22 PM com.jme3.system.lwjgl.LwjglAbstractDisplay deinitInThread
INFO: Display destroyed.

Seems like your card doesn’t fully support OpenGL2 or the driver has bugs, I guess you are going bst by enabling OpenGL1 as the default renderer. The manual says how.

@normen said:
Seems like your card doesn't fully support OpenGL2 or the driver has bugs, I guess you are going bst by enabling OpenGL1 as the default renderer. The manual says how.

Manual of my drivers or jmonkeyengine?
Also, i downloaded the latest drivers from ATI, i think you are right about that my card doesn't fully support OpenGL2.
Also, will there be any effect if i use OpenGL1 regarding to development?
setRenderer(AppSettings.LWJGL_OPENGL2)
setRenderer(AppSettings.LWJGL_OPENGL3)

There is no option to setRenderer to OpenGL1.
Or should i simply write setRendere(AppSetting.LWJGL_OPENGL1)?

@Normen: And developing application in OpenGL1 will make any effect on playing that game on OpenGL2 or OpenGL3? I mean will graphics improve or not?

Also, after some R&D, i think i must specify LWJGL in the jmonkeyengine3 GDE, am i right?

Coz when i tried on Netbeans some LWJGL specific programs, they run good and also i have tried to full screen mode too, everything works fine. But here in jme3 GDE, i don’t know what is the problem. Can any of you tell me how to solve this issue.

Thanks

BUMP*

@mr777 Please don’t bump your thread. Someone will eventually read it

Okay sorry once again. But i don’t know how to make this work.

I am really really thankful to normen for helping me. Well, i managed to run it. I will post here how so maybe it will help someone else.

ppSettings settings = new AppSettings(true);
settings.setRenderer(AppSettings.LWJGL_OPENGL1);
app.setSettings(settings);

Write this before starting application. i.e before app.start()

@normen: I am really thankful coz if you would tell me in the very first time, i will never be able to learn solving and knowing this issue.

Thanks.
1 Like

Not sure if this helps you and anyone else out, but I installed the Netbeans-based SDK and my Mac mini does this error as it only supports OpenGL1.4 However if you use the SDK library files (Nightly builds) on Eclipse and drop this code in your main()



AppSettings settings = new AppSettings(true);

settings.setRenderer(AppSettings.LWJGL_OPENGL_ANY);



It will run just fine using OpenGL 1 for crappy graphics cards and automatically switch to OpenGL 2 or 3 for better cards, however, certain features won’t work on lesser graphics card, eg SkyFactory.createSky(), Glow and bloom special effects etc.



Hope this helps,



Scott

You can enable OpenGL1 support in the SDK in the preferences.