Kaynağa Gözat

Manual merge pending stuff from jme3 base

Jesus Oliver 4 yıl önce
ebeveyn
işleme
8a90e91ea8

+ 2 - 11
jme3-niftygui/src/main/java/com/jme3/niftygui/JmeBatchRenderBackend.java

@@ -209,17 +209,8 @@ public class JmeBatchRenderBackend implements BatchRenderBackend {
 
     @Override
     public void clearTextureAtlas(final int atlasId) {
-        com.jme3.texture.Image atlasImage=getTextureAtlas(atlasId).getImage();
-        ByteBuffer atlasBuffer=atlasImage.getData(0);
-        atlasBuffer.rewind();
-        for (int i=0; i<atlasImage.getWidth()*atlasImage.getHeight(); i++) {
-            atlasBuffer.put((byte) 0x00);
-            atlasBuffer.put((byte) 0xff);
-            atlasBuffer.put((byte) 0x00);
-            atlasBuffer.put((byte) 0xff);
-        }
-        atlasBuffer.rewind();
-        atlasImage.setUpdateNeeded();
+        initialData.rewind();
+        getTextureAtlas(atlasId).getImage().setData(initialData);
     }
 
     @Override