Files
misc/c/opengl.c
2025-07-02 00:07:49 -07:00

27 lines
512 B
C

#include <GLFW/glfw3.h>
#include <stdio.h>
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;
}