vulkan: implement draw(DrawCommand)

Now love.graphics.point and love.graphics.line works
This commit is contained in:
niki
2022-07-13 13:56:00 +02:00
parent 14b8abeef5
commit 0834408b90
5 changed files with 61 additions and 18 deletions
+15
View File
@@ -286,6 +286,21 @@ namespace love {
return ss.str();
}
VkPrimitiveTopology Vulkan::getPrimitiveTypeTopology(graphics::PrimitiveType primitiveType) {
switch (primitiveType) {
case PRIMITIVE_POINTS:
return VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
case PRIMITIVE_TRIANGLES:
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
case PRIMITIVE_TRIANGLE_FAN:
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN;
case PRIMITIVE_TRIANGLE_STRIP:
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
default:
throw love::Exception("unknown primitive type");
}
}
}
}
}