#include #include #include int main() { init_gl(4, 6); Window window = create_window(800, 600, "gearlib"); glfwSwapInterval(0); enable_debugging(); setup_textures(); uint32_t cat = load_texture("assets/cat.png"); uint32_t cuddle = load_texture("assets/cuddle.png"); uint32_t parrots = load_texture("assets/parrots.png"); double time = glfwGetTime(); while (!glfwWindowShouldClose(window)) { process_input(window); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); draw_texture(parrots, (vec3){ -0.4f, 0.4f, 0.0f }, (vec4){ 1.0f, 1.0f, 1.0f, 1.0f }); draw_texture(cat, (vec3){ 0.0f, 0.0f, 0.0f }, (vec4){ 1.0f, 1.0f, 1.0f, 1.0f }); draw_texture(cuddle, (vec3){ 0.0f, -0.4f, 0.0f }, (vec4){ 1.0f, 1.0f, 1.0f, 1.0f }); flush(); double end_time = glfwGetTime(); double frame_time = end_time - time; double fps = 1 / frame_time; time = end_time; //printf("%lf, %lf" /*", %d, %d"*/ "\n", frame_time, fps/*, stats.draw_calls, stats.total_verts*/); glfwSwapBuffers(window); glfwPollEvents(); } glfwTerminate(); return 0; }