Reply – Re: Renderer.updateTexture2DSubImage...
Your Name
Subject
Message
or Cancel
In Reply To
Re: Renderer.updateTexture2DSubImage...
— by ThomasR ThomasR
Hi,

So FrameHandler.updateFrame(), which can be called from any thread I think, internally ensures that the subsequent Scene.draw() is called on the OpenGL rendering thread (the one that has the Context)?

Will something like this work:

      com.ardor3d.renderer.Renderer renderer;
     ByteBuffer bf;

       Callable updateCallable = new Callable() {
          public Object call() {
             renderer.updateTexture2DSubImage(texture2D, 0, 0, texW, texH, bf, 0, 0, texW);            
             return null;
          }
       };
       GameTaskQueue uQueue = myQueueManager.getQueue(GameTaskQueue.UPDATE); // Or RENDER or BOTH???
       uQueue.enqueue(updateCallable);
       uQueue.execute();