Select OpenGL es version automatically 99/201599/13
authorSeungho, Baek <sbsh.baek@samsung.com>
Mon, 18 Mar 2019 06:35:08 +0000 (15:35 +0900)
committerRichard Huang <r.huang@samsung.com>
Fri, 12 Apr 2019 14:56:45 +0000 (14:56 +0000)
 - Try to use OpenGL es 3.0.
 - If it fail, retry to use OpenGL es 2.0
 - Change mImpl of the GlImplementation by follow the OpenGL es version
 - TextureRequiresConverting function in gl-implementation.

Change-Id: Ifa190a6da045c6385a68ba5760468bdbd2f4397a
Signed-off-by: Seungho, Baek <sbsh.baek@samsung.com>
18 files changed:
README.md
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h
build/tizen/adaptor/configure.ac
dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/graphics/gles/egl-graphics.cpp
dali/internal/graphics/gles/egl-graphics.h
dali/internal/graphics/gles/egl-implementation.cpp
dali/internal/graphics/gles/egl-implementation.h
dali/internal/graphics/gles/gl-extensions.cpp
dali/internal/graphics/gles/gl-extensions.h
dali/internal/graphics/gles/gl-implementation.h
dali/internal/graphics/gles/gles-abstraction.h [new file with mode: 0644]
dali/internal/graphics/gles/gles2-implementation.h [new file with mode: 0644]
dali/internal/graphics/gles/gles3-implementation.h [new file with mode: 0644]
dali/internal/graphics/tizen/egl-image-extensions-tizen.cpp
dali/internal/graphics/ubuntu/egl-image-extensions-ubuntu.cpp
packaging/dali-adaptor.spec

index 16dfe39..2933090 100644 (file)
--- a/README.md
+++ b/README.md
@@ -39,20 +39,6 @@ Then run the following commands:
          $ ./configure --prefix=$DESKTOP_PREFIX
          $ make install -j8
 
-### Build target options
-
-OpenGL ES context:
-
-When building, the OpenGL ES version of the target should be specified.
-
-Valid version options are 20, 30, 31 for OpenGL ES versions 2.0, 3.0 and 3.1 respectively.
-
-With configure:
-Add: *--enable-gles=X*
-
-With gbs:
-Add to the gbs build line: *--define "%target_gles_version X"*
-
 ### Building and executing test cases
 
 See the README.md in dali-adaptor/automated-tests.
index 02439bc..8372e03 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.
@@ -104,6 +104,16 @@ void TestGlAbstraction::PostRender()
 {
 }
 
+bool TestGlAbstraction::IsSurfacelessContextSupported() const
+{
+  return true;
+}
+
+bool TestGlAbstraction::TextureRequiresConverting( const GLenum imageGlFormat, const GLenum textureGlFormat, const bool isSubImage ) const
+{
+  return ( ( imageGlFormat == GL_RGB ) && ( textureGlFormat == GL_RGBA ) );
+}
+
 } // Namespace dali
 
 bool BlendEnabled(const Dali::TraceCallStack& callStack)
index c68573b..6572dbc 100644 (file)
@@ -2,7 +2,7 @@
 #define TEST_GL_ABSTRACTION_H
 
 /*
- * Copyright (c) 2018 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.
@@ -59,6 +59,10 @@ public:
   void PreRender();
   void PostRender();
 
+  bool IsSurfacelessContextSupported() const;
+
+  bool TextureRequiresConverting( const GLenum imageGlFormat, const GLenum textureGlFormat, const bool isSubImage ) const;
+
   /* OpenGL ES 2.0 */
 
   inline void ActiveTexture( GLenum textureUnit )
index dba2891..95384a3 100644 (file)
@@ -133,14 +133,6 @@ if test "x$ecore_imf_1_13" = "xyes"; then
   DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DECORE_IMF_1_13"
 fi
 
-AC_ARG_ENABLE([gles],
-              [AC_HELP_STRING([--enable-gles],
-                              [Specify the OpenGL ES version for backwards compatibility])],
-              [enable_gles=$enableval],
-              [enable_gles=30])
-
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
-
 # Currently, dali-adaptor requires appfw on Tizen
 # and does not require it on Ubuntu.
 # So we should be able to enable/disable this option for dali-adaptor.
@@ -395,6 +387,5 @@ Configuration
   Network logging enabled:          $enable_networklogging
   Font config file:                 $fontConfigurationFile
   Using Tizen APP FW libraries:     $enable_appfw
-  OpenGL ES version:                $enable_gles
   Tizen Platform Config supported   $tizenPlatformConfigSupported
 "
index ace0a18..93e1d9e 100644 (file)
@@ -424,8 +424,6 @@ void CombinedUpdateRenderController::UpdateRenderThread()
 
   RenderSurfaceInterface* currentSurface = nullptr;
 
-#if DALI_GLES_VERSION >= 30
-
   GraphicsInterface& graphics = mAdaptorInterfaces.GetGraphicsInterface();
   EglGraphics* eglGraphics = static_cast<EglGraphics *>(&graphics);
 
@@ -433,22 +431,25 @@ void CombinedUpdateRenderController::UpdateRenderThread()
   EglInterface* eglInterface = &eglGraphics->GetEglInterface();
 
   Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( *eglInterface );
-  eglImpl.ChooseConfig( true, COLOR_DEPTH_32 ); // Always use this for shared context???
-
-  // Create a surfaceless OpenGL context for shared resources
-  eglImpl.CreateContext();
-  eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
-
-#else // DALI_GLES_VERSION >= 30
-
-  currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
-  if( currentSurface )
+  // Try to use OpenGL es 3.0
+  // ChooseConfig returns false here when the device only support gles 2.0.
+  // Because eglChooseConfig with gles 3.0 setting fails when the device only support gles 2.0 and Our default setting is gles 3.0.
+  if( eglImpl.ChooseConfig( true, COLOR_DEPTH_32 ) )
   {
-    currentSurface->InitializeGraphics();
-    currentSurface->MakeContextCurrent();
+    // Create a surfaceless OpenGL context for shared resources
+    eglImpl.CreateContext();
+    eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
+  }
+  else // Retry to use OpenGL es 2.0
+  {
+    eglGraphics->SetGlesVersion( 20 );
+    currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
+    if( currentSurface )
+    {
+      currentSurface->InitializeGraphics();
+      currentSurface->MakeContextCurrent();
+    }
   }
-
-#endif
 
   // Tell core it has a context
   mCore.ContextCreated();
@@ -582,10 +583,11 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       }
     }
 
-#if DALI_GLES_VERSION >= 30
-    // Make the shared surfaceless context as current before rendering
-    eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
-#endif
+    if( eglImpl.GetGlesVersion() >= 30 )
+    {
+      // Make the shared surfaceless context as current before rendering
+      eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
+    }
 
     Integration::RenderStatus renderStatus;
 
index ebaaa5a..a54b9ed 100644 (file)
@@ -38,6 +38,11 @@ EglGraphics::~EglGraphics()
 {
 }
 
+void EglGraphics::SetGlesVersion( const int32_t glesVersion )
+{
+  mEglImplementation->SetGlesVersion( glesVersion );
+  mGLES->SetGlesVersion( glesVersion );
+}
 
 void EglGraphics::Initialize( EnvironmentOptions* environmentOptions )
 {
index 36a4c3c..717ffc2 100644 (file)
@@ -66,6 +66,12 @@ public:
   EglInterface* Create();
 
   /**
+   * Set gles version
+   * Default version is gles 3.0
+   */
+  void SetGlesVersion( const int32_t glesVersion );
+
+  /**
    * Gets the GL abstraction
    * @return The GL abstraction
    */
index be463f7..f4673f9 100755 (executable)
@@ -66,6 +66,7 @@ EglImplementation::EglImplementation( int multiSamplingLevel,
   mCurrentEglSurface( 0 ),
   mCurrentEglContext( EGL_NO_CONTEXT ),
   mMultiSamplingLevel( multiSamplingLevel ),
+  mGlesVersion( 30 ),
   mColorDepth( COLOR_DEPTH_24 ),
   mGlesInitialized( false ),
   mIsOwnSurface( true ),
@@ -103,26 +104,6 @@ bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwn
     }
     eglBindAPI(EGL_OPENGL_ES_API);
 
-    mContextAttribs.Clear();
-
-#if DALI_GLES_VERSION >= 30
-
-    mContextAttribs.Reserve(5);
-    mContextAttribs.PushBack( EGL_CONTEXT_MAJOR_VERSION_KHR );
-    mContextAttribs.PushBack( DALI_GLES_VERSION / 10 );
-    mContextAttribs.PushBack( EGL_CONTEXT_MINOR_VERSION_KHR );
-    mContextAttribs.PushBack( DALI_GLES_VERSION % 10 );
-
-#else // DALI_GLES_VERSION >= 30
-
-    mContextAttribs.Reserve(3);
-    mContextAttribs.PushBack( EGL_CONTEXT_CLIENT_VERSION );
-    mContextAttribs.PushBack( 2 );
-
-#endif // DALI_GLES_VERSION >= 30
-
-    mContextAttribs.PushBack( EGL_NONE );
-
     mGlesInitialized = true;
     mIsOwnSurface = isOwnSurface;
   }
@@ -319,15 +300,16 @@ void EglImplementation::WaitGL()
   eglWaitGL();
 }
 
-void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
+bool EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
 {
   if(mEglConfig && isWindowType == mIsWindow && mColorDepth == depth)
   {
-    return;
+    return true;
   }
 
   bool isTransparent = ( depth == COLOR_DEPTH_32 );
 
+  mColorDepth = depth;
   mIsWindow = isWindowType;
 
   EGLint numConfigs;
@@ -347,29 +329,22 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
 
   configAttribs.PushBack( EGL_RENDERABLE_TYPE );
 
-#if DALI_GLES_VERSION >= 30
-
+  if( mGlesVersion >= 30 )
+  {
 #ifdef _ARCH_ARM_
-  configAttribs.PushBack( EGL_OPENGL_ES3_BIT_KHR );
+    configAttribs.PushBack( EGL_OPENGL_ES3_BIT_KHR );
 #else
-  // There is a bug in the desktop emulator
-  // Requesting for ES3 causes eglCreateContext even though it allows to ask
-  // for a configuration that supports GLES 3.0
-  configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
+    configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
 #endif // _ARCH_ARM_
+  }
+  else
+  {
+    configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
+  }
 
-#else // DALI_GLES_VERSION >= 30
-
-  Integration::Log::LogMessage( Integration::Log::DebugInfo, "Using OpenGL ES 2 \n" );
-  configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
-
-#endif //DALI_GLES_VERSION >= 30
-
-#if DALI_GLES_VERSION >= 30
 // TODO: enable this flag when it becomes supported
 //  configAttribs.PushBack( EGL_CONTEXT_FLAGS_KHR );
 //  configAttribs.PushBack( EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR );
-#endif //DALI_GLES_VERSION >= 30
 
   configAttribs.PushBack( EGL_RED_SIZE );
   configAttribs.PushBack( 8 );
@@ -409,6 +384,13 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
 
   if ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE )
   {
+    if( mGlesVersion >= 30 )
+    {
+      mEglConfig = NULL;
+      DALI_LOG_ERROR("Fail to use OpenGL es 3.0. Retring to use OpenGL es 2.0.");
+      return false;
+    }
+
     EGLint error = eglGetError();
     switch (error)
     {
@@ -438,7 +420,26 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
       }
     }
     DALI_ASSERT_ALWAYS(false && "eglChooseConfig failed!");
+    return false;
+  }
+  Integration::Log::LogMessage(Integration::Log::DebugInfo, "Using OpenGL es %d.%d.\n", mGlesVersion / 10, mGlesVersion % 10 );
+
+  mContextAttribs.Clear();
+  if( mGlesVersion >= 30 )
+  {
+    mContextAttribs.Reserve(5);
+    mContextAttribs.PushBack( EGL_CONTEXT_MAJOR_VERSION_KHR );
+    mContextAttribs.PushBack( mGlesVersion / 10 );
+    mContextAttribs.PushBack( EGL_CONTEXT_MINOR_VERSION_KHR );
+    mContextAttribs.PushBack( mGlesVersion % 10 );
+  }
+  else
+  {
+    mContextAttribs.Reserve(3);
+    mContextAttribs.PushBack( EGL_CONTEXT_CLIENT_VERSION );
+    mContextAttribs.PushBack( 2 );
   }
+  mContextAttribs.PushBack( EGL_NONE );
 
   if ( numConfigs != 1 )
   {
@@ -446,6 +447,8 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
 
     TEST_EGL_ERROR("eglChooseConfig");
   }
+
+  return true;
 }
 
 EGLSurface EglImplementation::CreateSurfaceWindow( EGLNativeWindowType window, ColorDepth depth )
@@ -516,6 +519,11 @@ bool EglImplementation::ReplaceSurfacePixmap( EGLNativePixmapType pixmap, EGLSur
   return contextLost;
 }
 
+void EglImplementation::SetGlesVersion( const int32_t glesVersion )
+{
+  mGlesVersion = glesVersion;
+}
+
 EGLDisplay EglImplementation::GetDisplay() const
 {
   return mEglDisplay;
@@ -526,6 +534,11 @@ EGLContext EglImplementation::GetContext() const
   return mEglContext;
 }
 
+int32_t EglImplementation::GetGlesVersion() const
+{
+  return mGlesVersion;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index 3c75e3b..7c2a69b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_EGL_IMPLEMENTATION_H
 
 /*
- * 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.
@@ -139,8 +139,9 @@ public:
    * Choose config of egl
    * @param isWindowType whether the config for window or pixmap
    * @param colorDepth Bit per pixel value (ex. 32 or 24)
+   * @return true if the eglChooseConfig is succeed.
   */
-  void ChooseConfig( bool isWindowType, ColorDepth depth );
+  bool ChooseConfig( bool isWindowType, ColorDepth depth );
 
   /**
     * Create an OpenGL surface using a window
@@ -176,6 +177,11 @@ public:
   bool ReplaceSurfacePixmap( EGLNativePixmapType pixmap, EGLSurface& eglSurface );
 
   /**
+   * Sets gles version
+   */
+  void SetGlesVersion( const int32_t glesVersion );
+
+  /**
    * returns the display with which this object was initialized
    * @return the EGL Display.
    */
@@ -187,6 +193,12 @@ public:
    */
   EGLContext GetContext() const;
 
+  /**
+   * Returns the gles version
+   * @return the gles version
+   */
+  int32_t GetGlesVersion() const;
+
 private:
 
   Vector<EGLint>       mContextAttribs;
@@ -210,7 +222,8 @@ private:
   typedef std::vector<EGLSurface> EglWindowSurfaceContainer;
   EglWindowSurfaceContainer mEglWindowSurfaces;                ///< The EGL surface for the window
 
-  int                  mMultiSamplingLevel;
+  int32_t              mMultiSamplingLevel;
+  int32_t              mGlesVersion;
 
   ColorDepth           mColorDepth;
 
index 3cc449a..553a570 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.
@@ -38,7 +38,6 @@ namespace ECoreX
 
 GlExtensions::GlExtensions()
 :
-#if DALI_GLES_VERSION < 30
 #ifdef GL_EXT_discard_framebuffer
   mGlDiscardFramebuffer( NULL ),
 #endif
@@ -46,7 +45,6 @@ GlExtensions::GlExtensions()
   mGlGetProgramBinaryOES( NULL ),
   mGlProgramBinaryOES( NULL ),
 #endif
-#endif // DALI_GLES_VERSION < 30
   mInitialized( false )
 {
 }
@@ -55,8 +53,6 @@ GlExtensions::~GlExtensions()
 {
 }
 
-#if DALI_GLES_VERSION < 30
-
 void GlExtensions::DiscardFrameBuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
 {
   // initialize extension on first use as on some hw platforms a context
@@ -136,8 +132,6 @@ void GlExtensions::Initialize()
 #endif
 }
 
-#endif // DALI_GLES_VERSION < 30
-
 } // namespace ECoreX
 
 } // namespace Adaptor
index 2b2f6cc..fd6438b 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_GL_EXTENSION_H__
 
 /*
- * Copyright (c) 2014 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.
 
 // EXTERNAL INCLUDES
 
-#if DALI_GLES_VERSION >= 30
 #include <GLES3/gl3.h>
-#else
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
-#endif
 
 
 namespace Dali
@@ -60,8 +57,6 @@ public:
 
 public:
 
-#if DALI_GLES_VERSION < 30
-
   /**
    * If the GL extension is available this function discards specified data in attachments
    * from being copied from the target to improve performance.
@@ -96,8 +91,6 @@ public:
    */
   void ProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
 
-#endif // DALI_GLES_VERSION < 30
-
 private:
 
   /**
@@ -105,8 +98,6 @@ private:
    */
   void Initialize();
 
-#if DALI_GLES_VERSION < 30
-
 #ifdef GL_EXT_discard_framebuffer
   PFNGLDISCARDFRAMEBUFFEREXTPROC mGlDiscardFramebuffer;
 #endif
@@ -116,8 +107,6 @@ private:
   PFNGLPROGRAMBINARYOESPROC mGlProgramBinaryOES;
 #endif
 
-#endif // DALI_GLES_VERSION < 30
-
   bool mInitialized;
 
 };
index b1ce82d..be32476 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_GL_IMPLEMENTATION_H__
-#define __DALI_INTERNAL_GL_IMPLEMENTATION_H__
+#ifndef DALI_INTERNAL_GL_IMPLEMENTATION_H
+#define DALI_INTERNAL_GL_IMPLEMENTATION_H
 
 /*
- * 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.
  */
 
 // EXTERNAL INCLUDES
-#ifndef DALI_GLES_VERSION
-#error "OpenGL ES version not specified"
-#endif
-
-#if DALI_GLES_VERSION >= 31
-#include <GLES3/gl31.h>
-#elif DALI_GLES_VERSION >= 30
-#include <GLES3/gl3.h>
-#else
+#include <memory>
 #include <cstdlib>
 #include <GLES2/gl2.h>
-#endif
-
 #include <dali/integration-api/gl-abstraction.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/graphics/gles/gl-extensions.h>
+#include <dali/internal/graphics/gles/gles-abstraction.h>
+#include <dali/internal/graphics/gles/gles2-implementation.h>
+#include <dali/internal/graphics/gles/gles3-implementation.h>
 
 namespace Dali
 {
@@ -48,13 +40,19 @@ namespace Adaptor
 
 /**
  * GlImplementation is a concrete implementation for GlAbstraction.
- * The class provides an OpenGL-ES 2.0 implementation.
+ * The class provides an OpenGL-ES 2.0 or 3.0 implementation.
  * The class is provided when creating the Integration::Core object.
  */
-class GlImplementation: public Dali::Integration::GlAbstraction
+class GlImplementation : public Dali::Integration::GlAbstraction
 {
 
 public:
+  GlImplementation()
+    : mGlesVersion( 30 )
+  {
+    mImpl.reset( new Gles3Implementation() );
+  }
+
   virtual ~GlImplementation() {}
 
   void PreRender()
@@ -67,1485 +65,1275 @@ public:
     /* Do nothing in main implementation */
   }
 
+  void SetGlesVersion( const int32_t glesVersion )
+  {
+    if( mGlesVersion != glesVersion )
+    {
+      mGlesVersion = glesVersion;
+      if( mGlesVersion >= 30 )
+      {
+        mImpl.reset( new Gles3Implementation() );
+      }
+      else
+      {
+        mImpl.reset( new Gles2Implementation() );
+      }
+    }
+  }
+
+  bool IsSurfacelessContextSupported() const
+  {
+    return ( mGlesVersion >= 30 );
+  }
+
+  bool TextureRequiresConverting( const GLenum imageGlFormat, const GLenum textureGlFormat, const bool isSubImage ) const
+  {
+    bool convert = ( ( imageGlFormat == GL_RGB ) && ( textureGlFormat == GL_RGBA ) );
+    if( mGlesVersion >= 30 )
+    {
+      // Don't convert manually from RGB to RGBA if GLES >= 3.0 and a sub-image is uploaded.
+      convert = ( convert && !isSubImage );
+    }
+    return convert;
+  }
+
   /* OpenGL ES 2.0 */
 
-  void ActiveTexture (GLenum texture)
+  void ActiveTexture( GLenum texture )
   {
-    glActiveTexture(texture);
+    glActiveTexture( texture );
   }
 
-  void AttachShader (GLuint program, GLuint shader)
+  void AttachShader( GLuint program, GLuint shader )
   {
-    glAttachShader(program,shader);
+    glAttachShader( program, shader );
   }
 
-  void BindAttribLocation (GLuint program, GLuint index, const char* name)
+  void BindAttribLocation( GLuint program, GLuint index, const char* name )
   {
-    glBindAttribLocation(program,index,name);
+    glBindAttribLocation( program, index, name );
   }
 
-  void BindBuffer (GLenum target, GLuint buffer)
+  void BindBuffer( GLenum target, GLuint buffer )
   {
-    glBindBuffer(target,buffer);
+    glBindBuffer( target, buffer );
   }
 
-  void BindFramebuffer (GLenum target, GLuint framebuffer)
+  void BindFramebuffer( GLenum target, GLuint framebuffer )
   {
-    glBindFramebuffer(target,framebuffer);
+    glBindFramebuffer( target, framebuffer );
   }
 
-  void BindRenderbuffer (GLenum target, GLuint renderbuffer)
+  void BindRenderbuffer( GLenum target, GLuint renderbuffer )
   {
-    glBindRenderbuffer(target,renderbuffer);
+    glBindRenderbuffer( target, renderbuffer );
   }
 
-  void BindTexture (GLenum target, GLuint texture)
+  void BindTexture( GLenum target, GLuint texture )
   {
-    glBindTexture(target,texture);
+    glBindTexture( target, texture );
   }
 
-  void BlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+  void BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
   {
-    glBlendColor(red,green,blue,alpha);
+    glBlendColor( red, green, blue, alpha );
   }
 
-  void BlendEquation ( GLenum mode )
+  void BlendEquation( GLenum mode )
   {
-    glBlendEquation(mode);
+    glBlendEquation( mode );
   }
 
-  void BlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
+  void BlendEquationSeparate( GLenum modeRGB, GLenum modeAlpha )
   {
-    glBlendEquationSeparate(modeRGB,modeAlpha);
+    glBlendEquationSeparate( modeRGB, modeAlpha );
   }
 
-  void BlendFunc (GLenum sfactor, GLenum dfactor)
+  void BlendFunc( GLenum sfactor, GLenum dfactor )
   {
-    glBlendFunc(sfactor,dfactor);
+    glBlendFunc( sfactor, dfactor );
   }
 
-  void BlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+  void BlendFuncSeparate( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha )
   {
-    glBlendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
+    glBlendFuncSeparate( srcRGB, dstRGB, srcAlpha, dstAlpha );
   }
 
-  void BufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage)
+  void BufferData( GLenum target, GLsizeiptr size, const void* data, GLenum usage )
   {
-    glBufferData(target,size,data,usage);
+    glBufferData( target, size, data, usage );
   }
 
-  void BufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
+  void BufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, const void* data )
   {
-    glBufferSubData(target,offset,size,data);
+    glBufferSubData( target, offset, size, data );
   }
 
-  GLenum CheckFramebufferStatus (GLenum target)
+  GLenum CheckFramebufferStatus( GLenum target )
   {
-    return glCheckFramebufferStatus(target);
+    return glCheckFramebufferStatus( target );
   }
 
-  void Clear (GLbitfield mask)
+  void Clear( GLbitfield mask )
   {
-    glClear(mask);
+    glClear( mask );
   }
 
-  void ClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+  void ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
   {
-    glClearColor(red,green,blue,alpha);
+    glClearColor( red, green, blue, alpha );
   }
 
-  void ClearDepthf (GLclampf depth)
+  void ClearDepthf( GLclampf depth )
   {
-    glClearDepthf(depth);
+    glClearDepthf( depth );
   }
 
-  void ClearStencil (GLint s)
+  void ClearStencil( GLint s )
   {
-    glClearStencil(s);
+    glClearStencil( s );
   }
 
-  void ColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+  void ColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha )
   {
-    glColorMask(red,green,blue,alpha);
+    glColorMask( red, green, blue, alpha );
   }
 
-  void CompileShader (GLuint shader)
+  void CompileShader( GLuint shader )
   {
-    glCompileShader(shader);
+    glCompileShader( shader );
   }
 
-  void CompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
+  void CompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data )
   {
-    glCompressedTexImage2D(target,level,internalformat,width,height,border,imageSize,data);
+    glCompressedTexImage2D( target, level, internalformat, width, height, border, imageSize, data );
   }
 
-  void CompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
+  void CompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data )
   {
-    glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data);
+    glCompressedTexSubImage2D( target, level, xoffset, yoffset, width, height, format, imageSize, data );
   }
 
-  void CopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+  void CopyTexImage2D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border )
   {
-    glCopyTexImage2D(target,level,internalformat,x,y,width,height,border);
+    glCopyTexImage2D( target, level, internalformat, x, y, width, height, border );
   }
 
-  void CopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+  void CopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height )
   {
-    glCopyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
+    glCopyTexSubImage2D( target, level, xoffset, yoffset, x, y, width, height );
   }
 
-  GLuint CreateProgram (void)
+  GLuint CreateProgram( void )
   {
     return glCreateProgram();
   }
 
-  GLuint CreateShader (GLenum type)
+  GLuint CreateShader( GLenum type )
   {
-    return glCreateShader(type);
+    return glCreateShader( type );
   }
 
-  void CullFace (GLenum mode)
+  void CullFace( GLenum mode )
   {
-    glCullFace(mode);
+    glCullFace( mode );
   }
 
-  void DeleteBuffers (GLsizei n, const GLuint* buffers)
+  void DeleteBuffers( GLsizei n, const GLuint* buffers )
   {
-    glDeleteBuffers(n,buffers);
+    glDeleteBuffers( n, buffers );
   }
 
-  void DeleteFramebuffers (GLsizei n, const GLuint* framebuffers)
+  void DeleteFramebuffers( GLsizei n, const GLuint* framebuffers )
   {
-    glDeleteFramebuffers(n,framebuffers);
+    glDeleteFramebuffers( n, framebuffers );
   }
 
-  void DeleteProgram (GLuint program)
+  void DeleteProgram( GLuint program )
   {
-    glDeleteProgram(program);
+    glDeleteProgram( program );
   }
 
-  void DeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers)
+  void DeleteRenderbuffers( GLsizei n, const GLuint* renderbuffers )
   {
-    glDeleteRenderbuffers(n,renderbuffers);
+    glDeleteRenderbuffers( n, renderbuffers );
   }
 
-  void DeleteShader (GLuint shader)
+  void DeleteShader( GLuint shader )
   {
-    glDeleteShader(shader);
+    glDeleteShader( shader );
   }
 
-  void DeleteTextures (GLsizei n, const GLuint* textures)
+  void DeleteTextures( GLsizei n, const GLuint* textures )
   {
-    glDeleteTextures(n,textures);
+    glDeleteTextures( n, textures );
   }
 
-  void DepthFunc (GLenum func)
+  void DepthFunc( GLenum func )
   {
-    glDepthFunc(func);
+    glDepthFunc( func );
   }
 
-  void DepthMask (GLboolean flag)
+  void DepthMask( GLboolean flag )
   {
-    glDepthMask(flag);
+    glDepthMask( flag );
   }
 
-  void DepthRangef (GLclampf zNear, GLclampf zFar)
+  void DepthRangef( GLclampf zNear, GLclampf zFar )
   {
-    glDepthRangef(zNear,zFar);
+    glDepthRangef( zNear, zFar );
   }
 
-  void DetachShader (GLuint program, GLuint shader)
+  void DetachShader( GLuint program, GLuint shader )
   {
-    glDetachShader(program,shader);
+    glDetachShader( program, shader );
   }
 
-  void Disable (GLenum cap)
+  void Disable( GLenum cap )
   {
-    glDisable(cap);
+    glDisable( cap );
   }
 
-  void DisableVertexAttribArray (GLuint index)
+  void DisableVertexAttribArray( GLuint index )
   {
-    glDisableVertexAttribArray(index);
+    glDisableVertexAttribArray( index );
   }
 
-  void DrawArrays (GLenum mode, GLint first, GLsizei count)
+  void DrawArrays( GLenum mode, GLint first, GLsizei count )
   {
-    glDrawArrays(mode,first,count);
+    glDrawArrays( mode, first, count );
   }
 
-  void DrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices)
+  void DrawElements( GLenum mode, GLsizei count, GLenum type, const void* indices )
   {
-    glDrawElements(mode,count,type,indices);
+    glDrawElements( mode, count, type, indices );
   }
 
-  void Enable (GLenum cap)
+  void Enable( GLenum cap )
   {
-    glEnable(cap);
+    glEnable( cap );
   }
 
-  void EnableVertexAttribArray (GLuint index)
+  void EnableVertexAttribArray( GLuint index )
   {
-    glEnableVertexAttribArray(index);
+    glEnableVertexAttribArray( index );
   }
 
-  void Finish (void)
+  void Finish( void )
   {
     glFinish();
   }
 
-  void Flush (void)
+  void Flush( void )
   {
     glFlush();
   }
 
-  void FramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+  void FramebufferRenderbuffer( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer )
   {
-    glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
+    glFramebufferRenderbuffer( target, attachment, renderbuffertarget, renderbuffer );
   }
 
-  void FramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+  void FramebufferTexture2D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level )
   {
-    glFramebufferTexture2D(target,attachment,textarget,texture,level);
+    glFramebufferTexture2D( target, attachment, textarget, texture, level );
   }
 
-  void FrontFace (GLenum mode)
+  void FrontFace( GLenum mode )
   {
-    glFrontFace(mode);
+    glFrontFace( mode );
   }
 
-  void GenBuffers (GLsizei n, GLuint* buffers)
+  void GenBuffers( GLsizei n, GLuint* buffers )
   {
-    glGenBuffers(n,buffers);
+    glGenBuffers( n, buffers );
   }
 
-  void GenerateMipmap (GLenum target)
+  void GenerateMipmap( GLenum target )
   {
-    glGenerateMipmap(target);
+    glGenerateMipmap( target );
   }
 
-  void GenFramebuffers (GLsizei n, GLuint* framebuffers)
+  void GenFramebuffers( GLsizei n, GLuint* framebuffers )
   {
-    glGenFramebuffers(n,framebuffers);
+    glGenFramebuffers( n, framebuffers );
   }
 
-  void GenRenderbuffers (GLsizei n, GLuint* renderbuffers)
+  void GenRenderbuffers( GLsizei n, GLuint* renderbuffers )
   {
-    glGenRenderbuffers(n,renderbuffers);
+    glGenRenderbuffers( n, renderbuffers );
   }
 
-  void GenTextures (GLsizei n, GLuint* textures)
+  void GenTextures( GLsizei n, GLuint* textures )
   {
-    glGenTextures(n,textures);
+    glGenTextures( n, textures );
   }
 
-  void GetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+  void GetActiveAttrib( GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name )
   {
-    glGetActiveAttrib(program,index,bufsize,length,size,type,name);
+    glGetActiveAttrib( program, index, bufsize, length, size, type, name );
   }
 
-  void GetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+  void GetActiveUniform( GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name )
   {
-    glGetActiveUniform(program,index,bufsize,length,size,type,name);
+    glGetActiveUniform( program, index, bufsize, length, size, type, name );
   }
 
-  void GetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
+  void GetAttachedShaders( GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders )
   {
-    glGetAttachedShaders(program,maxcount,count,shaders);
+    glGetAttachedShaders( program, maxcount, count, shaders );
   }
 
-  int  GetAttribLocation (GLuint program, const char* name)
+  int  GetAttribLocation( GLuint program, const char* name )
   {
-    return glGetAttribLocation(program,name);
+    return glGetAttribLocation( program, name );
   }
 
-  void GetBooleanv (GLenum pname, GLboolean* params)
+  void GetBooleanv( GLenum pname, GLboolean* params )
   {
-    glGetBooleanv(pname,params);
+    glGetBooleanv( pname, params );
   }
 
-  void GetBufferParameteriv (GLenum target, GLenum pname, GLint* params)
+  void GetBufferParameteriv( GLenum target, GLenum pname, GLint* params )
   {
-    glGetBufferParameteriv(target,pname,params);
+    glGetBufferParameteriv( target, pname, params );
   }
 
-  GLenum       GetError (void)
+  GLenum GetError( void )
   {
     return glGetError();
   }
 
-  void GetFloatv (GLenum pname, GLfloat* params)
+  void GetFloatv( GLenum pname, GLfloat* params )
   {
-    glGetFloatv(pname,params);
+    glGetFloatv( pname, params );
   }
 
-  void GetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params)
+  void GetFramebufferAttachmentParameteriv( GLenum target, GLenum attachment, GLenum pname, GLint* params )
   {
-    glGetFramebufferAttachmentParameteriv(target,attachment,pname,params);
+    glGetFramebufferAttachmentParameteriv( target, attachment, pname, params );
   }
 
-  void GetIntegerv (GLenum pname, GLint* params)
+  void GetIntegerv( GLenum pname, GLint* params )
   {
-    glGetIntegerv(pname,params);
+    glGetIntegerv( pname, params );
   }
 
-  void GetProgramiv (GLuint program, GLenum pname, GLint* params)
+  void GetProgramiv( GLuint program, GLenum pname, GLint* params )
   {
-    glGetProgramiv(program,pname,params);
+    glGetProgramiv( program, pname, params );
   }
 
-  void GetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
+  void GetProgramInfoLog( GLuint program, GLsizei bufsize, GLsizei* length, char* infolog )
   {
-    glGetProgramInfoLog(program,bufsize,length,infolog);
+    glGetProgramInfoLog( program, bufsize, length, infolog );
   }
 
-  void GetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params)
+  void GetRenderbufferParameteriv( GLenum target, GLenum pname, GLint* params )
   {
-    glGetRenderbufferParameteriv(target,pname,params);
+    glGetRenderbufferParameteriv( target, pname, params );
   }
 
-  void GetShaderiv (GLuint shader, GLenum pname, GLint* params)
+  void GetShaderiv( GLuint shader, GLenum pname, GLint* params )
   {
-    glGetShaderiv(shader,pname,params);
+    glGetShaderiv( shader, pname, params );
   }
 
-  void GetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
+  void GetShaderInfoLog( GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog )
   {
-    glGetShaderInfoLog(shader,bufsize,length,infolog);
+    glGetShaderInfoLog( shader, bufsize, length, infolog );
   }
 
-  void GetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
+  void GetShaderPrecisionFormat( GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision )
   {
-    glGetShaderPrecisionFormat(shadertype,precisiontype,range,precision);
+    glGetShaderPrecisionFormat( shadertype, precisiontype, range, precision );
   }
 
-  void GetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
+  void GetShaderSource( GLuint shader, GLsizei bufsize, GLsizei* length, char* source )
   {
-    glGetShaderSource(shader,bufsize,length,source);
+    glGetShaderSource( shader, bufsize, length, source );
   }
 
-  const GLubyte* GetString (GLenum name)
+  const GLubyte* GetString( GLenum name )
   {
-    return glGetString(name);
+    return glGetString( name );
   }
 
-  void GetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
+  void GetTexParameterfv( GLenum target, GLenum pname, GLfloat* params )
   {
-    glGetTexParameterfv(target,pname,params);
+    glGetTexParameterfv( target, pname, params );
   }
 
-  void GetTexParameteriv (GLenum target, GLenum pname, GLint* params)
+  void GetTexParameteriv( GLenum target, GLenum pname, GLint* params )
   {
-    glGetTexParameteriv(target,pname,params);
+    glGetTexParameteriv( target, pname, params );
   }
 
-  void GetUniformfv (GLuint program, GLint location, GLfloat* params)
+  void GetUniformfv( GLuint program, GLint location, GLfloat* params )
   {
-    glGetUniformfv(program,location,params);
+    glGetUniformfv( program, location, params );
   }
 
-  void GetUniformiv (GLuint program, GLint location, GLint* params)
+  void GetUniformiv( GLuint program, GLint location, GLint* params )
   {
-    glGetUniformiv(program,location,params);
+    glGetUniformiv( program, location, params );
   }
 
-  int  GetUniformLocation (GLuint program, const char* name)
+  int  GetUniformLocation( GLuint program, const char* name )
   {
-    return glGetUniformLocation(program,name);
+    return glGetUniformLocation( program, name );
   }
 
-  void GetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params)
+  void GetVertexAttribfv( GLuint index, GLenum pname, GLfloat* params )
   {
-    glGetVertexAttribfv(index,pname,params);
+    glGetVertexAttribfv( index, pname, params );
   }
 
-  void GetVertexAttribiv (GLuint index, GLenum pname, GLint* params)
+  void GetVertexAttribiv( GLuint index, GLenum pname, GLint* params )
   {
-    glGetVertexAttribiv(index,pname,params);
+    glGetVertexAttribiv( index, pname, params );
   }
 
-  void GetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer)
+  void GetVertexAttribPointerv( GLuint index, GLenum pname, void** pointer )
   {
-    glGetVertexAttribPointerv(index,pname,pointer);
+    glGetVertexAttribPointerv( index, pname, pointer );
   }
 
-  void Hint (GLenum target, GLenum mode)
+  void Hint( GLenum target, GLenum mode )
   {
-    glHint(target,mode);
+    glHint( target, mode );
   }
 
-  GLboolean IsBuffer (GLuint buffer)
+  GLboolean IsBuffer( GLuint buffer )
   {
-    return glIsBuffer(buffer);
+    return glIsBuffer( buffer );
   }
 
-  GLboolean IsEnabled (GLenum cap)
+  GLboolean IsEnabled( GLenum cap )
   {
-    return glIsEnabled(cap);
+    return glIsEnabled( cap );
   }
 
-  GLboolean IsFramebuffer (GLuint framebuffer)
+  GLboolean IsFramebuffer( GLuint framebuffer )
   {
-    return glIsFramebuffer(framebuffer);
+    return glIsFramebuffer( framebuffer );
   }
 
-  GLboolean IsProgram (GLuint program)
+  GLboolean IsProgram( GLuint program )
   {
-    return glIsProgram(program);
+    return glIsProgram( program );
   }
 
-  GLboolean IsRenderbuffer (GLuint renderbuffer)
+  GLboolean IsRenderbuffer( GLuint renderbuffer )
   {
-    return glIsRenderbuffer(renderbuffer);
+    return glIsRenderbuffer( renderbuffer );
   }
 
-  GLboolean IsShader (GLuint shader)
+  GLboolean IsShader( GLuint shader )
   {
-    return glIsShader(shader);
+    return glIsShader( shader );
   }
 
-  GLboolean IsTexture (GLuint texture)
+  GLboolean IsTexture( GLuint texture )
   {
-    return glIsTexture(texture);
+    return glIsTexture( texture );
   }
 
-  void LineWidth (GLfloat width)
+  void LineWidth( GLfloat width )
   {
-    glLineWidth(width);
+    glLineWidth( width );
   }
 
-  void LinkProgram (GLuint program)
+  void LinkProgram( GLuint program )
   {
-    glLinkProgram(program);
+    glLinkProgram( program );
   }
 
-  void PixelStorei (GLenum pname, GLint param)
+  void PixelStorei( GLenum pname, GLint param )
   {
-    glPixelStorei(pname,param);
+    glPixelStorei( pname, param );
   }
 
-  void PolygonOffset (GLfloat factor, GLfloat units)
+  void PolygonOffset( GLfloat factor, GLfloat units )
   {
-    glPolygonOffset(factor,units);
+    glPolygonOffset( factor, units );
   }
 
-  void ReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
+  void ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels )
   {
-    glReadPixels(x,y,width,height,format,type,pixels);
+    glReadPixels( x, y, width, height, format, type, pixels );
   }
 
-  void ReleaseShaderCompiler (void)
+  void ReleaseShaderCompiler( void )
   {
     glReleaseShaderCompiler();
   }
 
-  void RenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+  void RenderbufferStorage( GLenum target, GLenum internalformat, GLsizei width, GLsizei height )
   {
-    glRenderbufferStorage(target,internalformat,width,height);
+    glRenderbufferStorage( target, internalformat, width, height );
   }
 
-  void SampleCoverage (GLclampf value, GLboolean invert)
+  void SampleCoverage( GLclampf value, GLboolean invert )
   {
-    glSampleCoverage(value,invert);
+    glSampleCoverage( value, invert );
   }
 
-  void Scissor (GLint x, GLint y, GLsizei width, GLsizei height)
+  void Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
   {
-    glScissor(x,y,width,height);
+    glScissor( x, y, width, height );
   }
 
-  void ShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
+  void ShaderBinary( GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length )
   {
-    glShaderBinary(n,shaders,binaryformat,binary,length);
+    glShaderBinary( n, shaders, binaryformat, binary, length );
   }
 
-  void ShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length)
+  void ShaderSource( GLuint shader, GLsizei count, const char** string, const GLint* length )
   {
-    glShaderSource(shader,count,string,length);
+    glShaderSource( shader, count, string, length );
   }
 
-  void StencilFunc (GLenum func, GLint ref, GLuint mask)
+  void StencilFunc( GLenum func, GLint ref, GLuint mask )
   {
-    glStencilFunc(func,ref,mask);
+    glStencilFunc( func, ref, mask );
   }
 
-  void StencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
+  void StencilFuncSeparate( GLenum face, GLenum func, GLint ref, GLuint mask )
   {
-    glStencilFuncSeparate(face,func,ref,mask);
+    glStencilFuncSeparate( face, func, ref, mask );
   }
 
-  void StencilMask (GLuint mask)
+  void StencilMask( GLuint mask )
   {
-    glStencilMask(mask);
+    glStencilMask( mask );
   }
 
-  void StencilMaskSeparate (GLenum face, GLuint mask)
+  void StencilMaskSeparate( GLenum face, GLuint mask )
   {
-    glStencilMaskSeparate(face,mask);
+    glStencilMaskSeparate( face, mask );
   }
 
-  void StencilOp (GLenum fail, GLenum zfail, GLenum zpass)
+  void StencilOp( GLenum fail, GLenum zfail, GLenum zpass )
   {
-    glStencilOp(fail,zfail,zpass);
+    glStencilOp( fail, zfail, zpass );
   }
 
-  void StencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
+  void StencilOpSeparate( GLenum face, GLenum fail, GLenum zfail, GLenum zpass )
   {
-    glStencilOpSeparate(face,fail,zfail,zpass);
+    glStencilOpSeparate( face, fail, zfail, zpass );
   }
 
-  void TexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
+  void TexImage2D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels )
   {
-    glTexImage2D(target,level,internalformat,width,height,border,format,type,pixels);
+    glTexImage2D( target, level, internalformat, width, height, border, format, type, pixels );
   }
 
-  void TexParameterf (GLenum target, GLenum pname, GLfloat param)
+  void TexParameterf( GLenum target, GLenum pname, GLfloat param )
   {
-    glTexParameterf(target,pname,param);
+    glTexParameterf( target, pname, param );
   }
 
-  void TexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
+  void TexParameterfv( GLenum target, GLenum pname, const GLfloat* params )
   {
-    glTexParameterfv(target,pname,params);
+    glTexParameterfv( target, pname, params );
   }
 
-  void TexParameteri (GLenum target, GLenum pname, GLint param)
+  void TexParameteri( GLenum target, GLenum pname, GLint param )
   {
-    glTexParameteri(target,pname,param);
+    glTexParameteri( target, pname, param );
   }
 
-  void TexParameteriv (GLenum target, GLenum pname, const GLint* params)
+  void TexParameteriv( GLenum target, GLenum pname, const GLint* params )
   {
-    glTexParameteriv(target,pname,params);
+    glTexParameteriv( target, pname, params );
   }
 
-  void TexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
+  void TexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels )
   {
-    glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);
+    glTexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels );
   }
 
-  void Uniform1f (GLint location, GLfloat x)
+  void Uniform1f( GLint location, GLfloat x )
   {
-    glUniform1f(location,x);
+    glUniform1f( location, x );
   }
 
-  void Uniform1fv (GLint location, GLsizei count, const GLfloat* v)
+  void Uniform1fv( GLint location, GLsizei count, const GLfloat* v )
   {
-    glUniform1fv(location,count,v);
+    glUniform1fv( location, count, v );
   }
 
-  void Uniform1i (GLint location, GLint x)
+  void Uniform1i( GLint location, GLint x )
   {
-    glUniform1i(location,x);
+    glUniform1i( location, x );
   }
 
-  void Uniform1iv (GLint location, GLsizei count, const GLint* v)
+  void Uniform1iv( GLint location, GLsizei count, const GLint* v )
   {
-    glUniform1iv(location,count,v);
+    glUniform1iv( location, count, v );
   }
 
-  void Uniform2f (GLint location, GLfloat x, GLfloat y)
+  void Uniform2f( GLint location, GLfloat x, GLfloat y )
   {
-    glUniform2f(location,x,y);
+    glUniform2f( location, x, y );
   }
 
-  void Uniform2fv (GLint location, GLsizei count, const GLfloat* v)
+  void Uniform2fv( GLint location, GLsizei count, const GLfloat* v )
   {
-    glUniform2fv(location,count,v);
+    glUniform2fv( location, count, v );
   }
 
-  void Uniform2i (GLint location, GLint x, GLint y)
+  void Uniform2i( GLint location, GLint x, GLint y )
   {
-    glUniform2i(location,x,y);
+    glUniform2i( location, x, y );
   }
 
-  void Uniform2iv (GLint location, GLsizei count, const GLint* v)
+  void Uniform2iv( GLint location, GLsizei count, const GLint* v )
   {
-    glUniform2iv(location,count,v);
+    glUniform2iv( location, count, v );
   }
 
-  void Uniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)
+  void Uniform3f( GLint location, GLfloat x, GLfloat y, GLfloat z )
   {
-    glUniform3f(location,x,y,z);
+    glUniform3f( location, x, y, z );
   }
 
-  void Uniform3fv (GLint location, GLsizei count, const GLfloat* v)
+  void Uniform3fv( GLint location, GLsizei count, const GLfloat* v )
   {
-    glUniform3fv(location,count,v);
+    glUniform3fv( location, count, v );
   }
 
-  void Uniform3i (GLint location, GLint x, GLint y, GLint z)
+  void Uniform3i( GLint location, GLint x, GLint y, GLint z )
   {
-    glUniform3i(location,x,y,z);
+    glUniform3i( location, x, y, z );
   }
 
-  void Uniform3iv (GLint location, GLsizei count, const GLint* v)
+  void Uniform3iv( GLint location, GLsizei count, const GLint* v )
   {
-    glUniform3iv(location,count,v);
+    glUniform3iv( location, count, v );
   }
 
-  void Uniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+  void Uniform4f( GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
   {
-    glUniform4f(location,x,y,z,w);
+    glUniform4f( location, x, y, z, w );
   }
 
-  void Uniform4fv (GLint location, GLsizei count, const GLfloat* v)
+  void Uniform4fv( GLint location, GLsizei count, const GLfloat* v )
   {
-    glUniform4fv(location,count,v);
+    glUniform4fv( location, count, v );
   }
 
-  void Uniform4i (GLint location, GLint x, GLint y, GLint z, GLint w)
+  void Uniform4i( GLint location, GLint x, GLint y, GLint z, GLint w )
   {
-    glUniform4i(location,x,y,z,w);
+    glUniform4i( location, x, y, z, w );
   }
 
-  void Uniform4iv (GLint location, GLsizei count, const GLint* v)
+  void Uniform4iv( GLint location, GLsizei count, const GLint* v )
   {
-    glUniform4iv(location,count,v);
+    glUniform4iv( location, count, v );
   }
 
-  void UniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-    glUniformMatrix2fv(location,count,transpose,value);
+    glUniformMatrix2fv( location, count, transpose, value );
   }
 
-  void UniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-    glUniformMatrix3fv(location,count,transpose,value);
+    glUniformMatrix3fv( location, count, transpose, value );
   }
 
-  void UniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-    glUniformMatrix4fv(location,count,transpose,value);
+    glUniformMatrix4fv( location, count, transpose, value );
   }
 
-  void UseProgram (GLuint program)
+  void UseProgram( GLuint program )
   {
-    glUseProgram(program);
+    glUseProgram( program );
   }
 
-  void ValidateProgram (GLuint program)
+  void ValidateProgram( GLuint program )
   {
-    glValidateProgram(program);
+    glValidateProgram( program );
   }
 
-  void VertexAttrib1f (GLuint indx, GLfloat x)
+  void VertexAttrib1f( GLuint indx, GLfloat x )
   {
-    glVertexAttrib1f(indx,x);
+    glVertexAttrib1f( indx, x );
   }
 
-  void VertexAttrib1fv (GLuint indx, const GLfloat* values)
+  void VertexAttrib1fv( GLuint indx, const GLfloat* values )
   {
-    glVertexAttrib1fv(indx,values);
+    glVertexAttrib1fv( indx, values );
   }
 
-  void VertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)
+  void VertexAttrib2f( GLuint indx, GLfloat x, GLfloat y )
   {
-    glVertexAttrib2f(indx,x,y);
+    glVertexAttrib2f( indx, x, y );
   }
 
-  void VertexAttrib2fv (GLuint indx, const GLfloat* values)
+  void VertexAttrib2fv( GLuint indx, const GLfloat* values )
   {
-    glVertexAttrib2fv(indx,values);
+    glVertexAttrib2fv( indx, values );
   }
 
-  void VertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)
+  void VertexAttrib3f( GLuint indx, GLfloat x, GLfloat y, GLfloat z )
   {
-    glVertexAttrib3f(indx,x,y,z);
+    glVertexAttrib3f( indx, x, y, z );
   }
 
-  void VertexAttrib3fv (GLuint indx, const GLfloat* values)
+  void VertexAttrib3fv( GLuint indx, const GLfloat* values )
   {
-    glVertexAttrib3fv(indx,values);
+    glVertexAttrib3fv( indx, values );
   }
 
-  void VertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+  void VertexAttrib4f( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
   {
-    glVertexAttrib4f(indx,x,y,z,w);
+    glVertexAttrib4f( indx, x, y, z, w );
   }
 
-  void VertexAttrib4fv (GLuint indx, const GLfloat* values)
+  void VertexAttrib4fv( GLuint indx, const GLfloat* values )
   {
-    glVertexAttrib4fv(indx,values);
+    glVertexAttrib4fv( indx, values );
   }
 
-  void VertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
+  void VertexAttribPointer( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr )
   {
-    glVertexAttribPointer(indx,size,type,normalized,stride,ptr);
+    glVertexAttribPointer( indx, size, type, normalized, stride, ptr );
   }
 
-  void Viewport (GLint x, GLint y, GLsizei width, GLsizei height)
+  void Viewport( GLint x, GLint y, GLsizei width, GLsizei height )
   {
-    glViewport(x,y,width,height);
+    glViewport( x, y, width, height );
   }
 
   /* OpenGL ES 3.0 */
 
-  void ReadBuffer(GLenum mode)
+  void ReadBuffer( GLenum mode )
   {
-#if DALI_GLES_VERSION >= 30
-    glReadBuffer(mode);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->ReadBuffer( mode );
   }
 
-  void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)
+  void DrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices )
   {
-#if DALI_GLES_VERSION >= 30
-    glDrawRangeElements(mode,start,end,count,type,indices);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DrawRangeElements( mode, start, end, count, type, indices );
   }
 
-  void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
+  void TexImage3D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels )
   {
-#if DALI_GLES_VERSION >= 30
-    glTexImage3D(target,level,internalformat,width,height,depth,border,format,type,pixels);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->TexImage3D( target, level, internalformat, width, height, depth, border, format, type, pixels );
   }
 
-  void TexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
+  void TexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels )
   {
-#if DALI_GLES_VERSION >= 30
-    glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->TexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels );
   }
 
-  void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+  void CopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height )
   {
-#if DALI_GLES_VERSION >= 30
-    glCopyTexSubImage3D(target,level,xoffset,yoffset,zoffset,x,y,width,height);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->CopyTexSubImage3D( target, level, xoffset, yoffset, zoffset, x, y, width, height );
   }
 
-  void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
+  void CompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data )
   {
-#if DALI_GLES_VERSION >= 30
-    glCompressedTexImage3D(target,level,internalformat,width,height,depth,border,imageSize,data);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->CompressedTexImage3D( target, level, internalformat, width, height, depth, border, imageSize, data );
   }
 
-  void CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
+  void CompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data )
   {
-#if DALI_GLES_VERSION >= 30
-    glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->CompressedTexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data );
   }
 
-  void GenQueries(GLsizei n, GLuint* ids)
+  void GenQueries( GLsizei n, GLuint* ids )
   {
-#if DALI_GLES_VERSION >= 30
-    glGenQueries(n,ids);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GenQueries( n, ids );
   }
 
-  void DeleteQueries(GLsizei n, const GLuint* ids)
+  void DeleteQueries( GLsizei n, const GLuint* ids )
   {
-#if DALI_GLES_VERSION >= 30
-    glDeleteQueries(n,ids);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DeleteQueries( n, ids );
   }
 
-  GLboolean IsQuery(GLuint id)
+  GLboolean IsQuery( GLuint id )
   {
-#if DALI_GLES_VERSION >= 30
-    return glIsQuery(id);
-#else
-    return 0;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->IsQuery( id );
   }
 
-  void BeginQuery(GLenum target, GLuint id)
+  void BeginQuery( GLenum target, GLuint id )
   {
-#if DALI_GLES_VERSION >= 30
-    glBeginQuery(target,id);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->BeginQuery( target, id );
   }
 
-  void EndQuery(GLenum target)
+  void EndQuery( GLenum target )
   {
-#if DALI_GLES_VERSION >= 30
-    glEndQuery(target);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->EndQuery( target );
   }
 
-  void GetQueryiv(GLenum target, GLenum pname, GLint* params)
+  void GetQueryiv( GLenum target, GLenum pname, GLint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetQueryiv(target,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetQueryiv( target, pname, params );
   }
 
-  void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params)
+  void GetQueryObjectuiv( GLuint id, GLenum pname, GLuint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetQueryObjectuiv(id,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetQueryObjectuiv( id, pname, params );
   }
 
-  GLboolean UnmapBuffer(GLenum target)
+  GLboolean UnmapBuffer( GLenum target )
   {
-#if DALI_GLES_VERSION >= 30
-    return glUnmapBuffer(target);
-#else
-    return 0;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->UnmapBuffer( target );
   }
 
-  void GetBufferPointerv(GLenum target, GLenum pname, GLvoid** params)
+  void GetBufferPointerv( GLenum target, GLenum pname, GLvoid** params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetBufferPointerv(target,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetBufferPointerv( target, pname, params );
   }
 
-  void DrawBuffers(GLsizei n, const GLenum* bufs)
+  void DrawBuffers( GLsizei n, const GLenum* bufs )
   {
-#if DALI_GLES_VERSION >= 30
-    glDrawBuffers(n,bufs);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DrawBuffers( n, bufs );
   }
 
-  void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniformMatrix2x3fv(location,count,transpose,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->UniformMatrix2x3fv( location, count, transpose, value );
   }
 
-  void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniformMatrix3x2fv(location,count,transpose,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->UniformMatrix3x2fv( location, count, transpose, value );
   }
 
-  void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniformMatrix2x4fv(location,count,transpose,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->UniformMatrix2x4fv( location, count, transpose, value );
   }
 
-  void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniformMatrix4x2fv(location,count,transpose,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->UniformMatrix4x2fv( location, count, transpose, value );
   }
 
-  void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniformMatrix3x4fv(location,count,transpose,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->UniformMatrix3x4fv( location, count, transpose, value );
   }
 
-  void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+  void UniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniformMatrix4x3fv(location,count,transpose,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->UniformMatrix4x3fv( location, count, transpose, value );
   }
 
-  void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+  void BlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter )
   {
-#if DALI_GLES_VERSION >= 30
-    glBlitFramebuffer(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->BlitFramebuffer( srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter );
   }
 
-  void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+  void RenderbufferStorageMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height )
   {
-#if DALI_GLES_VERSION >= 30
-    glRenderbufferStorageMultisample(target,samples,internalformat,width,height);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->RenderbufferStorageMultisample( target, samples, internalformat, width, height );
   }
 
-  void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+  void FramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer )
   {
-#if DALI_GLES_VERSION >= 30
-    glFramebufferTextureLayer(target,attachment,texture,level,layer);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->FramebufferTextureLayer( target, attachment, texture, level, layer );
   }
 
-  GLvoid* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+  GLvoid* MapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access )
   {
-#if DALI_GLES_VERSION >= 30
-    return glMapBufferRange(target,offset,length,access);
-#else
-    return NULL;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->MapBufferRange( target, offset, length, access );
   }
 
-  void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
+  void FlushMappedBufferRange( GLenum target, GLintptr offset, GLsizeiptr length )
   {
-#if DALI_GLES_VERSION >= 30
-    glFlushMappedBufferRange(target,offset,length);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->FlushMappedBufferRange( target, offset, length );
   }
 
-  void BindVertexArray(GLuint array)
+  void BindVertexArray( GLuint array )
   {
-#if DALI_GLES_VERSION >= 30
-    glBindVertexArray(array);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->BindVertexArray( array );
   }
 
-  void DeleteVertexArrays(GLsizei n, const GLuint* arrays)
+  void DeleteVertexArrays( GLsizei n, const GLuint* arrays )
   {
-#if DALI_GLES_VERSION >= 30
-    glDeleteVertexArrays(n,arrays);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DeleteVertexArrays( n, arrays );
   }
 
-  void GenVertexArrays(GLsizei n, GLuint* arrays)
+  void GenVertexArrays( GLsizei n, GLuint* arrays )
   {
-#if DALI_GLES_VERSION >= 30
-    glGenVertexArrays(n,arrays);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GenVertexArrays( n, arrays );
   }
 
-  GLboolean IsVertexArray(GLuint array)
+  GLboolean IsVertexArray( GLuint array )
   {
-#if DALI_GLES_VERSION >= 30
-    return glIsVertexArray(array);
-#else
-    return 0;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->IsVertexArray( array );
   }
 
-  void GetIntegeri_v(GLenum target, GLuint index, GLint* data)
+  void GetIntegeri_v( GLenum target, GLuint index, GLint* data )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetIntegeri_v(target,index,data);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetIntegeri_v( target, index, data );
   }
 
-  void BeginTransformFeedback(GLenum primitiveMode)
+  void BeginTransformFeedback( GLenum primitiveMode )
   {
-#if DALI_GLES_VERSION >= 30
-    glBeginTransformFeedback(primitiveMode);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->BeginTransformFeedback( primitiveMode );
   }
 
-  void EndTransformFeedback(void)
+  void EndTransformFeedback( void )
   {
-#if DALI_GLES_VERSION >= 30
-    glEndTransformFeedback();
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->EndTransformFeedback();
   }
 
-  void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+  void BindBufferRange( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size )
   {
-#if DALI_GLES_VERSION >= 30
-    glBindBufferRange(target,index,buffer,offset,size);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->BindBufferRange( target, index, buffer, offset, size );
   }
 
-  void BindBufferBase(GLenum target, GLuint index, GLuint buffer)
+  void BindBufferBase( GLenum target, GLuint index, GLuint buffer )
   {
-#if DALI_GLES_VERSION >= 30
-    glBindBufferBase(target,index,buffer);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->BindBufferBase( target, index, buffer );
   }
 
-  void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode)
+  void TransformFeedbackVaryings( GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode )
   {
-#if DALI_GLES_VERSION >= 30
-    glTransformFeedbackVaryings(program,count,varyings,bufferMode);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->TransformFeedbackVaryings( program, count, varyings, bufferMode );
   }
 
-  void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
+  void GetTransformFeedbackVarying( GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetTransformFeedbackVarying( program, index, bufSize, length, size, type, name );
   }
 
-  void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)
+  void VertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer )
   {
-#if DALI_GLES_VERSION >= 30
-    glVertexAttribIPointer(index,size,type,stride,pointer);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->VertexAttribIPointer( index, size, type, stride, pointer );
   }
 
-  void GetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
+  void GetVertexAttribIiv( GLuint index, GLenum pname, GLint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetVertexAttribIiv(index,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetVertexAttribIiv( index, pname, params );
   }
 
-  void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
+  void GetVertexAttribIuiv( GLuint index, GLenum pname, GLuint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetVertexAttribIuiv(index,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetVertexAttribIuiv( index, pname, params );
   }
 
-  void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+  void VertexAttribI4i( GLuint index, GLint x, GLint y, GLint z, GLint w )
   {
-#if DALI_GLES_VERSION >= 30
-    glVertexAttribI4i(index,x,y,z,w);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->VertexAttribI4i( index, x, y, z, w );
   }
 
-  void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+  void VertexAttribI4ui( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w )
   {
-#if DALI_GLES_VERSION >= 30
-    glVertexAttribI4ui(index,x,y,z,w);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->VertexAttribI4ui( index, x, y, z, w );
   }
 
-  void VertexAttribI4iv(GLuint index, const GLint* v)
+  void VertexAttribI4iv( GLuint index, const GLint* v )
   {
-#if DALI_GLES_VERSION >= 30
-    glVertexAttribI4iv(index,v);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->VertexAttribI4iv( index, v );
   }
 
-  void VertexAttribI4uiv(GLuint index, const GLuint* v)
+  void VertexAttribI4uiv( GLuint index, const GLuint* v )
   {
-#if DALI_GLES_VERSION >= 30
-    glVertexAttribI4uiv(index,v);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->VertexAttribI4uiv( index, v );
   }
 
-  void GetUniformuiv(GLuint program, GLint location, GLuint* params)
+  void GetUniformuiv( GLuint program, GLint location, GLuint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetUniformuiv(program,location,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetUniformuiv( program, location, params );
   }
 
-  GLint GetFragDataLocation(GLuint program, const GLchar *name)
+  GLint GetFragDataLocation( GLuint program, const GLchar *name )
   {
-#if DALI_GLES_VERSION >= 30
-    return glGetFragDataLocation(program,name);
-#else
-    return -1;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->GetFragDataLocation( program, name );
   }
 
-  void Uniform1ui(GLint location, GLuint v0)
+  void Uniform1ui( GLint location, GLuint v0 )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniform1ui(location,v0);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->Uniform1ui( location, v0 );
   }
 
-  void Uniform2ui(GLint location, GLuint v0, GLuint v1)
+  void Uniform2ui( GLint location, GLuint v0, GLuint v1 )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniform2ui(location,v0,v1);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->Uniform2ui( location, v0, v1 );
   }
 
-  void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+  void Uniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2 )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniform3ui(location,v0,v1,v2);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->Uniform3ui( location, v0, v1, v2 );
   }
 
-  void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+  void Uniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniform4ui(location,v0,v1,v2,v3);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->Uniform4ui( location, v0, v1, v2, v3 );
   }
 
-  void Uniform1uiv(GLint location, GLsizei count, const GLuint* value)
+  void Uniform1uiv( GLint location, GLsizei count, const GLuint* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniform1uiv(location,count,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->Uniform1uiv( location, count, value );
   }
 
-  void Uniform2uiv(GLint location, GLsizei count, const GLuint* value)
+  void Uniform2uiv( GLint location, GLsizei count, const GLuint* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniform2uiv(location,count,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->Uniform2uiv( location, count, value );
   }
 
-  void Uniform3uiv(GLint location, GLsizei count, const GLuint* value)
+  void Uniform3uiv( GLint location, GLsizei count, const GLuint* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniform3uiv(location,count,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->Uniform3uiv( location, count, value );
   }
 
-  void Uniform4uiv(GLint location, GLsizei count, const GLuint* value)
+  void Uniform4uiv( GLint location, GLsizei count, const GLuint* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniform4uiv(location,count,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->Uniform4uiv( location, count, value );
   }
 
-  void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value)
+  void ClearBufferiv( GLenum buffer, GLint drawbuffer, const GLint* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glClearBufferiv(buffer,drawbuffer,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->ClearBufferiv( buffer, drawbuffer, value );
   }
 
-  void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value)
+  void ClearBufferuiv( GLenum buffer, GLint drawbuffer, const GLuint* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glClearBufferuiv(buffer,drawbuffer,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->ClearBufferuiv( buffer, drawbuffer, value );
   }
 
-  void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value)
+  void ClearBufferfv( GLenum buffer, GLint drawbuffer, const GLfloat* value )
   {
-#if DALI_GLES_VERSION >= 30
-    glClearBufferfv(buffer,drawbuffer,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->ClearBufferfv( buffer, drawbuffer, value );
   }
 
-  void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
+  void ClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil )
   {
-#if DALI_GLES_VERSION >= 30
-    glClearBufferfi(buffer,drawbuffer,depth,stencil);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->ClearBufferfi( buffer, drawbuffer, depth, stencil );
   }
 
-  const GLubyte* GetStringi(GLenum name, GLuint index)
+  const GLubyte* GetStringi( GLenum name, GLuint index )
   {
-#if DALI_GLES_VERSION >= 30
-    return glGetStringi(name,index);
-#else
-    return NULL;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->GetStringi( name, index );
   }
 
-  void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+  void CopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size )
   {
-#if DALI_GLES_VERSION >= 30
-    glCopyBufferSubData(readTarget,writeTarget,readOffset,writeOffset,size);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->CopyBufferSubData( readTarget, writeTarget, readOffset, writeOffset, size );
   }
 
-  void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices)
+  void GetUniformIndices( GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetUniformIndices( program, uniformCount, uniformNames, uniformIndices );
   }
 
-  void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)
+  void GetActiveUniformsiv( GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetActiveUniformsiv( program, uniformCount, uniformIndices, pname, params );
   }
 
-  GLuint GetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName)
+  GLuint GetUniformBlockIndex( GLuint program, const GLchar* uniformBlockName )
   {
-#if DALI_GLES_VERSION >= 30
-    return glGetUniformBlockIndex(program,uniformBlockName);
-#else
-    return 0;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->GetUniformBlockIndex( program, uniformBlockName );
   }
 
-  void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
+  void GetActiveUniformBlockiv( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetActiveUniformBlockiv( program, uniformBlockIndex, pname, params );
   }
 
-  void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
+  void GetActiveUniformBlockName( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetActiveUniformBlockName( program, uniformBlockIndex, bufSize, length, uniformBlockName );
   }
 
-  void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+  void UniformBlockBinding( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding )
   {
-#if DALI_GLES_VERSION >= 30
-    glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->UniformBlockBinding( program, uniformBlockIndex, uniformBlockBinding );
   }
 
-  void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
+  void DrawArraysInstanced( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount )
   {
-#if DALI_GLES_VERSION >= 30
-    glDrawArraysInstanced(mode,first,count,instanceCount);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DrawArraysInstanced( mode, first, count, instanceCount );
   }
 
-  void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount)
+  void DrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount )
   {
-#if DALI_GLES_VERSION >= 30
-    glDrawElementsInstanced(mode,count,type,indices,instanceCount);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DrawElementsInstanced( mode, count, type, indices, instanceCount );
   }
 
-  GLsync FenceSync(GLenum condition, GLbitfield flags)
+  GLsync FenceSync( GLenum condition, GLbitfield flags )
   {
-#if DALI_GLES_VERSION >= 30
-    return glFenceSync(condition,flags);
-#else
-    return NULL;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->FenceSync( condition, flags );
   }
 
-  GLboolean IsSync(GLsync sync)
+  GLboolean IsSync( GLsync sync )
   {
-#if DALI_GLES_VERSION >= 30
-    return glIsSync(sync);
-#else
-    return 0;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->IsSync( sync );
   }
 
-  void DeleteSync(GLsync sync)
+  void DeleteSync( GLsync sync )
   {
-#if DALI_GLES_VERSION >= 30
-    glDeleteSync(sync);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DeleteSync( sync );
   }
 
-  GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+  GLenum ClientWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout )
   {
-#if DALI_GLES_VERSION >= 30
-    return glClientWaitSync(sync,flags,timeout);
-#else
-    return 0;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->ClientWaitSync( sync, flags, timeout );
   }
 
-  void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+  void WaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout )
   {
-#if DALI_GLES_VERSION >= 30
-    glWaitSync(sync,flags,timeout);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->WaitSync( sync, flags, timeout );
   }
 
-  void GetInteger64v(GLenum pname, GLint64* params)
+  void GetInteger64v( GLenum pname, GLint64* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetInteger64v(pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetInteger64v( pname, params );
   }
 
-  void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
+  void GetSynciv( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetSynciv(sync,pname,bufSize,length,values);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetSynciv( sync, pname, bufSize, length, values );
   }
 
-  void GetInteger64i_v(GLenum target, GLuint index, GLint64* data)
+  void GetInteger64i_v( GLenum target, GLuint index, GLint64* data )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetInteger64i_v(target,index,data);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetInteger64i_v( target, index, data );
   }
 
-  void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params)
+  void GetBufferParameteri64v( GLenum target, GLenum pname, GLint64* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetBufferParameteri64v(target,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetBufferParameteri64v( target, pname, params );
   }
 
-  void GenSamplers(GLsizei count, GLuint* samplers)
+  void GenSamplers( GLsizei count, GLuint* samplers )
   {
-#if DALI_GLES_VERSION >= 30
-    glGenSamplers(count,samplers);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GenSamplers( count, samplers );
   }
 
-  void DeleteSamplers(GLsizei count, const GLuint* samplers)
+  void DeleteSamplers( GLsizei count, const GLuint* samplers )
   {
-#if DALI_GLES_VERSION >= 30
-    glDeleteSamplers(count,samplers);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DeleteSamplers( count, samplers );
   }
 
-  GLboolean IsSampler(GLuint sampler)
+  GLboolean IsSampler( GLuint sampler )
   {
-#if DALI_GLES_VERSION >= 30
-    return glIsSampler(sampler);
-#else
-    return 0;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->IsSampler( sampler );
   }
 
-  void BindSampler(GLuint unit, GLuint sampler)
+  void BindSampler( GLuint unit, GLuint sampler )
   {
-#if DALI_GLES_VERSION >= 30
-    glBindSampler(unit,sampler);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->BindSampler( unit, sampler );
   }
 
-  void SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
+  void SamplerParameteri( GLuint sampler, GLenum pname, GLint param )
   {
-#if DALI_GLES_VERSION >= 30
-    glSamplerParameteri(sampler,pname,param);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->SamplerParameteri( sampler, pname, param );
   }
 
-  void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param)
+  void SamplerParameteriv( GLuint sampler, GLenum pname, const GLint* param )
   {
-#if DALI_GLES_VERSION >= 30
-    glSamplerParameteriv(sampler,pname,param);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->SamplerParameteriv( sampler, pname, param );
   }
 
-  void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+  void SamplerParameterf( GLuint sampler, GLenum pname, GLfloat param )
   {
-#if DALI_GLES_VERSION >= 30
-    glSamplerParameterf(sampler,pname,param);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->SamplerParameterf( sampler, pname, param );
   }
 
-  void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param)
+  void SamplerParameterfv( GLuint sampler, GLenum pname, const GLfloat* param )
   {
-#if DALI_GLES_VERSION >= 30
-    glSamplerParameterfv(sampler,pname,param);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->SamplerParameterfv( sampler, pname, param );
   }
 
-  void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
+  void GetSamplerParameteriv( GLuint sampler, GLenum pname, GLint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetSamplerParameteriv(sampler,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetSamplerParameteriv( sampler, pname, params );
   }
 
-  void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
+  void GetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetSamplerParameterfv(sampler,pname,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetSamplerParameterfv( sampler, pname, params );
   }
 
-  void VertexAttribDivisor(GLuint index, GLuint divisor)
+  void VertexAttribDivisor( GLuint index, GLuint divisor )
   {
-#if DALI_GLES_VERSION >= 30
-    glVertexAttribDivisor(index,divisor);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->VertexAttribDivisor( index, divisor );
   }
 
-  void BindTransformFeedback(GLenum target, GLuint id)
+  void BindTransformFeedback( GLenum target, GLuint id )
   {
-#if DALI_GLES_VERSION >= 30
-    glBindTransformFeedback(target,id);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->BindTransformFeedback( target, id );
   }
 
-  void DeleteTransformFeedbacks(GLsizei n, const GLuint* ids)
+  void DeleteTransformFeedbacks( GLsizei n, const GLuint* ids )
   {
-#if DALI_GLES_VERSION >= 30
-    glDeleteTransformFeedbacks(n,ids);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->DeleteTransformFeedbacks( n, ids );
   }
 
-  void GenTransformFeedbacks(GLsizei n, GLuint* ids)
+  void GenTransformFeedbacks( GLsizei n, GLuint* ids )
   {
-#if DALI_GLES_VERSION >= 30
-    glGenTransformFeedbacks(n,ids);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GenTransformFeedbacks( n, ids );
   }
 
-  GLboolean IsTransformFeedback(GLuint id)
+  GLboolean IsTransformFeedback( GLuint id )
   {
-#if DALI_GLES_VERSION >= 30
-    return glIsTransformFeedback(id);
-#else
-    return 0;
-#endif // DALI_GLES_VERSION >= 30
+    return mImpl->IsTransformFeedback( id );
   }
 
-  void PauseTransformFeedback(void)
+  void PauseTransformFeedback( void )
   {
-#if DALI_GLES_VERSION >= 30
-    glPauseTransformFeedback();
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->PauseTransformFeedback();
   }
 
-  void ResumeTransformFeedback(void)
+  void ResumeTransformFeedback( void )
   {
-#if DALI_GLES_VERSION >= 30
-    glResumeTransformFeedback();
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->ResumeTransformFeedback();
   }
 
-  void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)
+  void GetProgramBinary( GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary )
   {
-#if DALI_GLES_VERSION >= 30
-    // if OpenGL ES 2.0 compatibility is need this can be implemented with
-    // glGetProgramBinaryOES
-    glGetProgramBinary(program,bufSize,length,binaryFormat,binary);
-#else
-    mGlExtensions.GetProgramBinaryOES(program, bufSize, length, binaryFormat, binary);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetProgramBinary( program, bufSize, length, binaryFormat, binary );
   }
 
-  void ProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length)
+  void ProgramBinary( GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length )
   {
-#if DALI_GLES_VERSION >= 30
-    // if OpenGL ES 2.0 compatibility is need this can be implemented with
-    // glProgramBinaryOES
-    glProgramBinary(program,binaryFormat,binary,length);
-#else
-    mGlExtensions.ProgramBinaryOES(program, binaryFormat, binary, length);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->ProgramBinary( program, binaryFormat, binary, length );
   }
 
-  void ProgramParameteri(GLuint program, GLenum pname, GLint value)
+  void ProgramParameteri( GLuint program, GLenum pname, GLint value )
   {
-#if DALI_GLES_VERSION >= 30
-    glProgramParameteri(program,pname,value);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->ProgramParameteri( program, pname, value );
   }
 
-  void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments)
+  void InvalidateFramebuffer( GLenum target, GLsizei numAttachments, const GLenum* attachments )
   {
-#if DALI_GLES_VERSION >= 30
-    glInvalidateFramebuffer(target,numAttachments,attachments);
-#else
-    mGlExtensions.DiscardFrameBuffer(target, numAttachments, attachments);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->InvalidateFramebuffer( target, numAttachments, attachments );
   }
 
-  void InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+  void InvalidateSubFramebuffer( GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height )
   {
-#if DALI_GLES_VERSION >= 30
-    glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->InvalidateSubFramebuffer( target, numAttachments, attachments, x, y, width, height );
   }
 
-  void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+  void TexStorage2D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height )
   {
-#if DALI_GLES_VERSION >= 30
-    glTexStorage2D(target,levels,internalformat,width,height);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->TexStorage2D( target, levels, internalformat, width, height );
   }
 
-  void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+  void TexStorage3D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth )
   {
-#if DALI_GLES_VERSION >= 30
-    glTexStorage3D(target,levels,internalformat,width,height,depth);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->TexStorage3D( target, levels, internalformat, width, height, depth );
   }
 
-  void GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
+  void GetInternalformativ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params )
   {
-#if DALI_GLES_VERSION >= 30
-    glGetInternalformativ(target,internalformat,pname,bufSize,params);
-#endif // DALI_GLES_VERSION >= 30
+    mImpl->GetInternalformativ( target, internalformat, pname, bufSize, params );
   }
 
 private:
-  ECoreX::GlExtensions mGlExtensions;
-
+  int32_t mGlesVersion;
+  std::unique_ptr<GlesAbstraction> mImpl;
 };
 
 } // namespace Adaptor
@@ -1554,4 +1342,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_GL_IMPLEMENTATION_H__
+#endif // DALI_INTERNAL_GL_IMPLEMENTATION_H
diff --git a/dali/internal/graphics/gles/gles-abstraction.h b/dali/internal/graphics/gles/gles-abstraction.h
new file mode 100644 (file)
index 0000000..16f7cd2
--- /dev/null
@@ -0,0 +1,250 @@
+#ifndef DALI_INTERNAL_GLES_ABSTRACTION_H
+#define DALI_INTERNAL_GLES_ABSTRACTION_H
+
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class GlesAbstraction
+{
+
+public:
+
+  virtual void ReadBuffer( GLenum mode ) = 0;
+
+  virtual void DrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices ) = 0;
+
+  virtual void TexImage3D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels ) = 0;
+
+  virtual void TexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels ) = 0;
+
+  virtual void CopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) = 0;
+
+  virtual void CompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data ) = 0;
+
+  virtual void CompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data ) = 0;
+
+  virtual void GenQueries( GLsizei n, GLuint* ids ) = 0;
+
+  virtual void DeleteQueries( GLsizei n, const GLuint* ids ) = 0;
+
+  virtual GLboolean IsQuery( GLuint id ) = 0;
+
+  virtual void BeginQuery( GLenum target, GLuint id ) = 0;
+
+  virtual void EndQuery( GLenum target ) = 0;
+
+  virtual void GetQueryiv( GLenum target, GLenum pname, GLint* params ) = 0;
+
+  virtual void GetQueryObjectuiv( GLuint id, GLenum pname, GLuint* params ) = 0;
+
+  virtual GLboolean UnmapBuffer( GLenum target ) = 0;
+
+  virtual void GetBufferPointerv( GLenum target, GLenum pname, GLvoid** params ) = 0;
+
+  virtual void DrawBuffers( GLsizei n, const GLenum* bufs ) = 0;
+
+  virtual void UniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) = 0;
+
+  virtual void UniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) = 0;
+
+  virtual void UniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) = 0;
+
+  virtual void UniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) = 0;
+
+  virtual void UniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) = 0;
+
+  virtual void UniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) = 0;
+
+  virtual void BlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) = 0;
+
+  virtual void RenderbufferStorageMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) = 0;
+
+  virtual void FramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) = 0;
+
+  virtual GLvoid* MapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) = 0;
+
+  virtual void FlushMappedBufferRange( GLenum target, GLintptr offset, GLsizeiptr length ) = 0;
+
+  virtual void BindVertexArray( GLuint array ) = 0;
+
+  virtual void DeleteVertexArrays( GLsizei n, const GLuint* arrays ) = 0;
+
+  virtual void GenVertexArrays( GLsizei n, GLuint* arrays ) = 0;
+
+  virtual GLboolean IsVertexArray( GLuint array ) = 0;
+
+  virtual void GetIntegeri_v( GLenum target, GLuint index, GLint* data ) = 0;
+
+  virtual void BeginTransformFeedback( GLenum primitiveMode ) = 0;
+
+  virtual void EndTransformFeedback( void ) = 0;
+
+  virtual void BindBufferRange( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) = 0;
+
+  virtual void BindBufferBase( GLenum target, GLuint index, GLuint buffer ) = 0;
+
+  virtual void TransformFeedbackVaryings( GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode ) = 0;
+
+  virtual void GetTransformFeedbackVarying( GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name ) = 0;
+
+  virtual void VertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer ) = 0;
+
+  virtual void GetVertexAttribIiv( GLuint index, GLenum pname, GLint* params ) = 0;
+
+  virtual void GetVertexAttribIuiv( GLuint index, GLenum pname, GLuint* params ) = 0;
+
+  virtual void VertexAttribI4i( GLuint index, GLint x, GLint y, GLint z, GLint w ) = 0;
+
+  virtual void VertexAttribI4ui( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) = 0;
+
+  virtual void VertexAttribI4iv( GLuint index, const GLint* v ) = 0;
+
+  virtual void VertexAttribI4uiv( GLuint index, const GLuint* v ) = 0;
+
+  virtual void GetUniformuiv( GLuint program, GLint location, GLuint* params ) = 0;
+
+  virtual GLint GetFragDataLocation( GLuint program, const GLchar *name ) = 0;
+
+  virtual void Uniform1ui( GLint location, GLuint v0 ) = 0;
+
+  virtual void Uniform2ui( GLint location, GLuint v0, GLuint v1 ) = 0;
+
+  virtual void Uniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2 ) = 0;
+
+  virtual void Uniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) = 0;
+
+  virtual void Uniform1uiv( GLint location, GLsizei count, const GLuint* value ) = 0;
+
+  virtual void Uniform2uiv( GLint location, GLsizei count, const GLuint* value ) = 0;
+
+  virtual void Uniform3uiv( GLint location, GLsizei count, const GLuint* value ) = 0;
+
+  virtual void Uniform4uiv( GLint location, GLsizei count, const GLuint* value ) = 0;
+
+  virtual void ClearBufferiv( GLenum buffer, GLint drawbuffer, const GLint* value ) = 0;
+
+  virtual void ClearBufferuiv( GLenum buffer, GLint drawbuffer, const GLuint* value ) = 0;
+
+  virtual void ClearBufferfv( GLenum buffer, GLint drawbuffer, const GLfloat* value ) = 0;
+
+  virtual void ClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) = 0;
+
+  virtual const GLubyte* GetStringi( GLenum name, GLuint index ) = 0;
+
+  virtual void CopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) = 0;
+
+  virtual void GetUniformIndices( GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices ) = 0;
+
+  virtual void GetActiveUniformsiv( GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params ) = 0;
+
+  virtual GLuint GetUniformBlockIndex( GLuint program, const GLchar* uniformBlockName ) = 0;
+
+  virtual void GetActiveUniformBlockiv( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params ) = 0;
+
+  virtual void GetActiveUniformBlockName( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName ) = 0;
+
+  virtual void UniformBlockBinding( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) = 0;
+
+  virtual void DrawArraysInstanced( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) = 0;
+
+  virtual void DrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount ) = 0;
+
+  virtual GLsync FenceSync( GLenum condition, GLbitfield flags ) = 0;
+
+  virtual GLboolean IsSync( GLsync sync ) = 0;
+
+  virtual void DeleteSync( GLsync sync ) = 0;
+
+  virtual GLenum ClientWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ) = 0;
+
+  virtual void WaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ) = 0;
+
+  virtual void GetInteger64v( GLenum pname, GLint64* params ) = 0;
+
+  virtual void GetSynciv( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values ) = 0;
+
+  virtual void GetInteger64i_v( GLenum target, GLuint index, GLint64* data ) = 0;
+
+  virtual void GetBufferParameteri64v( GLenum target, GLenum pname, GLint64* params ) = 0;
+
+  virtual void GenSamplers( GLsizei count, GLuint* samplers ) = 0;
+
+  virtual void DeleteSamplers( GLsizei count, const GLuint* samplers ) = 0;
+
+  virtual GLboolean IsSampler( GLuint sampler ) = 0;
+
+  virtual void BindSampler( GLuint unit, GLuint sampler ) = 0;
+
+  virtual void SamplerParameteri( GLuint sampler, GLenum pname, GLint param ) = 0;
+
+  virtual void SamplerParameteriv( GLuint sampler, GLenum pname, const GLint* param ) = 0;
+
+  virtual void SamplerParameterf( GLuint sampler, GLenum pname, GLfloat param ) = 0;
+
+  virtual void SamplerParameterfv( GLuint sampler, GLenum pname, const GLfloat* param ) = 0;
+
+  virtual void GetSamplerParameteriv( GLuint sampler, GLenum pname, GLint* params ) = 0;
+
+  virtual void GetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat* params ) = 0;
+
+  virtual void VertexAttribDivisor( GLuint index, GLuint divisor ) = 0;
+
+  virtual void BindTransformFeedback( GLenum target, GLuint id ) = 0;
+
+  virtual void DeleteTransformFeedbacks( GLsizei n, const GLuint* ids ) = 0;
+
+  virtual void GenTransformFeedbacks( GLsizei n, GLuint* ids ) = 0;
+
+  virtual GLboolean IsTransformFeedback( GLuint id ) = 0;
+
+  virtual void PauseTransformFeedback( void ) = 0;
+
+  virtual void ResumeTransformFeedback( void ) = 0;
+
+  virtual void GetProgramBinary( GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary ) = 0;
+
+  virtual void ProgramBinary( GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length ) = 0;
+
+  virtual void ProgramParameteri( GLuint program, GLenum pname, GLint value ) = 0;
+
+  virtual void InvalidateFramebuffer( GLenum target, GLsizei numAttachments, const GLenum* attachments ) = 0;
+
+  virtual void InvalidateSubFramebuffer( GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height ) = 0;
+
+  virtual void TexStorage2D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) = 0;
+
+  virtual void TexStorage3D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) = 0;
+
+  virtual void GetInternalformativ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params ) = 0;
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_GLES_ABSTRACTION_H
diff --git a/dali/internal/graphics/gles/gles2-implementation.h b/dali/internal/graphics/gles/gles2-implementation.h
new file mode 100644 (file)
index 0000000..054d877
--- /dev/null
@@ -0,0 +1,587 @@
+#ifndef DALI_INTERNAL_GLES2_IMPLEMENTATION_H
+#define DALI_INTERNAL_GLES2_IMPLEMENTATION_H
+
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+ // EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/graphics/gles/gl-extensions.h>
+#include <dali/internal/graphics/gles/gles-abstraction.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class Gles2Implementation : public GlesAbstraction
+{
+
+public:
+  Gles2Implementation() {}
+
+  ~Gles2Implementation() {}
+
+  void ReadBuffer( GLenum mode ) override
+  {
+    DALI_LOG_ERROR( "glReadBuffer is not supported in OpenGL es 2.0\n" );
+  }
+
+  void DrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices ) override
+  {
+    DALI_LOG_ERROR( "glDrawRangeElements is not supported in OpenGL es 2.0\n" );
+  }
+
+  void TexImage3D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels ) override
+  {
+    DALI_LOG_ERROR( "glTexImage3D is not supported in OpenGL es 2.0\n" );
+  }
+
+  void TexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels ) override
+  {
+    DALI_LOG_ERROR( "glTexSubImage3D is not supported in OpenGL es 2.0\n" );
+  }
+
+  void CopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) override
+  {
+    DALI_LOG_ERROR( "glCopyTexSubImage3D is not supported in OpenGL es 2.0\n" );
+  }
+
+  void CompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data ) override
+  {
+    DALI_LOG_ERROR( "glCompressedTexImage3D is not supported in OpenGL es 2.0\n" );
+  }
+
+  void CompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data ) override
+  {
+    DALI_LOG_ERROR( "glCompressedTexSubImage3D is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GenQueries( GLsizei n, GLuint* ids ) override
+  {
+    DALI_LOG_ERROR( "glGenQueries is not supported in OpenGL es 2.0\n" );
+  }
+
+  void DeleteQueries( GLsizei n, const GLuint* ids ) override
+  {
+    DALI_LOG_ERROR( "glDeleteQueries is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLboolean IsQuery( GLuint id ) override
+  {
+    DALI_LOG_ERROR( "glIsQuery is not supported in OpenGL es 2.0\n" );
+    return 0;
+  }
+
+  void BeginQuery( GLenum target, GLuint id ) override
+  {
+    DALI_LOG_ERROR( "glBeginQuery is not supported in OpenGL es 2.0\n" );
+  }
+
+  void EndQuery( GLenum target ) override
+  {
+    DALI_LOG_ERROR( "glEndQuery is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetQueryiv( GLenum target, GLenum pname, GLint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetQueryiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetQueryObjectuiv( GLuint id, GLenum pname, GLuint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetQueryObjectuiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLboolean UnmapBuffer( GLenum target ) override
+  {
+    DALI_LOG_ERROR( "glUnmapBuffer is not supported in OpenGL es 2.0\n" );
+    return 0;
+  }
+
+  void GetBufferPointerv( GLenum target, GLenum pname, GLvoid** params ) override
+  {
+    DALI_LOG_ERROR( "glGetBufferPointerv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void DrawBuffers( GLsizei n, const GLenum* bufs ) override
+  {
+    DALI_LOG_ERROR( "glDrawBuffers is not supported in OpenGL es 2.0\n" );
+  }
+
+  void UniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    DALI_LOG_ERROR( "glUniformMatrix2x3fv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void UniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    DALI_LOG_ERROR( "glUniformMatrix3x2fv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void UniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    DALI_LOG_ERROR( "glUniformMatrix2x4fv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void UniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    DALI_LOG_ERROR( "glUniformMatrix4x2fv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void UniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    DALI_LOG_ERROR( "glUniformMatrix3x4fv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void UniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    DALI_LOG_ERROR( "glUniformMatrix4x3fv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void BlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) override
+  {
+    DALI_LOG_ERROR( "glBlitFramebuffer is not supported in OpenGL es 2.0\n" );
+  }
+
+  void RenderbufferStorageMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) override
+  {
+    DALI_LOG_ERROR( "glRenderbufferStorageMultisample is not supported in OpenGL es 2.0\n" );
+  }
+
+  void FramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) override
+  {
+    DALI_LOG_ERROR( "glFramebufferTextureLayer is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLvoid* MapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) override
+  {
+    DALI_LOG_ERROR( "glMapBufferRange is not supported in OpenGL es 2.0\n" );
+    return NULL;
+  }
+
+  void FlushMappedBufferRange( GLenum target, GLintptr offset, GLsizeiptr length ) override
+  {
+    DALI_LOG_ERROR( "glFlushMappedBufferRange is not supported in OpenGL es 2.0\n" );
+  }
+
+  void BindVertexArray( GLuint array ) override
+  {
+    DALI_LOG_ERROR( "glBindVertexArray is not supported in OpenGL es 2.0\n" );
+  }
+
+  void DeleteVertexArrays( GLsizei n, const GLuint* arrays ) override
+  {
+    DALI_LOG_ERROR( "glDeleteVertexArrays is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GenVertexArrays( GLsizei n, GLuint* arrays ) override
+  {
+    DALI_LOG_ERROR( "glGenVertexArrays is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLboolean IsVertexArray( GLuint array ) override
+  {
+    DALI_LOG_ERROR( "glIsVertexArray is not supported in OpenGL es 2.0\n" );
+    return 0;
+  }
+
+  void GetIntegeri_v( GLenum target, GLuint index, GLint* data ) override
+  {
+    DALI_LOG_ERROR( "glGetIntegeri_v is not supported in OpenGL es 2.0\n" );
+  }
+
+  void BeginTransformFeedback( GLenum primitiveMode ) override
+  {
+    DALI_LOG_ERROR( "glBeginTransformFeedback is not supported in OpenGL es 2.0\n" );
+  }
+
+  void EndTransformFeedback( void ) override
+  {
+    DALI_LOG_ERROR( "glEndTransformFeedback is not supported in OpenGL es 2.0\n" );
+  }
+
+  void BindBufferRange( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) override
+  {
+    DALI_LOG_ERROR( "glBindBufferRange is not supported in OpenGL es 2.0\n" );
+  }
+
+  void BindBufferBase( GLenum target, GLuint index, GLuint buffer ) override
+  {
+    DALI_LOG_ERROR( "glBindBufferBase is not supported in OpenGL es 2.0\n" );
+  }
+
+  void TransformFeedbackVaryings( GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode ) override
+  {
+    DALI_LOG_ERROR( "glTransformFeedbackVaryings is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetTransformFeedbackVarying( GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name ) override
+  {
+    DALI_LOG_ERROR( "glGetTransformFeedbackVarying is not supported in OpenGL es 2.0\n" );
+  }
+
+  void VertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer ) override
+  {
+    DALI_LOG_ERROR( "glVertexAttribIPointer is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetVertexAttribIiv( GLuint index, GLenum pname, GLint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetVertexAttribIiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetVertexAttribIuiv( GLuint index, GLenum pname, GLuint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetVertexAttribIuiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void VertexAttribI4i( GLuint index, GLint x, GLint y, GLint z, GLint w ) override
+  {
+    DALI_LOG_ERROR( "glVertexAttribI4i is not supported in OpenGL es 2.0\n" );
+  }
+
+  void VertexAttribI4ui( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) override
+  {
+    DALI_LOG_ERROR( "glVertexAttribI4ui is not supported in OpenGL es 2.0\n" );
+  }
+
+  void VertexAttribI4iv( GLuint index, const GLint* v ) override
+  {
+    DALI_LOG_ERROR( "glVertexAttribI4iv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void VertexAttribI4uiv( GLuint index, const GLuint* v ) override
+  {
+    DALI_LOG_ERROR( "glVertexAttribI4uiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetUniformuiv( GLuint program, GLint location, GLuint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetUniformuiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLint GetFragDataLocation( GLuint program, const GLchar *name ) override
+  {
+    DALI_LOG_ERROR( "glGetFragDataLocation is not supported in OpenGL es 2.0\n" );
+    return -1;
+  }
+
+  void Uniform1ui( GLint location, GLuint v0 ) override
+  {
+    DALI_LOG_ERROR( "glUniform1ui is not supported in OpenGL es 2.0\n" );
+  }
+
+  void Uniform2ui( GLint location, GLuint v0, GLuint v1 ) override
+  {
+    DALI_LOG_ERROR( "glUniform2ui is not supported in OpenGL es 2.0\n" );
+  }
+
+  void Uniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2 ) override
+  {
+    DALI_LOG_ERROR( "glUniform3ui is not supported in OpenGL es 2.0\n" );
+  }
+
+  void Uniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) override
+  {
+    DALI_LOG_ERROR( "glUniform4ui is not supported in OpenGL es 2.0\n" );
+  }
+
+  void Uniform1uiv( GLint location, GLsizei count, const GLuint* value ) override
+  {
+    DALI_LOG_ERROR( "glUniform1uiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void Uniform2uiv( GLint location, GLsizei count, const GLuint* value ) override
+  {
+    DALI_LOG_ERROR( "glUniform2uiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void Uniform3uiv( GLint location, GLsizei count, const GLuint* value ) override
+  {
+    DALI_LOG_ERROR( "glUniform3uiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void Uniform4uiv( GLint location, GLsizei count, const GLuint* value ) override
+  {
+    DALI_LOG_ERROR( "glUniform4uiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void ClearBufferiv( GLenum buffer, GLint drawbuffer, const GLint* value ) override
+  {
+    DALI_LOG_ERROR( "glClearBufferiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void ClearBufferuiv( GLenum buffer, GLint drawbuffer, const GLuint* value ) override
+  {
+    DALI_LOG_ERROR( "glClearBufferuiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void ClearBufferfv( GLenum buffer, GLint drawbuffer, const GLfloat* value ) override
+  {
+    DALI_LOG_ERROR( "glClearBufferfv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void ClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) override
+  {
+    DALI_LOG_ERROR( "glClearBufferfi is not supported in OpenGL es 2.0\n" );
+  }
+
+  const GLubyte* GetStringi( GLenum name, GLuint index ) override
+  {
+    DALI_LOG_ERROR( "glGetStringi is not supported in OpenGL es 2.0\n" );
+    return NULL;
+  }
+
+  void CopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) override
+  {
+    DALI_LOG_ERROR( "glCopyBufferSubData is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetUniformIndices( GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices ) override
+  {
+    DALI_LOG_ERROR( "glGetUniformIndices is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetActiveUniformsiv( GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetActiveUniformsiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLuint GetUniformBlockIndex( GLuint program, const GLchar* uniformBlockName ) override
+  {
+    DALI_LOG_ERROR( "glGetUniformBlockIndex is not supported in OpenGL es 2.0\n" );
+    return 0;
+  }
+
+  void GetActiveUniformBlockiv( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetActiveUniformBlockiv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetActiveUniformBlockName( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName ) override
+  {
+    DALI_LOG_ERROR( "glGetActiveUniformBlockName is not supported in OpenGL es 2.0\n" );
+  }
+
+  void UniformBlockBinding( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) override
+  {
+    DALI_LOG_ERROR( "glUniformBlockBinding is not supported in OpenGL es 2.0\n" );
+  }
+
+  void DrawArraysInstanced( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) override
+  {
+    DALI_LOG_ERROR( "glDrawArraysInstanced is not supported in OpenGL es 2.0\n" );
+  }
+
+  void DrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount ) override
+  {
+    DALI_LOG_ERROR( "glDrawElementsInstanced is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLsync FenceSync( GLenum condition, GLbitfield flags ) override
+  {
+    DALI_LOG_ERROR( "glFenceSync is not supported in OpenGL es 2.0\n" );
+    return NULL;
+  }
+
+  GLboolean IsSync( GLsync sync ) override
+  {
+    DALI_LOG_ERROR( "glIsSync is not supported in OpenGL es 2.0\n" );
+    return 0;
+  }
+
+  void DeleteSync( GLsync sync ) override
+  {
+    DALI_LOG_ERROR( "glDeleteSync is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLenum ClientWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ) override
+  {
+    DALI_LOG_ERROR( "glClientWaitSync is not supported in OpenGL es 2.0\n" );
+    return 0;
+  }
+
+  void WaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ) override
+  {
+    DALI_LOG_ERROR( "glWaitSync is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetInteger64v( GLenum pname, GLint64* params ) override
+  {
+    DALI_LOG_ERROR( "glGetInteger64v is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetSynciv( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values ) override
+  {
+    DALI_LOG_ERROR( "glGetSynciv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetInteger64i_v( GLenum target, GLuint index, GLint64* data ) override
+  {
+    DALI_LOG_ERROR( "glGetInteger64i_v is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetBufferParameteri64v( GLenum target, GLenum pname, GLint64* params ) override
+  {
+    DALI_LOG_ERROR( "glGetBufferParameteri64v is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GenSamplers( GLsizei count, GLuint* samplers ) override
+  {
+    DALI_LOG_ERROR( "glGenSamplers is not supported in OpenGL es 2.0\n" );
+  }
+
+  void DeleteSamplers( GLsizei count, const GLuint* samplers ) override
+  {
+    DALI_LOG_ERROR( "glDeleteSamplers is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLboolean IsSampler( GLuint sampler ) override
+  {
+    DALI_LOG_ERROR( "glIsSampler is not supported in OpenGL es 2.0\n" );
+    return 0;
+  }
+
+  void BindSampler( GLuint unit, GLuint sampler ) override
+  {
+    DALI_LOG_ERROR( "glBindSampler is not supported in OpenGL es 2.0\n" );
+  }
+
+  void SamplerParameteri( GLuint sampler, GLenum pname, GLint param ) override
+  {
+    DALI_LOG_ERROR( "glSamplerParameteri is not supported in OpenGL es 2.0\n" );
+  }
+
+  void SamplerParameteriv( GLuint sampler, GLenum pname, const GLint* param ) override
+  {
+    DALI_LOG_ERROR( "glSamplerParameteriv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void SamplerParameterf( GLuint sampler, GLenum pname, GLfloat param ) override
+  {
+    DALI_LOG_ERROR( "glSamplerParameterf is not supported in OpenGL es 2.0\n" );
+  }
+
+  void SamplerParameterfv( GLuint sampler, GLenum pname, const GLfloat* param ) override
+  {
+    DALI_LOG_ERROR( "glSamplerParameterfv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetSamplerParameteriv( GLuint sampler, GLenum pname, GLint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetSamplerParameteriv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat* params ) override
+  {
+    DALI_LOG_ERROR( "glGetSamplerParameterfv is not supported in OpenGL es 2.0\n" );
+  }
+
+  void VertexAttribDivisor( GLuint index, GLuint divisor ) override
+  {
+    DALI_LOG_ERROR( "glVertexAttribDivisor is not supported in OpenGL es 2.0\n" );
+  }
+
+  void BindTransformFeedback( GLenum target, GLuint id ) override
+  {
+    DALI_LOG_ERROR( "glBindTransformFeedback is not supported in OpenGL es 2.0\n" );
+  }
+
+  void DeleteTransformFeedbacks( GLsizei n, const GLuint* ids ) override
+  {
+    DALI_LOG_ERROR( "glDeleteTransformFeedbacks is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GenTransformFeedbacks( GLsizei n, GLuint* ids ) override
+  {
+    DALI_LOG_ERROR( "glGenTransformFeedbacks is not supported in OpenGL es 2.0\n" );
+  }
+
+  GLboolean IsTransformFeedback( GLuint id ) override
+  {
+    DALI_LOG_ERROR( "glIsTransformFeedback is not supported in OpenGL es 2.0\n" );
+    return 0;
+  }
+
+  void PauseTransformFeedback( void ) override
+  {
+    DALI_LOG_ERROR( "glPauseTransformFeedback is not supported in OpenGL es 2.0\n" );
+  }
+
+  void ResumeTransformFeedback( void ) override
+  {
+    DALI_LOG_ERROR( "glResumeTransformFeedback is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetProgramBinary( GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary ) override
+  {
+    mGlExtensions.GetProgramBinaryOES( program, bufSize, length, binaryFormat, binary );
+  }
+
+  void ProgramBinary( GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length ) override
+  {
+    mGlExtensions.ProgramBinaryOES( program, binaryFormat, binary, length );
+  }
+
+  void ProgramParameteri( GLuint program, GLenum pname, GLint value ) override
+  {
+    DALI_LOG_ERROR( "glProgramParameteri is not supported in OpenGL es 2.0\n" );
+  }
+
+  void InvalidateFramebuffer( GLenum target, GLsizei numAttachments, const GLenum* attachments ) override
+  {
+    mGlExtensions.DiscardFrameBuffer( target, numAttachments, attachments );
+  }
+
+  void InvalidateSubFramebuffer( GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height ) override
+  {
+    DALI_LOG_ERROR( "glInvalidateSubFramebuffer is not supported in OpenGL es 2.0\n" );
+  }
+
+  void TexStorage2D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) override
+  {
+    DALI_LOG_ERROR( "glTexStorage2D is not supported in OpenGL es 2.0\n" );
+  }
+
+  void TexStorage3D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) override
+  {
+    DALI_LOG_ERROR( "glTexStorage3D is not supported in OpenGL es 2.0\n" );
+  }
+
+  void GetInternalformativ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params ) override
+  {
+    DALI_LOG_ERROR( "glGetInternalformativ is not supported in OpenGL es 2.0\n" );
+  }
+
+private:
+  ECoreX::GlExtensions mGlExtensions;
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_GLES2_IMPLEMENTATION_H
diff --git a/dali/internal/graphics/gles/gles3-implementation.h b/dali/internal/graphics/gles/gles3-implementation.h
new file mode 100644 (file)
index 0000000..fca29c8
--- /dev/null
@@ -0,0 +1,571 @@
+#ifndef DALI_INTERNAL_GLES3_IMPLEMENTATION_H
+#define DALI_INTERNAL_GLES3_IMPLEMENTATION_H
+
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+ // EXTERNAL INCLUDES
+#include <GLES3/gl3.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/graphics/gles/gles-abstraction.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class Gles3Implementation : public GlesAbstraction
+{
+
+public:
+  Gles3Implementation() {}
+
+  ~Gles3Implementation() {}
+
+  void ReadBuffer( GLenum mode ) override
+  {
+    glReadBuffer( mode );
+  }
+
+  void DrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices ) override
+  {
+    glDrawRangeElements( mode, start, end, count, type, indices );
+  }
+
+  void TexImage3D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels ) override
+  {
+    glTexImage3D( target, level, internalformat, width, height, depth, border, format, type, pixels );
+  }
+
+  void TexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels ) override
+  {
+    glTexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels );
+  }
+
+  void CopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) override
+  {
+    glCopyTexSubImage3D( target, level, xoffset, yoffset, zoffset, x, y, width, height );
+  }
+
+  void CompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data ) override
+  {
+    glCompressedTexImage3D( target, level, internalformat, width, height, depth, border, imageSize, data );
+  }
+
+  void CompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data ) override
+  {
+    glCompressedTexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data );
+  }
+
+  void GenQueries( GLsizei n, GLuint* ids ) override
+  {
+    glGenQueries( n, ids );
+  }
+
+  void DeleteQueries( GLsizei n, const GLuint* ids ) override
+  {
+    glDeleteQueries( n, ids );
+  }
+
+  GLboolean IsQuery( GLuint id ) override
+  {
+    return glIsQuery( id );
+  }
+
+  void BeginQuery( GLenum target, GLuint id ) override
+  {
+    glBeginQuery( target, id );
+  }
+
+  void EndQuery( GLenum target ) override
+  {
+    glEndQuery( target );
+  }
+
+  void GetQueryiv( GLenum target, GLenum pname, GLint* params ) override
+  {
+    glGetQueryiv( target, pname, params );
+  }
+
+  void GetQueryObjectuiv( GLuint id, GLenum pname, GLuint* params ) override
+  {
+    glGetQueryObjectuiv( id, pname, params );
+  }
+
+  GLboolean UnmapBuffer( GLenum target ) override
+  {
+    return glUnmapBuffer( target );
+  }
+
+  void GetBufferPointerv( GLenum target, GLenum pname, GLvoid** params ) override
+  {
+    glGetBufferPointerv( target, pname, params );
+  }
+
+  void DrawBuffers( GLsizei n, const GLenum* bufs ) override
+  {
+    glDrawBuffers( n, bufs );
+  }
+
+  void UniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    glUniformMatrix2x3fv( location, count, transpose, value );
+  }
+
+  void UniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    glUniformMatrix3x2fv( location, count, transpose, value );
+  }
+
+  void UniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    glUniformMatrix2x4fv( location, count, transpose, value );
+  }
+
+  void UniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    glUniformMatrix4x2fv( location, count, transpose, value );
+  }
+
+  void UniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    glUniformMatrix3x4fv( location, count, transpose, value );
+  }
+
+  void UniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ) override
+  {
+    glUniformMatrix4x3fv( location, count, transpose, value );
+  }
+
+  void BlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) override
+  {
+    glBlitFramebuffer( srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter );
+  }
+
+  void RenderbufferStorageMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) override
+  {
+    glRenderbufferStorageMultisample( target, samples, internalformat, width, height );
+  }
+
+  void FramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) override
+  {
+    glFramebufferTextureLayer( target, attachment, texture, level, layer );
+  }
+
+  GLvoid* MapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) override
+  {
+    return glMapBufferRange( target, offset, length, access );
+  }
+
+  void FlushMappedBufferRange( GLenum target, GLintptr offset, GLsizeiptr length ) override
+  {
+    glFlushMappedBufferRange( target, offset, length );
+  }
+
+  void BindVertexArray( GLuint array ) override
+  {
+    glBindVertexArray( array );
+  }
+
+  void DeleteVertexArrays( GLsizei n, const GLuint* arrays ) override
+  {
+    glDeleteVertexArrays( n, arrays );
+  }
+
+  void GenVertexArrays( GLsizei n, GLuint* arrays ) override
+  {
+    glGenVertexArrays( n, arrays );
+  }
+
+  GLboolean IsVertexArray( GLuint array ) override
+  {
+    return glIsVertexArray( array );
+  }
+
+  void GetIntegeri_v( GLenum target, GLuint index, GLint* data ) override
+  {
+    glGetIntegeri_v( target, index, data );
+  }
+
+  void BeginTransformFeedback( GLenum primitiveMode ) override
+  {
+    glBeginTransformFeedback( primitiveMode );
+  }
+
+  void EndTransformFeedback( void ) override
+  {
+    glEndTransformFeedback();
+  }
+
+  void BindBufferRange( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) override
+  {
+    glBindBufferRange( target, index, buffer, offset, size );
+  }
+
+  void BindBufferBase( GLenum target, GLuint index, GLuint buffer ) override
+  {
+    glBindBufferBase( target, index, buffer );
+  }
+
+  void TransformFeedbackVaryings( GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode ) override
+  {
+    glTransformFeedbackVaryings( program, count, varyings, bufferMode );
+  }
+
+  void GetTransformFeedbackVarying( GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name ) override
+  {
+    glGetTransformFeedbackVarying( program, index, bufSize, length, size, type, name );
+  }
+
+  void VertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer ) override
+  {
+    glVertexAttribIPointer( index, size, type, stride, pointer );
+  }
+
+  void GetVertexAttribIiv( GLuint index, GLenum pname, GLint* params ) override
+  {
+    glGetVertexAttribIiv( index, pname, params );
+  }
+
+  void GetVertexAttribIuiv( GLuint index, GLenum pname, GLuint* params ) override
+  {
+    glGetVertexAttribIuiv( index, pname, params );
+  }
+
+  void VertexAttribI4i( GLuint index, GLint x, GLint y, GLint z, GLint w ) override
+  {
+    glVertexAttribI4i( index, x, y, z, w );
+  }
+
+  void VertexAttribI4ui( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) override
+  {
+    glVertexAttribI4ui( index, x, y, z, w );
+  }
+
+  void VertexAttribI4iv( GLuint index, const GLint* v ) override
+  {
+    glVertexAttribI4iv( index, v );
+  }
+
+  void VertexAttribI4uiv( GLuint index, const GLuint* v ) override
+  {
+    glVertexAttribI4uiv( index, v );
+  }
+
+  void GetUniformuiv( GLuint program, GLint location, GLuint* params ) override
+  {
+    glGetUniformuiv( program, location, params );
+  }
+
+  GLint GetFragDataLocation( GLuint program, const GLchar *name ) override
+  {
+    return glGetFragDataLocation( program, name );
+  }
+
+  void Uniform1ui( GLint location, GLuint v0 ) override
+  {
+    glUniform1ui( location, v0 );
+  }
+
+  void Uniform2ui( GLint location, GLuint v0, GLuint v1 ) override
+  {
+    glUniform2ui( location, v0, v1 );
+  }
+
+  void Uniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2 ) override
+  {
+    glUniform3ui( location, v0, v1, v2 );
+  }
+
+  void Uniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) override
+  {
+    glUniform4ui( location, v0, v1, v2, v3 );
+  }
+
+  void Uniform1uiv( GLint location, GLsizei count, const GLuint* value ) override
+  {
+    glUniform1uiv( location, count, value );
+  }
+
+  void Uniform2uiv( GLint location, GLsizei count, const GLuint* value ) override
+  {
+    glUniform2uiv( location, count, value );
+  }
+
+  void Uniform3uiv( GLint location, GLsizei count, const GLuint* value ) override
+  {
+    glUniform3uiv( location, count, value );
+  }
+
+  void Uniform4uiv( GLint location, GLsizei count, const GLuint* value ) override
+  {
+    glUniform4uiv( location, count, value );
+  }
+
+  void ClearBufferiv( GLenum buffer, GLint drawbuffer, const GLint* value ) override
+  {
+    glClearBufferiv( buffer, drawbuffer, value );
+  }
+
+  void ClearBufferuiv( GLenum buffer, GLint drawbuffer, const GLuint* value ) override
+  {
+    glClearBufferuiv( buffer, drawbuffer, value );
+  }
+
+  void ClearBufferfv( GLenum buffer, GLint drawbuffer, const GLfloat* value ) override
+  {
+    glClearBufferfv( buffer, drawbuffer, value );
+  }
+
+  void ClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) override
+  {
+    glClearBufferfi( buffer, drawbuffer, depth, stencil );
+  }
+
+  const GLubyte* GetStringi( GLenum name, GLuint index ) override
+  {
+    return glGetStringi( name, index );
+  }
+
+  void CopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) override
+  {
+    glCopyBufferSubData( readTarget, writeTarget, readOffset, writeOffset, size );
+  }
+
+  void GetUniformIndices( GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices ) override
+  {
+    glGetUniformIndices( program, uniformCount, uniformNames, uniformIndices );
+  }
+
+  void GetActiveUniformsiv( GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params ) override
+  {
+    glGetActiveUniformsiv( program, uniformCount, uniformIndices, pname, params );
+  }
+
+  GLuint GetUniformBlockIndex( GLuint program, const GLchar* uniformBlockName ) override
+  {
+    return glGetUniformBlockIndex( program, uniformBlockName );
+  }
+
+  void GetActiveUniformBlockiv( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params ) override
+  {
+    glGetActiveUniformBlockiv( program, uniformBlockIndex, pname, params );
+  }
+
+  void GetActiveUniformBlockName( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName ) override
+  {
+    glGetActiveUniformBlockName( program, uniformBlockIndex, bufSize, length, uniformBlockName );
+  }
+
+  void UniformBlockBinding( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) override
+  {
+    glUniformBlockBinding( program, uniformBlockIndex, uniformBlockBinding );
+  }
+
+  void DrawArraysInstanced( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) override
+  {
+    glDrawArraysInstanced( mode, first, count, instanceCount );
+  }
+
+  void DrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount ) override
+  {
+    glDrawElementsInstanced( mode, count, type, indices, instanceCount );
+  }
+
+  GLsync FenceSync( GLenum condition, GLbitfield flags ) override
+  {
+    return glFenceSync( condition, flags );
+  }
+
+  GLboolean IsSync( GLsync sync ) override
+  {
+    return glIsSync( sync );
+  }
+
+  void DeleteSync( GLsync sync ) override
+  {
+    glDeleteSync( sync );
+  }
+
+  GLenum ClientWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ) override
+  {
+    return glClientWaitSync( sync, flags, timeout );
+  }
+
+  void WaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ) override
+  {
+    glWaitSync( sync, flags, timeout );
+  }
+
+  void GetInteger64v( GLenum pname, GLint64* params ) override
+  {
+    glGetInteger64v( pname, params );
+  }
+
+  void GetSynciv( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values ) override
+  {
+    glGetSynciv( sync, pname, bufSize, length, values );
+  }
+
+  void GetInteger64i_v( GLenum target, GLuint index, GLint64* data ) override
+  {
+    glGetInteger64i_v( target, index, data );
+  }
+
+  void GetBufferParameteri64v( GLenum target, GLenum pname, GLint64* params ) override
+  {
+    glGetBufferParameteri64v( target, pname, params );
+  }
+
+  void GenSamplers( GLsizei count, GLuint* samplers ) override
+  {
+    glGenSamplers( count, samplers );
+  }
+
+  void DeleteSamplers( GLsizei count, const GLuint* samplers ) override
+  {
+    glDeleteSamplers( count, samplers );
+  }
+
+  GLboolean IsSampler( GLuint sampler ) override
+  {
+    return glIsSampler( sampler );
+  }
+
+  void BindSampler( GLuint unit, GLuint sampler ) override
+  {
+    glBindSampler( unit, sampler );
+  }
+
+  void SamplerParameteri( GLuint sampler, GLenum pname, GLint param ) override
+  {
+    glSamplerParameteri( sampler, pname, param );
+  }
+
+  void SamplerParameteriv( GLuint sampler, GLenum pname, const GLint* param ) override
+  {
+    glSamplerParameteriv( sampler, pname, param );
+  }
+
+  void SamplerParameterf( GLuint sampler, GLenum pname, GLfloat param ) override
+  {
+    glSamplerParameterf( sampler, pname, param );
+  }
+
+  void SamplerParameterfv( GLuint sampler, GLenum pname, const GLfloat* param ) override
+  {
+    glSamplerParameterfv( sampler, pname, param );
+  }
+
+  void GetSamplerParameteriv( GLuint sampler, GLenum pname, GLint* params ) override
+  {
+    glGetSamplerParameteriv( sampler, pname, params );
+  }
+
+  void GetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat* params ) override
+  {
+    glGetSamplerParameterfv( sampler, pname, params );
+  }
+
+  void VertexAttribDivisor( GLuint index, GLuint divisor ) override
+  {
+    glVertexAttribDivisor( index, divisor );
+  }
+
+  void BindTransformFeedback( GLenum target, GLuint id ) override
+  {
+    glBindTransformFeedback( target, id );
+  }
+
+  void DeleteTransformFeedbacks( GLsizei n, const GLuint* ids ) override
+  {
+    glDeleteTransformFeedbacks( n, ids );
+  }
+
+  void GenTransformFeedbacks( GLsizei n, GLuint* ids ) override
+  {
+    glGenTransformFeedbacks( n, ids );
+  }
+
+  GLboolean IsTransformFeedback( GLuint id ) override
+  {
+    return glIsTransformFeedback( id );
+  }
+
+  void PauseTransformFeedback( void ) override
+  {
+    glPauseTransformFeedback();
+  }
+
+  void ResumeTransformFeedback( void ) override
+  {
+    glResumeTransformFeedback();
+  }
+
+  void GetProgramBinary( GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary ) override
+  {
+    glGetProgramBinary( program, bufSize, length, binaryFormat, binary );
+  }
+
+  void ProgramBinary( GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length ) override
+  {
+    glProgramBinary( program, binaryFormat, binary, length );
+  }
+
+  void ProgramParameteri( GLuint program, GLenum pname, GLint value ) override
+  {
+    glProgramParameteri( program, pname, value );
+  }
+
+  void InvalidateFramebuffer( GLenum target, GLsizei numAttachments, const GLenum* attachments ) override
+  {
+    glInvalidateFramebuffer( target, numAttachments, attachments );
+  }
+
+  void InvalidateSubFramebuffer( GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height ) override
+  {
+    glInvalidateSubFramebuffer( target, numAttachments, attachments, x, y, width, height );
+  }
+
+  void TexStorage2D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) override
+  {
+    glTexStorage2D( target, levels, internalformat, width, height );
+  }
+
+  void TexStorage3D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) override
+  {
+    glTexStorage3D( target, levels, internalformat, width, height, depth );
+  }
+
+  void GetInternalformativ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params ) override
+  {
+    glGetInternalformativ( target, internalformat, pname, bufSize, params );
+  }
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_GLES3_IMPLEMENTATION_H
index a0d4d79..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>
-
-#else
 #include <GLES2/gl2.h>
-#endif // DALI_GLES_VERSION >= 30
-
 #include <GLES2/gl2ext.h>
+#include <GLES3/gl3.h>
 
 #include <EGL/eglext.h>
 
index 526b3dd..6901bf5 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>
-
-#else
 #include <GLES2/gl2.h>
-#endif // DALI_GLES_VERSION >= 30
-
 #include <GLES2/gl2ext.h>
+#include <GLES3/gl3.h>
 
 #include <EGL/eglext.h>
 
index d03d7c9..5004161 100644 (file)
@@ -480,7 +480,7 @@ TIZEN_PLATFORM_CONFIG_SUPPORTED="%{tizen_platform_config_supported}" ; export TI
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if mobile || "undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -525,7 +525,7 @@ make clean
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if tv ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=TV \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -569,7 +569,7 @@ make clean
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if wearable || "undefined"
 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -613,7 +613,7 @@ make clean
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if ivi ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=IVI \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -659,7 +659,7 @@ make clean
 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
 # if common ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=COMMON \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -712,7 +712,7 @@ make clean
 # if mobile || "undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=MOBILE \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -758,7 +758,7 @@ make clean
 # if tv ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
 
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=TV \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -803,7 +803,7 @@ make clean
 # if wearable || "undefined"
 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=WEARABLE \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -848,7 +848,7 @@ make clean
 # if ivi ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
 
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=IVI \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3
@@ -894,7 +894,7 @@ make clean
 # if common ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
 
-%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} \
+%configure --prefix=$PREFIX --with-jpeg-turbo \
            --enable-shaderbincache=DISABLE --enable-profile=COMMON \
            --enable-tizen-major-version=%{tizen_version_major} \
 %if 0%{?tizen_version_major} >= 3