[dali_1.3.20] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / integration-api / bitmap.cpp
index 5f7bbd5..373af9c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -407,6 +407,29 @@ void ConvertToGlFormat( Format pixelformat, unsigned& pixelDataType, unsigned& i
       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;
+      break;
+    }
   }
 }