StandardGame With GLSLShaderObjectsState throw NPException

   public static void main(String[] args) throws Exception {
      // Instantiate StandardGame
      StandardGame game = new StandardGame("A Simple Test");
      // Show settings screen
      if (GameSettingsPanel.prompt(game.getSettings())) {
         // Start StandardGame, it will block until it has initialized successfully, then return
         /* Just try to create GLSLShaderObjectsState */

         // Create a DebugGameState - has all the built-in features that SimpleGame provides
         // NOTE: for a distributable game implementation you'll want to use something like
         // BasicGameState instead and provide control features yourself.
         DebugGameState state = new DebugGameState();
         // Put our box in it
         Box box = new Box("my box", new Vector3f(0, 0, 0), 2, 2, 2);
          box.setModelBound(new BoundingSphere());
          // We had to add the following line because the render thread is already running
          // Anytime we add content we need to updateRenderState or we get funky effects
         // Add it to the manager
         // Activate the game state

This is the TestStandardGame class, with this line: "game.getDisplay().getRenderer().createGLSLShaderObjectsState();" throw this NullPointerException:

Exception in thread "main" java.lang.NullPointerException
   at com.jme.scene.state.lwjgl.LWJGLShaderObjectsState.isSupported(
   at com.jme.scene.state.lwjgl.LWJGLShaderObjectsState.<init>(
   at com.jme.renderer.lwjgl.LWJGLRenderer.createGLSLShaderObjectsState(


I don't think the renderer is ready in this call, maybe you need to throw it in a queue first?

Actually, game.start() blocks until it is actually running the main game loop successfully before returning, but the latter statement was probably the cause of his problems.

anykeyh, if you put it in the GameTaskQueue it should resolve your issue as my assumption is that is doing something directly to OpenGL so it must be run in the OpenGL thread.