FengGUI Problem

FenGUI works correct.



Until I tried to implement a Thread, which load everything needed for the GUI in the background.

The user should have to the ability to use the GUI, except for the things, that are loaded. The managment works, but I have some kind of OpenGL Problem.



Without thread the methodes works!  ://

Hope someone can help!



Exception in thread "Thread-5" java.lang.NullPointerException

at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1348)

at org.fenggui.binding.render.lwjgl.LWJGLTexture.createTextureID(LWJGLTexture.java:187)

at org.fenggui.binding.render.lwjgl.LWJGLTexture.createTexture(LWJGLTexture.java:193)

at org.fenggui.binding.render.lwjgl.LWJGLBinding.getTexture(LWJGLBinding.java:63)

at org.fenggui.binding.render.Binding.getTexture(Binding.java:157)

at source.bin.gui.FG_GUI.loadPixmap(FG_GUI.java:617)

at source.bin.gui.FG_GUI.iniLoading(FG_GUI.java:141)

at source.bin.gui.Deamon.run(FG_GUI.java:681)





EDIT:



Found the Solution inside the Forum XD Forgot to use the render thread!


 try {
                  GameTaskQueueManager.getManager().render(new Callable<Object>() {
                      public Object call() throws Exception {
                         
                          return null;
                      }
                  }).get();
              } catch (Exception e) {
                  e.printStackTrace();
              }