Enable multiple buffers
Enables creation of multiple mesh objects in a single buffer. This is still WIP.
This commit is contained in:
1 parent
c4734e99c2
commit
e06288320d
6 files changed
+188
-123
No files matched your search
@@ -34,6 +34,11 @@ uint8_t RseGraphics::graphics_run(void)
|
||||
|
||||
window::windowInit();
|
||||
|
||||
|
||||
|
||||
if (0 != vulkanbase::initVulkan(vulkan_state))
|
||||
return -1;
|
||||
|
||||
// FIXME: Temporary array of vertices, for testing purposes
|
||||
const std::vector<rse::graphics::vulkanbase::Vertex> vertices = {{{-0.5f, -0.5f, 0.0f}, {1.0f, 0.0f, 1.0f}},
|
||||
{{0.5f, -0.5f, 0.0f}, {0.0f, 1.0f, 1.0f}},
|
||||
@@ -43,21 +48,18 @@ uint8_t RseGraphics::graphics_run(void)
|
||||
// FIXME: Temporary array of vertices, for testing purposes
|
||||
std::vector<uint16_t> indices = {0, 1, 2, 2, 3, 0};
|
||||
|
||||
uint16_t mesh_id = rse::graphics::mesh::create_mesh(vertices, indices);
|
||||
rse::graphics::mesh::create_mesh_instance(mesh_id, rse::graphics::mesh::InstanceData(
|
||||
uint16_t mesh_id = rse::graphics::mesh::create_mesh(vulkan_state, vertices, indices);
|
||||
rse::graphics::mesh::create_mesh_instance(vulkan_state, mesh_id, rse::graphics::mesh::InstanceData(
|
||||
glm::vec3(0.0f, 0.0f, 0.0f),
|
||||
glm::vec3(0.0f, 0.0f, glm::radians(45.0f)),
|
||||
1.0f
|
||||
));
|
||||
|
||||
rse::graphics::mesh::create_mesh_instance(mesh_id, rse::graphics::mesh::InstanceData(
|
||||
glm::vec3(-1.0f, 0.0f, 0.0f),
|
||||
glm::vec3(0.0f, 0.0f, 0.0f),
|
||||
1.0f
|
||||
));
|
||||
|
||||
if (0 != vulkanbase::initVulkan(vulkan_state))
|
||||
return -1;
|
||||
// rse::graphics::mesh::create_mesh_instance(vulkan_state, mesh_id, rse::graphics::mesh::InstanceData(
|
||||
// glm::vec3(-1.0f, 0.0f, 0.0f),
|
||||
// glm::vec3(0.0f, 0.0f, 0.0f),
|
||||
// 1.0f
|
||||
// ));
|
||||
|
||||
window::windowLoop(vulkan_state);
|
||||
|
||||
|
||||
Reference in new issue
Block a user