From 7b21727285e50b0b050c4ddd70d07542229c5366 Mon Sep 17 00:00:00 2001 From: pants Date: Mon, 21 Sep 2026 14:17:03 -0700 Subject: init --- c/opengl.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 c/opengl.c (limited to 'c/opengl.c') diff --git a/c/opengl.c b/c/opengl.c new file mode 100644 index 0000000..9504fce --- /dev/null +++ b/c/opengl.c @@ -0,0 +1,26 @@ +#include +#include + +int main() { + glfwInit(); + + GLFWwindow* window = glfwCreateWindow(400, 400, "baller", NULL, NULL); + glfwMakeContextCurrent(window); + + while (!glfwWindowShouldClose(window)) { + glClear(GL_COLOR_BUFFER_BIT); + + glBegin(GL_QUADS); + glVertex2f(-0.5f, -0.5f); + glVertex2f( 0.5f, -0.5f); + glVertex2f( 0.5f, 0.5f); + glVertex2f(-0.5f, 0.5f); + glEnd(); + + glfwSwapBuffers(window); + glfwPollEvents(); + } + + glfwTerminate(); + return 0; +} -- cgit v1.2.3