Select OpenGL es version automatically
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / tizen / egl-image-extensions-tizen.cpp
index f8d8463..4d0bf18 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
 #include <dali/internal/graphics/common/egl-image-extensions.h>
 
 // EXTERNAL INCLUDES
-#if DALI_GLES_VERSION >= 30
-#include <GLES3/gl3.h>
-#include <GLES3/gl3ext.h>
-
-#else
 #include <GLES2/gl2.h>
-#endif // DALI_GLES_VERSION >= 30
-
 #include <GLES2/gl2ext.h>
+#include <GLES3/gl3.h>
 
 #include <EGL/eglext.h>
 
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
 
 // TBM surface support
 #ifndef EGL_NATIVE_SURFACE_TIZEN
@@ -97,7 +91,6 @@ void* EglImageExtensions::CreateImageKHR(EGLClientBuffer clientBuffer)
                                              clientBuffer,
                                              attribs );
 
-  DALI_ASSERT_DEBUG( EGL_NO_IMAGE_KHR != eglImage && "X11Image::GlExtensionCreate eglCreateImageKHR failed!\n");
   if( EGL_NO_IMAGE_KHR == eglImage )
   {
     switch( eglGetError() )
@@ -142,6 +135,7 @@ void* EglImageExtensions::CreateImageKHR(EGLClientBuffer clientBuffer)
       }
     }
   }
+  DALI_ASSERT_DEBUG( EGL_NO_IMAGE_KHR != eglImage && "EglImageExtensions::CreateImageKHR: eglCreateImageKHR failed!\n");
 
   return eglImage;
 }