test window module
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user