mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-22 02:27:01 +08:00
feat: initialize OpenGL
This commit is contained in:
29
include/Cubed/camera.hpp
Normal file
29
include/Cubed/camera.hpp
Normal 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);
|
||||
Reference in New Issue
Block a user