[JME3] GLSL and OpenGL2 problem

I’m trying to learn JME3.

On the JME 3 Tutorial (1) - Hello SimpleApplication

[java]package jme3test.helloworld;

import com.jme3.app.SimpleApplication;

import com.jme3.material.Material;

import com.jme3.math.Vector3f;

import com.jme3.scene.Geometry;

import com.jme3.scene.shape.Box;

import com.jme3.math.ColorRGBA;

/** Sample 1 - how to get started with the most simple JME 3 application.

  • Display a blue 3D cube and view from all sides by
  • moving the mouse and pressing the WASD keys. */

    public class HelloJME3 extends SimpleApplication {

    public static void main(String[] args){

    HelloJME3 app = new HelloJME3();

    app.start();

    }

    @Override

    public void simpleInitApp() {

    Box b = new Box(Vector3f.ZERO, 1, 1, 1);

    Geometry geom = new Geometry(“Box”, b);

    Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

    mat.setColor(“Color”, ColorRGBA.Blue);

    geom.setMaterial(mat);

    rootNode.attachChild(geom);

    }

    }[/java]





    It compile fine but just when the window is being created I get the following error :



    GRAVE: 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:201)

    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:123)

    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:200)

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







    So what can I do to fix/bypass this problem.

    I don’t know if it’s helpful or not but I’m using Ubuntu 10.04 and my graphics card is : Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)







    Thanks for your help

Well either get a Real graficcard or a driver that supports Opengl2 for your current one. You can also try the minimal Opengl1.1 renderer, but it will not make fun using that one as most cool features of jme wont work.

1 Like

Does your graphic card support opengl 2 :roll:? Install the lastest drivers.

1 Like

Sorry your video card does not support OpenGL2. You can either install Mesa3D drivers which will run in software and so will be very slow, or you can run jME3 in OpenGL1 mode

1 Like

It worked with Opengl 1

Thank you everybody.

Here is what I’ve done.

[java]

package jme3test.helloworld;

import com.jme3.app.Application;

import com.jme3.app.SimpleApplication;

import com.jme3.material.Material;

import com.jme3.math.Vector3f;

import com.jme3.scene.Geometry;

import com.jme3.scene.shape.Box;

import com.jme3.system.AppSettings;

import com.jme3.math.ColorRGBA;

/** Sample 1 - how to get started with the most simple JME 3 application.

  • Display a blue 3D cube and view from all sides by
  • moving the mouse and pressing the WASD keys. */

    public class HelloJME3 extends SimpleApplication {

    public static void main(String[] args){

    HelloJME3 app = new HelloJME3();

    AppSettings settings = new AppSettings(true);

    settings.setRenderer(AppSettings.LWJGL_OPENGL1);

    app.setSettings(settings);

    app.start();

    }

    @Override

    public void simpleInitApp() {

    Box b = new Box(Vector3f.ZERO, 1, 1, 1);

    Geometry geom = new Geometry("Box", b);

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");

    mat.setColor("Color", ColorRGBA.Blue);

    geom.setMaterial(mat);

    rootNode.attachChild(geom);

    }

    }

    [/java]



    Thanks again.