blob: cb652fdac953c784712399f7f9aaeb7ae328e480 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include <GLFW/glfw3.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
GLFWwindow* window;
// initiate glfw library
if (!glfwInit()){
printf("Failed to initiate GLFW.\n");
return -1;
}
// create glfw window
window = glfwCreateWindow(800, 600, "raycaster", NULL, NULL);
if (!window){
printf("Failed to create GLFW window.\n");
glfwTerminate();
return -1;
}
// make window current
glfwMakeContextCurrent(window);
while (!glfwWindowShouldClose(window)) {
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwTerminate();
return 0;
}
|