BLT-Graphics/include/blt/window.h

43 lines
1.1 KiB
C
Raw Normal View History

2023-07-29 18:58:56 -04:00
#pragma once
2023-07-30 19:37:19 -04:00
#include "glad/gl.h"
#include "GLFW/glfw3.h"
2023-07-29 18:58:56 -04:00
2023-07-30 19:37:19 -04:00
#include "app.h"
#include "blt/math/math.h"
2023-07-29 18:58:56 -04:00
namespace parks::Window {
constexpr unsigned int UBO_MATRICES_COUNT = 4;
struct WindowSize {
int width, height;
};
void create(const Settings &settings);
void setupGLAD();
void setupDearImGUI();
void destroy();
void preUpdate();
void postUpdate();
bool isCloseRequested();
void setCloseRequested(bool shouldClose);
void updateViewMatrix(const blt::mat4x4& view);
void updatePerspectiveMatrix(const blt::mat4x4& perspective);
void updateOrthograhpicMatrix(const blt::mat4x4& ortho);
const blt::mat4x4& getViewMatrix();
const blt::mat4x4& getPerspectiveMatrix();
const WindowSize& getWindowSize();
double getFrameDeltaSeconds();
bool isKeyDown(int key);
bool isMouseDown(int mouse);
bool isMouseVisible();
void setMouseVisible(bool state);
double getMouseX();
double getMouseDX();
double getMouseY();
double getMouseDY();
bool mousePressedLastFrame();
bool mouseMovedLastFrame();
bool keyPressedLastFrame(int key);
}