Add texture target for OES_EGL_image_external 64/89864/2
authortaeyoon <taeyoon0.lee@samsung.com>
Wed, 7 Sep 2016 10:54:52 +0000 (19:54 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Tue, 27 Sep 2016 09:21:19 +0000 (18:21 +0900)
  Modify BindTexture part for native image source with OES_EGL_image_external

Change-Id: I4a06f28931ee8fe54b86ffe2088d7689686977ad

adaptors/tizen/native-image-source-impl-tizen.cpp
adaptors/tizen/native-image-source-impl.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-native-image.h

index 57c8d43..e998ed4 100755 (executable)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/integration-api/gl-defines.h>
 #include <cstring>
 
 // INTERNAL INCLUDES
@@ -449,6 +450,11 @@ const char* NativeImageSource::GetCustomSamplerTypename()
   return SAMPLER_TYPE;
 }
 
+int NativeImageSource::GetEglImageTextureTarget()
+{
+  return GL_TEXTURE_EXTERNAL_OES;
+}
+
 } // namespace Adaptor
 
 } // namespace internal
index 3f16926..48876f0 100755 (executable)
@@ -154,6 +154,11 @@ public:
    */
   const char* GetCustomSamplerTypename();
 
+  /**
+   * @copydoc Dali::NativeImageInterface::Extension::GetEglImageTextureTarget()
+   */
+  int GetEglImageTextureTarget();
+
 private:
 
   /**
index f361280..d627fa6 100644 (file)
  */
 
 // INTERNAL INCLUDES
+
+// EXTERNAL INCLUDES
 #include <dali/public-api/images/native-image-interface.h>
 #include <dali/devel-api/images/native-image-interface-extension.h>
+#include <dali/integration-api/gl-defines.h>
 
 namespace Dali
 {
@@ -33,6 +36,7 @@ public:
   inline const char* GetCustomFragmentPreFix(){return "#extension GL_OES_EGL_image_external:require\n";}
   inline const char* GetCustomSamplerTypename(){return "samplerExternalOES";}
 
+  inline int GetEglImageTextureTarget(){return GL_TEXTURE_EXTERNAL_OES;}
 };
 
 class DALI_IMPORT_API TestNativeImage : public Dali::NativeImageInterface