Move GLES 3.0 floating point pixel formats to Public API
[platform/core/uifw/dali-core.git] / dali / integration-api / bitmap.cpp
index 50c77c8..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.
@@ -408,6 +408,22 @@ void ConvertToGlFormat( Format pixelformat, unsigned& pixelDataType, unsigned& i
       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" );