import common code from another project

This commit is contained in:
2025-09-15 23:51:24 +02:00
parent e91c113471
commit e0f81ae2c5
9 changed files with 774 additions and 13 deletions
+3
View File
@@ -140,6 +140,8 @@ void init_single_program(ShaderProgram *program, int i, bool output) {
if (!output) {
program->itime_locations[i] =
glGetUniformLocation(program->programs[i], "iTime");
program->itempo_locations[i] =
glGetUniformLocation(program->programs[i], "iTempo");
program->ires_locations[i] =
glGetUniformLocation(program->programs[i], "iResolution");
}
@@ -243,6 +245,7 @@ void apply_program(ShaderProgram program, Context context) {
// set fragment uniforms
glUniform1f(program.itime_locations[i], (const GLfloat)context.time);
glUniform1f(program.itempo_locations[i], (const GLfloat)120); // TODO TMP
glUniform2fv(program.ires_locations[i], 1, (const GLfloat *)&resolution);
}