+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_5x4_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_5x4_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_5x5_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_5x5_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_5x5_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_6x5_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_6x5_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_6x5_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_6x6_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_6x6_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_6x6_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_8x5_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_8x5_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_8x5_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_8x6_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_8x6_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_8x6_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_8x8_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_8x8_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_8x8_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_10x5_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_10x5_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_10x5_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_10x6_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_10x6_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_10x6_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_10x8_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_10x8_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_10x8_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_10x10_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_10x10_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_10x10_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_12x10_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_12x10_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_12x10_KHR;
+ break;
+ }
+ case COMPRESSED_RGBA_ASTC_12x12_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_RGBA_ASTC_12x12_KHR.\n" );
+ internalFormat = GL_COMPRESSED_RGBA_ASTC_12x12_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;
+ break;
+ }
+ case COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.1 standard compressed pixel format COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR.\n" );
+ internalFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;
+ break;
+ }
+
+ // GLES 3.0 floating point formats.
+ case RGB16F:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.0 GLES 3.0 floating point format.\n" );
+ pixelDataType = GL_HALF_FLOAT;
+ internalFormat= GL_RGB;
+ break;
+ }
+ case RGB32F:
+ {
+ DALI_LOG_INFO( Debug::Filter::gImage, Debug::Verbose, "Using GLES 3.0 GLES 3.0 floating point format.\n" );
+ pixelDataType = GL_FLOAT;
+ internalFormat= GL_RGB;
+ break;
+ }
+
+ case INVALID:
+ {
+ DALI_LOG_ERROR( "Invalid pixel format for bitmap\n" );
+ internalFormat = 0;