feat: initialize OpenGL

This commit is contained in:
2026-03-05 17:01:01 +08:00
parent 83c271ec8f
commit 9fe1eaec24
21 changed files with 5866 additions and 0 deletions

29
include/Cubed/camera.hpp Normal file
View File

@@ -0,0 +1,29 @@
#pragma once
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
struct MoveState {
bool forward = false;
bool back = false;
bool left = false;
bool right = false;
bool down = false;
bool up = false;
};
void updateMoveCamera();
void cameraInit();
void changeView(float offsetX, float offsetY);
void updateCursorPositionCamera(double xpos, double ypos);
glm::mat4 getCameraLookAt();
void updateCameraKey(int key, int action);