[dali_2.3.28] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-physics / internal / chipmunk-impl / chipmunk-physics-debug-renderer.cpp
index 2e60d97..9c776c6 100644 (file)
@@ -163,6 +163,7 @@ PhysicsDebugRenderer::PhysicsDebugRenderer(uint32_t width, uint32_t height, Dali
                                                                CP_SPACE_DEBUG_DRAW_CONSTRAINTS);
   mDebugDrawOptions.colorForShape       = DebugDrawColorForShapeImpl;
   mDebugDrawOptions.shapeOutlineColor   = cpSpaceDebugColor{0.0f, 1.0f, 1.0f, 0.9f};
+  mDebugDrawOptions.constraintColor     = cpSpaceDebugColor{0.5f, 0.5f, 0.5f, 0.9f};
   mDebugDrawOptions.collisionPointColor = cpSpaceDebugColor{1.0f, 0.0f, 0.0f, 1.0f};
   mDebugDrawOptions.data                = this;
 }
@@ -266,9 +267,9 @@ void PhysicsDebugRenderer::RenderLines(const Dali::RenderCallbackInput& input)
   glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
 
   glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBufferId);
-  glBufferData(GL_ELEMENT_ARRAY_BUFFER, mIndices.size() * sizeof(uint16_t), &mIndices[0], GL_STATIC_DRAW);
+  glBufferData(GL_ELEMENT_ARRAY_BUFFER, GLsizeiptr(mIndices.size() * sizeof(uint16_t)), &mIndices[0], GL_STATIC_DRAW);
   glBindBuffer(GL_ARRAY_BUFFER, mVertexBufferId);
-  glBufferData(GL_ARRAY_BUFFER, mVertices.size() * sizeof(Vertex), &mVertices[0], GL_STATIC_DRAW);
+  glBufferData(GL_ARRAY_BUFFER, GLsizeiptr(mVertices.size() * sizeof(Vertex)), &mVertices[0], GL_STATIC_DRAW);
 
   GLint stride = 52; // 4*(2 + 2 + 1 + 4 + 4) = 4*13=52
   glVertexAttribPointer(mPositionLocation, 2, GL_FLOAT, GL_FALSE, stride, 0);
@@ -465,8 +466,6 @@ cpSpaceDebugColor PhysicsDebugRenderer::DrawColorForShape(cpShape* shape)
       return Colors[val & 0x7];
     }
   }
-
-  return cpSpaceDebugColor{1.0f, 1.0f, 1.0f, 1.0f};
 }
 
 } // namespace Dali::Toolkit::Physics::Internal