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
This commit is contained in:
parent
9c91d8c8e1
commit
ba8f8db23c
@ -29,7 +29,7 @@ public class TextureUtil {
|
|||||||
public static void loadTextureFeatures(String extensionString) {
|
public static void loadTextureFeatures(String extensionString) {
|
||||||
ETC1support = extensionString.contains("GL_OES_compressed_ETC1_RGB8_texture");
|
ETC1support = extensionString.contains("GL_OES_compressed_ETC1_RGB8_texture");
|
||||||
DEPTH24 = extensionString.contains("GL_OES_depth24");
|
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");
|
DXT1 = extensionString.contains("GL_EXT_texture_compression_dxt1");
|
||||||
DEPTH_TEXTURE = extensionString.contains("GL_OES_depth_texture");
|
DEPTH_TEXTURE = extensionString.contains("GL_OES_depth_texture");
|
||||||
logger.log(Level.FINE, "Supports ETC1? {0}", ETC1support);
|
logger.log(Level.FINE, "Supports ETC1? {0}", ETC1support);
|
||||||
@ -287,6 +287,7 @@ public class TextureUtil {
|
|||||||
case RGB8:
|
case RGB8:
|
||||||
imageFormat.format = GLES20.GL_RGB;
|
imageFormat.format = GLES20.GL_RGB;
|
||||||
imageFormat.dataType = GLES20.GL_UNSIGNED_BYTE;
|
imageFormat.dataType = GLES20.GL_UNSIGNED_BYTE;
|
||||||
|
imageFormat.renderBufferStorageFormat = 0x8058;
|
||||||
break;
|
break;
|
||||||
case BGR8:
|
case BGR8:
|
||||||
imageFormat.format = GLES20.GL_RGB;
|
imageFormat.format = GLES20.GL_RGB;
|
||||||
@ -295,6 +296,7 @@ public class TextureUtil {
|
|||||||
case RGBA8:
|
case RGBA8:
|
||||||
imageFormat.format = GLES20.GL_RGBA;
|
imageFormat.format = GLES20.GL_RGBA;
|
||||||
imageFormat.dataType = GLES20.GL_UNSIGNED_BYTE;
|
imageFormat.dataType = GLES20.GL_UNSIGNED_BYTE;
|
||||||
|
imageFormat.renderBufferStorageFormat = 0x8058;
|
||||||
break;
|
break;
|
||||||
case Depth:
|
case Depth:
|
||||||
case Depth16:
|
case Depth16:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user