summaryrefslogtreecommitdiff
path: root/engine/xe_engine.cpp
diff options
context:
space:
mode:
authortylermurphy534 <tylermurphy534@gmail.com>2022-09-25 12:07:49 -0400
committertylermurphy534 <tylermurphy534@gmail.com>2022-09-25 12:07:49 -0400
commit7c1dfec94391ec283e41b6b942d08dbc6bb69a3a (patch)
treec97c50778aabe4ec40a0e543bf464278e434a939 /engine/xe_engine.cpp
parentremove Xe From engine class names (diff)
downloadminecraftvulkan-7c1dfec94391ec283e41b6b942d08dbc6bb69a3a.tar.gz
minecraftvulkan-7c1dfec94391ec283e41b6b942d08dbc6bb69a3a.tar.bz2
minecraftvulkan-7c1dfec94391ec283e41b6b942d08dbc6bb69a3a.zip
vertex data no longer hard coded
Diffstat (limited to 'engine/xe_engine.cpp')
-rw-r--r--engine/xe_engine.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/xe_engine.cpp b/engine/xe_engine.cpp
index 7a6df71..a4ddaea 100644
--- a/engine/xe_engine.cpp
+++ b/engine/xe_engine.cpp
@@ -35,16 +35,17 @@ std::shared_ptr<Model> Engine::loadModelFromFile(const std::string &filename) {
return Model::createModelFromFile(xeDevice, filename);
}
-std::shared_ptr<Model> Engine::loadModelFromData(std::vector<Model::Vertex> vertices, std::vector<uint32_t> indices) {
+std::shared_ptr<Model> Engine::loadModelFromData(std::vector<float> vertexData, uint32_t vertexSize, std::vector<uint32_t> indices) {
Model::Builder builder{};
- builder.vertices = vertices;
+ builder.vertexData = vertexData;
+ builder.vertexSize = vertexSize;
if(indices.size() > 0) {
builder.indices = indices;
}
return std::make_shared<Model>(xeDevice, builder);
}
-std::shared_ptr<Image> Engine::loadImage(const std::string &filename) {
+std::shared_ptr<Image> Engine::loadImageFromFile(const std::string &filename) {
return std::make_shared<Image>(xeDevice, filename);
}