diff options
author | Frederico Linhares <fred@linhares.blue> | 2024-05-08 17:56:29 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2024-05-08 17:56:29 -0300 |
commit | 43821b0cffc5aa419c0218992f06f8962ae54a13 (patch) | |
tree | 97bdbbf710a78e6dcb181d92dd83e98d8b329c6d /src/static_model.cpp | |
parent | 70e156d47346ae3198c623e0af75e5703f894db3 (diff) |
refa Rename graphical engine to BluCat
Diffstat (limited to 'src/static_model.cpp')
-rw-r--r-- | src/static_model.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/static_model.cpp b/src/static_model.cpp index eb9e4c9..3dd0c10 100644 --- a/src/static_model.cpp +++ b/src/static_model.cpp @@ -20,12 +20,12 @@ #include "static_mesh.hpp" #include "texture.hpp" #include "vector_3d.hpp" -#include "vk/static_model.hpp" +#include "blucat/static_model.hpp" void cg_free_static_model(mrb_state *mrb, void *obj) { - auto ptr = static_cast<std::shared_ptr<VK::StaticModel>*>(obj); + auto ptr = static_cast<std::shared_ptr<BluCat::StaticModel>*>(obj); ptr->~shared_ptr(); mrb_free(mrb, ptr); @@ -37,23 +37,23 @@ const struct mrb_data_type cg_static_model_type = { static mrb_value cg_cStaticModel_initialize(mrb_state *mrb, mrb_value self) { - std::shared_ptr<VK::StaticMesh> *static_mesh; - std::shared_ptr<VK::Texture> *texture; + std::shared_ptr<BluCat::StaticMesh> *static_mesh; + std::shared_ptr<BluCat::Texture> *texture; std::shared_ptr<glm::vec3> *position; std::shared_ptr<glm::quat> *orientation; - std::shared_ptr<VK::StaticModel> *ptr; + std::shared_ptr<BluCat::StaticModel> *ptr; mrb_get_args( mrb, "dddd", &static_mesh, &cg_static_mesh_type, &texture, &cg_texture_type, &position, &cg_vector_3d_type, &orientation, &cg_orientation_3d_type); - ptr = (std::shared_ptr<VK::StaticModel>*)DATA_PTR(self); + ptr = (std::shared_ptr<BluCat::StaticModel>*)DATA_PTR(self); if(ptr) mrb_free(mrb, ptr); - ptr = (std::shared_ptr<VK::StaticModel>*)mrb_malloc( - mrb, sizeof(std::shared_ptr<VK::StaticModel>)); + ptr = (std::shared_ptr<BluCat::StaticModel>*)mrb_malloc( + mrb, sizeof(std::shared_ptr<BluCat::StaticModel>)); - new(ptr)std::shared_ptr<VK::StaticModel>( - std::make_shared<VK::StaticModel>( + new(ptr)std::shared_ptr<BluCat::StaticModel>( + std::make_shared<BluCat::StaticModel>( *static_mesh, *texture, *position, *orientation)); mrb_data_init(self, ptr, &cg_static_model_type); @@ -63,7 +63,7 @@ cg_cStaticModel_initialize(mrb_state *mrb, mrb_value self) static mrb_value cg_cStaticModel_set_orientation(mrb_state *mrb, mrb_value self) { - auto ptr = (std::shared_ptr<VK::StaticModel>*)DATA_PTR(self); + auto ptr = (std::shared_ptr<BluCat::StaticModel>*)DATA_PTR(self); std::shared_ptr<glm::quat> *orientation; mrb_get_args(mrb, "d", &orientation, &cg_orientation_3d_type); @@ -75,7 +75,7 @@ cg_cStaticModel_set_orientation(mrb_state *mrb, mrb_value self) static mrb_value cg_cStaticModel_set_position(mrb_state *mrb, mrb_value self) { - auto ptr = (std::shared_ptr<VK::StaticModel>*)DATA_PTR(self); + auto ptr = (std::shared_ptr<BluCat::StaticModel>*)DATA_PTR(self); std::shared_ptr<glm::vec3> *position; mrb_get_args(mrb, "d", &position, &cg_vector_3d_type); @@ -87,8 +87,8 @@ cg_cStaticModel_set_position(mrb_state *mrb, mrb_value self) static mrb_value cg_cStaticModel_set_texture(mrb_state *mrb, mrb_value self) { - auto ptr = (std::shared_ptr<VK::StaticModel>*)DATA_PTR(self); - std::shared_ptr<VK::Texture> *texture; + auto ptr = (std::shared_ptr<BluCat::StaticModel>*)DATA_PTR(self); + std::shared_ptr<BluCat::Texture> *texture; mrb_get_args(mrb, "d", &texture, &cg_texture_type); (*ptr)->texture = *texture; @@ -99,7 +99,7 @@ cg_cStaticModel_set_texture(mrb_state *mrb, mrb_value self) static mrb_value cg_cStaticModel_draw(mrb_state *mrb, mrb_value self) { - auto ptr = (std::shared_ptr<VK::StaticModel>*)DATA_PTR(self); + auto ptr = (std::shared_ptr<BluCat::StaticModel>*)DATA_PTR(self); auto &instances = cg_core.vk_renderer->static_models_to_draw[ cg_core.vk_swapchain->current_frame][(*ptr)->static_mesh]; |