summaryrefslogtreecommitdiff
path: root/src/candy_gear/vector_4d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/candy_gear/vector_4d.cpp')
-rw-r--r--src/candy_gear/vector_4d.cpp12
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);