test window module

This commit is contained in:
2025-03-16 23:17:00 -05:00
parent 453e9f2aee
commit 0e6fcc9546
4 changed files with 26 additions and 6 deletions

View File

@@ -8,12 +8,25 @@ Window::Window() {
std::abort();
}
w = glfwCreateWindow(640, 480, "Archimedes", NULL, NULL);
if(!w) {
glfwTerminate();
std::abort();
}
glfwMakeContextCurrent(w);
}
bool Window::close() {
bool Window::shouldClose() {
return glfwShouldClose(w);
}
Window::~Window() {
void Window::doFrame() {
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(w);
glfwPollEvents();
}
Window::~Window() {
glfwTerminate();
}