X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=demo_prior;a=blobdiff_plain;f=src%2Fpart_whitted.c;h=d71585c2b1e947bcfb0b1b4cc2520c85621c667a;hp=5b98ad6c259e642c218b9df6ad12306ff756abdc;hb=ec776ad8bf37d25b9308e2c770d66247135b46ea;hpb=a89e74326444df1da625ad9614919bb7ad2352cb diff --git a/src/part_whitted.c b/src/part_whitted.c index 5b98ad6..d71585c 100644 --- a/src/part_whitted.c +++ b/src/part_whitted.c @@ -29,6 +29,7 @@ static int bnstate[8]; static int mouse_x, mouse_y; static unsigned int sdr; +static int uloc_aspect; void reg_whitted(void) @@ -42,6 +43,7 @@ static int init(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; } @@ -71,6 +73,7 @@ static void draw(long tm) glTranslatef(0, 0, cam_dist); glUseProgram(sdr); + glUniform1f(uloc_aspect, win_aspect); glBegin(GL_QUADS); glTexCoord2f(0, 0);