diff options
author | Frederico Linhares <fred@linhares.blue> | 2025-06-21 16:51:22 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2025-06-21 16:51:22 -0300 |
commit | 8bedf8a366cb6c1179bc89678c863517b9356d48 (patch) | |
tree | 4a285592f804802d59f2af090113f607344ffdce /src/candy_gear/vector_4d.cpp | |
parent | b3428170ac0a1837d3568f7b49312cbb01179f5d (diff) |
View2D is almost useless and add too much complexity for the engine,
so I am removing it.
Diffstat (limited to 'src/candy_gear/vector_4d.cpp')
-rw-r--r-- | src/candy_gear/vector_4d.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/candy_gear/vector_4d.cpp b/src/candy_gear/vector_4d.cpp index b44b612..5ee674d 100644 --- a/src/candy_gear/vector_4d.cpp +++ b/src/candy_gear/vector_4d.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 Frederico de Oliveira Linhares + * Copyright 2022-2025 Frederico de Oliveira Linhares * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ #include <mruby/array.h> #include "vector_3d.hpp" -#include "view_2d.hpp" +#include "view.hpp" namespace { @@ -347,19 +347,15 @@ cg_cVector4D_collide(mrb_state *mrb, mrb_value self) static mrb_value cg_cVector4D_draw_rectangle(mrb_state *mrb, mrb_value self) { - mrb_value view_value; - BluCat::GRA::View2D *view_2d; std::shared_ptr<glm::vec3> *color; auto ptr = (std::shared_ptr<glm::vec4>*)DATA_PTR(self); - mrb_get_args(mrb, "od", &view_value, &color, &cg_vector_3d_type); - - view_2d = cg_cView_to_view_2d(mrb, view_value); + mrb_get_args(mrb, "d", &color, &cg_vector_3d_type); glm::vec4 position( (*ptr)->x, (*ptr)->y, (*ptr)->x + (*ptr)->z, (*ptr)->y + (*ptr)->w); BluCat::GRA::Rectangle rect{position, (**color)}; - auto &rectangles = view_2d->rectangles_to_draw[ + auto &rectangles = BluCat::INT::core.vk_renderer->rectangles_to_draw[ BluCat::INT::core.vk_swapchain->current_frame]; rectangles.push_back(rect); |