Second Canvas is Black and White

I'm trying to build a AWT based program using jME backed with LWJGL.  I've managed to get things working with a single canvas.

Part of what I am trying to do is have multiple views of the same scene in the same application.  Just to test the basic concept, I opened window second window, added a second JWJGL canvas using the same JMECanvasImplementor instance.  There's not much to it right now.  Just a TerrainBlock.

In the second (or third) window, the terrain block is pure white.  If I change it to use a separate JMECanvasImplementor, the problem disappears.

Has anyone else run into this issue and found solution?  I can't see any way to clone the terrain block.



So I think it's basically that my texture is rendered by the first canvas' renderer but that doesn't display in the second window.  Maybe I've been looking at this two long but I can't seem to figure out how to either create a texture state that I can share or set a different texture state for each window.

Any ideas?

If anyone runs into this same issue.  I solved my problem.

Instead of trying to reuse the TerrainBlock instance, I just create one HeightMap instance and then create multiple TerrainBlocks from it.  I get identical terrrains.

Sorry, didn't see this post until now. You're right textures cannot be shared among contexts/canvas' currently. This is due to a restriction in TextureManager. You need different Textures and TextureStates for the different contexts. As terrain data might be quite huge you can reuse the actual mesh and just use SharedMeshs to apply the textures. This saves some (gpu-)memory, but you still need a copy of the texture data.