Ensure glVertexAttribDivisor is gles3 only 87/293587/1
authorDavid Steele <david.steele@samsung.com>
Wed, 31 May 2023 13:15:47 +0000 (14:15 +0100)
committerDavid Steele <david.steele@samsung.com>
Wed, 31 May 2023 13:15:47 +0000 (14:15 +0100)
Change-Id: Icb27671fea032fb00edfe8ff07808e2ab9e3b2eb

dali/internal/graphics/gles-impl/gles-context.cpp

index 073bf62599f13620032c8247f067df4497ee9b1d..a073193a769c7079edee037d726891a7aad33985 100644 (file)
@@ -403,18 +403,21 @@ void Context::Flush(bool reset, const GLES::DrawCallDescriptor& drawCall, GLES::
                                 reinterpret_cast<void*>(attr.offset));
       }
 
-      switch(bufferBinding.inputRate)
+      if(hasGLES3)
       {
-        case Graphics::VertexInputRate::PER_VERTEX:
+        switch(bufferBinding.inputRate)
         {
-          gl.VertexAttribDivisor(attr.location, 0);
-          break;
-        }
-        case Graphics::VertexInputRate::PER_INSTANCE:
-        {
-          //@todo Get actual instance rate...
-          gl.VertexAttribDivisor(attr.location, 1);
-          break;
+          case Graphics::VertexInputRate::PER_VERTEX:
+          {
+            gl.VertexAttribDivisor(attr.location, 0);
+            break;
+          }
+          case Graphics::VertexInputRate::PER_INSTANCE:
+          {
+            //@todo Get actual instance rate...
+            gl.VertexAttribDivisor(attr.location, 1);
+            break;
+          }
         }
       }
     }