openblocks/src/main.cpp

23 lines
559 B
C++
Raw Normal View History

2024-09-27 16:25:26 +00:00
#include <GL/glew.h>
#include <GL/gl.h>
#include <GLFW/glfw3.h>
#include <stdio.h>
void errorCatcher(int id, const char* str);
int main() {
glfwSetErrorCallback(errorCatcher);
glfwInit();
GLFWwindow *window = glfwCreateWindow(800, 600, "GLTest", NULL, NULL);
glfwMakeContextCurrent(window);
do {
glfwSwapBuffers(window);
glfwPollEvents();
} while(!glfwWindowShouldClose(window));
}
void errorCatcher(int id, const char* str) {
printf("Something *terrible* happened. Here's the briefing: [%d] %s\n", id, str);
}