Commits

Michael Ludwig committed 24fd132

Correct type check in texture loader.

  • Participants
  • Parent commits 94be289

Comments (0)

Files changed (1)

ferox-renderer/ferox-renderer-api/src/main/java/com/ferox/util/texture/TextureLoader.java

 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
 
         g2.dispose();
 
         BufferData data;
-        if (im.type.equals(ByteBuffer.class)) {
+        if (im.type.equals(DataType.UNSIGNED_BYTE)) {
             byte[] rd = ((DataBufferByte) formatted.getRaster().getDataBuffer()).getData();
             data = new BufferData(rd);
         } else { // assumes ShortBuffer
         g2.dispose();
 
         BufferData data;
-        if (im.type.equals(ByteBuffer.class)) {
+        if (im.type.equals(DataType.UNSIGNED_BYTE)) {
             byte[] rd = ((DataBufferByte) formatted.getRaster().getDataBuffer()).getData();
             data = new BufferData(rd);
         } else { // assumes ShortBuffer
         g2.dispose();
 
         BufferData data;
-        if (im.type.equals(ByteBuffer.class)) {
+        if (im.type.equals(DataType.UNSIGNED_BYTE)) {
             byte[] rd = ((DataBufferByte) faceStore.getRaster().getDataBuffer()).getData();
             data = new BufferData(rd);
         } else { // assumes ShortBuffer