2023-02-08 00:56:49 -05:00
|
|
|
/*
|
|
|
|
* Created by Brett Terpstra 6920201 on 16/01/23.
|
|
|
|
* Copyright (c) Brett Terpstra 2023 All Rights Reserved
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FINAL_PROJECT_WINDOW_H
|
|
|
|
#define FINAL_PROJECT_WINDOW_H
|
|
|
|
|
2023-02-08 13:42:39 -05:00
|
|
|
// emscripten provides its own gl bindings.
|
|
|
|
#ifndef __EMSCRIPTEN__
|
|
|
|
#include <glad/gles2.h>
|
|
|
|
#endif
|
2023-02-08 00:56:49 -05:00
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
#include <blt/std/math.h>
|
|
|
|
|
|
|
|
namespace fp::window {
|
2023-02-08 13:42:39 -05:00
|
|
|
void init(int width = 1440, int height = 720);
|
2023-02-08 00:56:49 -05:00
|
|
|
|
2023-02-08 13:42:39 -05:00
|
|
|
void update();
|
2023-02-08 00:56:49 -05:00
|
|
|
|
2023-02-08 13:42:39 -05:00
|
|
|
void close();
|
2023-02-08 00:56:49 -05:00
|
|
|
|
2023-02-08 13:42:39 -05:00
|
|
|
bool isCloseRequested();
|
2023-02-08 00:56:49 -05:00
|
|
|
|
2023-02-08 13:42:39 -05:00
|
|
|
GLFWwindow* getWindow();
|
2023-02-08 00:56:49 -05:00
|
|
|
|
2023-02-08 13:42:39 -05:00
|
|
|
bool isKeyPressed(int key);
|
2023-02-08 00:56:49 -05:00
|
|
|
|
2023-02-08 13:42:39 -05:00
|
|
|
bool isMousePressed(int button);
|
2023-02-08 00:56:49 -05:00
|
|
|
|
2023-02-08 13:42:39 -05:00
|
|
|
bool mouseState();
|
|
|
|
bool keyState();
|
|
|
|
|
|
|
|
const blt::mat4x4& getPerspectiveMatrix();
|
2023-02-08 00:56:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif //FINAL_PROJECT_WINDOW_H
|