disabled vsync for moar frames

This commit is contained in:
Andrew Cohn 2025-11-29 14:08:35 -08:00
parent 7045273c39
commit 8305dcf10d
3 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -175,6 +175,6 @@ GLFWwindow* init_glfw_glad(const char* title, int width, int height) {
glfwTerminate(); glfwTerminate();
return NULL; return NULL;
} }
glfwSwapInterval(0);
return window; return window;
} }

6
main.c
View File

@ -4,8 +4,8 @@
#include "gl_utils.h" #include "gl_utils.h"
#include "sand_sim.h" #include "sand_sim.h"
#define GRID_W 1024 #define GRID_W 2048
#define GRID_H 1024 #define GRID_H 2048
static int g_fbWidth = 800; static int g_fbWidth = 800;
static int g_fbHeight = 800; static int g_fbHeight = 800;
SandSim sim; SandSim sim;
@ -88,7 +88,7 @@ int main(void) {
glUseProgram(program); glUseProgram(program);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
double sim_dt = 1.0 / 120.0; double sim_dt = 1.0 / 360.0;
double currentTime = glfwGetTime(); double currentTime = glfwGetTime();
double accumulator = 0.0; double accumulator = 0.0;