Added previously ommited types of geometry: LINE_STRIP, LINE_LOOP in the 'switch... 69/65869/1
authorAdam Bialogonski <adam.b@samsung.com>
Wed, 13 Apr 2016 13:53:38 +0000 (14:53 +0100)
committerAdam Bialogonski <adam.b@samsung.com>
Wed, 13 Apr 2016 13:53:38 +0000 (14:53 +0100)
Change-Id: I273ca4b0d08a5de45e20badf345207d47b23a5b5

dali/internal/render/renderers/render-geometry.cpp

index 2b84cdb..0f26ea6 100644 (file)
@@ -223,6 +223,32 @@ void RenderGeometry::UploadAndDraw(
       }
       break;
     }
+    case Dali::Geometry::LINE_LOOP:
+    {
+      if( numIndices )
+      {
+        context.DrawElements(GL_LINE_LOOP, numIndices, GL_UNSIGNED_SHORT, 0);
+      }
+      else
+      {
+        unsigned int numVertices = mVertexBuffers[0]->GetElementCount();
+        context.DrawArrays(GL_LINE_LOOP, 0, numVertices );
+      }
+      break;
+    }
+    case Dali::Geometry::LINE_STRIP:
+    {
+      if( numIndices )
+      {
+        context.DrawElements(GL_LINE_STRIP, numIndices, GL_UNSIGNED_SHORT, 0);
+      }
+      else
+      {
+        unsigned int numVertices = mVertexBuffers[0]->GetElementCount();
+        context.DrawArrays(GL_LINE_STRIP, 0, numVertices );
+      }
+      break;
+    }
     default:
     {
       DALI_ASSERT_ALWAYS( 0 && "Geometry type not supported (yet)" );