initial commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#ifndef HYDRAWINDOWMANAGER
|
||||
#define HYDRAWINDOWMANAGER
|
||||
|
||||
#include "../engine/HydraObject.h"
|
||||
#include "HydraRenderSettings.h"
|
||||
#include "../GlewIncludes.h"
|
||||
#include <GLMIncludes.h>
|
||||
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
#include <mutex>
|
||||
|
||||
class HydraWindowManager : public HydraObject
|
||||
{
|
||||
private:
|
||||
static std::mutex m_mouse_pos_mutex;
|
||||
static std::vector<HydraKeyPressStuct> m_key_presses;
|
||||
static std::queue<HydraMouseMoveStruct> m_mouse_moves;
|
||||
static glm::vec2 m_mouse_position;
|
||||
|
||||
GLFWwindow* m_window = nullptr;
|
||||
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
|
||||
|
||||
static void cursor_position_callback(GLFWwindow* window, double x, double y);
|
||||
static void mouse_button_callback(GLFWwindow* window, int button, int action, int mods);
|
||||
|
||||
static void SetMousePosition(glm::vec2 mouse_pos);
|
||||
public:
|
||||
bool CreateRenderWindow(std::string title, HydraRenderSettings renderSettings);
|
||||
// void ExitFullScreen() {};
|
||||
// void SetFullScreen() {};
|
||||
// void* GetManagedDC() { return nullptr; }
|
||||
bool HandleMessages();
|
||||
void Shutdown();
|
||||
|
||||
static bool GetKeyPress(HydraKeyPressStuct& key_press);
|
||||
static bool GetMouseMove(HydraMouseMoveStruct& mouse_move);
|
||||
static glm::vec2 GetMousePosition();
|
||||
GLFWwindow* const GetWindow() {return m_window;}
|
||||
void Swap();
|
||||
};
|
||||
|
||||
|
||||
#endif /* HYDRAWINDOWMANAGER */
|
||||
Reference in New Issue
Block a user