This commit is contained in:
Daniel Ledda
2025-01-04 19:19:01 +01:00
parent 256292c20d
commit 50f4501c86
11 changed files with 3213 additions and 1484 deletions

View File

@@ -11,12 +11,9 @@
#include <glm/gtc/matrix_transform.hpp>
#include "lib/loaders/stb_image.h"
#include "gfx/Texture.h"
#include "gfx/Mesh.h"
#include "gfx/Shader.h"
#include "gfx/Color.h"
#include "VoxelSpace.h"
#include "SomaSolve.h"
#include "gfx/main.cpp"
#include "VoxelSpace.cpp"
#include "SomaSolve.cpp"
#include "lib/djstdlib/core.cpp"
struct Entity;
@@ -28,7 +25,7 @@ SceneGraphNode *get_scene_graph_node(int id);
int new_graph_node();
void print_mat(glm::mat4* matrix) {
auto mat = *matrix;
glm::mat4 mat = *matrix;
std::cout << mat[0][0] << mat[0][1] << mat[0][2] << mat[0][3] << std::endl;
std::cout << mat[1][0] << mat[1][1] << mat[1][2] << mat[1][3] << std::endl;
std::cout << mat[2][0] << mat[2][1] << mat[2][2] << mat[2][3] << std::endl;
@@ -197,9 +194,9 @@ std::vector<Entity> entities = std::vector<Entity>();
std::vector<SceneGraphNode> scene_graph_nodes = std::vector<SceneGraphNode>();
void process_input(GLFWwindow *window) {
static bool wireframe = false;
static bool last_frame_state_press_enter = false;
static bool last_frame_state_press = false;
local_persist bool wireframe = false;
local_persist bool last_frame_state_press_enter = false;
local_persist bool last_frame_state_press = false;
if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) {
glfwSetWindowShouldClose(window, true);