Beispiel #1
0
        private void CreateSupportsTextureElem(AndroidManifest manifestXML, MobileTextureSubtarget subTarget)
        {
            if ((PlayerSettings.colorSpace == ColorSpace.Linear) && (subTarget != MobileTextureSubtarget.DXT))
            {
                Debug.LogWarning("Linear rendering works only on new Tegra devices");
            }
            switch (subTarget)
            {
            case MobileTextureSubtarget.Generic:
            case MobileTextureSubtarget.ETC:
                manifestXML.AddSupportsGLTexture("GL_OES_compressed_ETC1_RGB8_texture");
                break;

            case MobileTextureSubtarget.DXT:
                manifestXML.AddSupportsGLTexture("GL_EXT_texture_compression_dxt1");
                manifestXML.AddSupportsGLTexture("GL_EXT_texture_compression_dxt5");
                manifestXML.AddSupportsGLTexture("GL_EXT_texture_compression_s3tc");
                break;

            case MobileTextureSubtarget.PVRTC:
                manifestXML.AddSupportsGLTexture("GL_IMG_texture_compression_pvrtc");
                break;

            case MobileTextureSubtarget.ATC:
                manifestXML.AddSupportsGLTexture("GL_AMD_compressed_ATC_texture");
                manifestXML.AddSupportsGLTexture("GL_ATI_texture_compression_atitc");
                break;

            case MobileTextureSubtarget.ETC2:
                break;

            case MobileTextureSubtarget.ASTC:
                manifestXML.AddSupportsGLTexture("GL_KHR_texture_compression_astc_ldr");
                break;

            default:
                Debug.LogWarning("SubTarget not recognized : " + subTarget);
                break;
            }
        }
        private void CreateSupportsTextureElem(AndroidManifest manifestXML, MobileTextureSubtarget subTarget)
        {
            if ((PlayerSettings.colorSpace == ColorSpace.Linear) && (subTarget != MobileTextureSubtarget.DXT))
            {
                Debug.LogWarning("Linear rendering works only on new Tegra devices");
            }
            switch (subTarget)
            {
                case MobileTextureSubtarget.Generic:
                case MobileTextureSubtarget.ETC:
                    manifestXML.AddSupportsGLTexture("GL_OES_compressed_ETC1_RGB8_texture");
                    break;

                case MobileTextureSubtarget.DXT:
                    manifestXML.AddSupportsGLTexture("GL_EXT_texture_compression_dxt1");
                    manifestXML.AddSupportsGLTexture("GL_EXT_texture_compression_dxt5");
                    manifestXML.AddSupportsGLTexture("GL_EXT_texture_compression_s3tc");
                    break;

                case MobileTextureSubtarget.PVRTC:
                    manifestXML.AddSupportsGLTexture("GL_IMG_texture_compression_pvrtc");
                    break;

                case MobileTextureSubtarget.ATC:
                    manifestXML.AddSupportsGLTexture("GL_AMD_compressed_ATC_texture");
                    manifestXML.AddSupportsGLTexture("GL_ATI_texture_compression_atitc");
                    break;

                case MobileTextureSubtarget.ETC2:
                    break;

                case MobileTextureSubtarget.ASTC:
                    manifestXML.AddSupportsGLTexture("GL_KHR_texture_compression_astc_ldr");
                    break;

                default:
                    Debug.LogWarning("SubTarget not recognized : " + subTarget);
                    break;
            }
        }