veng::Model 복사 생성 시에 한 놈한 메모리 해제 관리하도록 수정할 것

This commit is contained in:
2025-05-21 02:02:43 +09:00
parent 96c9f70828
commit 87038e960b

View File

@@ -76,6 +76,8 @@ std::int32_t main(std::int32_t argc, gsl::zstring* argv) {
double last_time = glfwGetTime();
veng::Model bullet2(&graphics);
glm::ivec2 window_size;
while (!window.ShouldClose()) {
glfwPollEvents();
@@ -140,10 +142,17 @@ std::int32_t main(std::int32_t argc, gsl::zstring* argv) {
player.UpdateTransform(delta_time);
player_flame.transform =
glm::translate(player.transform, player_flame.original_offset * 0.5f);
bullet.transform = player.transform;
background.UpdateTransform(delta_time);
camera_lag.UpdateTransform(delta_time);
graphics.RenderModel(player);
graphics.RenderModel(bullet);
bullet2 = bullet;
bullet2.transform =
glm::translate(player.transform, player_flame.original_offset * 0.5f);
graphics.RenderModel(bullet2);
if (glfwGetKey(window.GetHandle(), GLFW_KEY_W) == GLFW_PRESS) {
player.linear_acceleration = glm::normalize(forward) * 10.f;