Explorar el Código

Android:
Add support for OGLES20 extension "GL_IMG_texture_npot" in addition to the currently used extension "GL_OES_texture_npot" to detect NPOT support.
Added additional Renderbufferstorage formats for RGB8 and RGBA8 image formats


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10517 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

iwg..om hace 12 años
padre
commit
ba8f8db23c
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      engine/src/android/com/jme3/renderer/android/TextureUtil.java

+ 3 - 1
engine/src/android/com/jme3/renderer/android/TextureUtil.java

@@ -29,7 +29,7 @@ public class TextureUtil {
     public static void loadTextureFeatures(String extensionString) {
         ETC1support = extensionString.contains("GL_OES_compressed_ETC1_RGB8_texture");
         DEPTH24 = extensionString.contains("GL_OES_depth24");
-        NPOT = extensionString.contains("GL_OES_texture_npot") || extensionString.contains("GL_NV_texture_npot_2D_mipmap");
+        NPOT = extensionString.contains("GL_IMG_texture_npot") || extensionString.contains("GL_OES_texture_npot") || extensionString.contains("GL_NV_texture_npot_2D_mipmap");
         DXT1 = extensionString.contains("GL_EXT_texture_compression_dxt1");
         DEPTH_TEXTURE = extensionString.contains("GL_OES_depth_texture");
         logger.log(Level.FINE, "Supports ETC1? {0}", ETC1support);
@@ -287,6 +287,7 @@ public class TextureUtil {
             case RGB8:
                 imageFormat.format = GLES20.GL_RGB;
                 imageFormat.dataType = GLES20.GL_UNSIGNED_BYTE;
+                imageFormat.renderBufferStorageFormat = 0x8058;
                 break;
             case BGR8:
                 imageFormat.format = GLES20.GL_RGB;
@@ -295,6 +296,7 @@ public class TextureUtil {
             case RGBA8:
                 imageFormat.format = GLES20.GL_RGBA;
                 imageFormat.dataType = GLES20.GL_UNSIGNED_BYTE;
+                imageFormat.renderBufferStorageFormat = 0x8058;
                 break;
             case Depth:
             case Depth16: