static int mouse_x, mouse_y;
static unsigned int sdr;
+static int uloc_aspect;
void reg_whitted(void)
if(!(sdr = create_program_load("sdr/whitted.v.glsl", "sdr/whitted.p.glsl"))) {
return -1;
}
+ uloc_aspect = get_uniform_loc(sdr, "aspect");
return 0;
}
glTranslatef(0, 0, cam_dist);
glUseProgram(sdr);
+ glUniform1f(uloc_aspect, win_aspect);
glBegin(GL_QUADS);
glTexCoord2f(0, 0);