Files
Archimedes/utils/Window/WindowGLFW/WindowGLFW.h
2025-03-22 14:35:49 -05:00

35 lines
592 B
C++

#ifdef WINDOW_GLFW
#undef WINDOW_GLFW
#include <GLFW/glfw3.h>
namespace Archimedes {
class WindowGLFW {
public:
WindowGLFW();
~WindowGLFW();
bool shouldClose();
void doFrame() { restoreContext(); glfwSwapBuffers(w); }
void pollEvents() { glfwPollEvents(); }
void restoreContext() { glfwMakeContextCurrent(w); }
void getSize(int&, int&);
GLFWwindow* getWindow() { return w; }
private:
GLFWwindow* w;
};
typedef WindowGLFW WindowImpl;
}
#endif