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 073bf62..a073193 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;
+          }
         }
       }
     }