X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fscr%2Ftesta.c;h=5bf2e62901149b28237c25762bcc9277c260127b;hb=628ef3345462458f2fb6be034583e61238b89f89;hp=e5f1bb387e6db338b7d9a49a880426a1d4fdebf7;hpb=313480bbe9994a200ed9a4355d97a033bf0d6151;p=andemo diff --git a/src/scr/testa.c b/src/scr/testa.c index e5f1bb3..5bf2e62 100644 --- a/src/scr/testa.c +++ b/src/scr/testa.c @@ -1,5 +1,6 @@ #include "demo.h" #include "noise.h" +#include "cgmath/cgmath.h" static int init(void); static void destroy(void); @@ -29,14 +30,15 @@ static void destroy(void) static void draw(void) { int i; - float t = dsys_time / 1000.0f; + float t = dsys.tmsec / 1000.0f; + float gap = cgm_lerp(0, 0.01, scr.vis); glUseProgram(sdr_foo); gl_begin(GL_QUADS); for(i=0; i<16; i++) { - float x0 = i / 8.0f - 1.0f + 0.01; - float x1 = (i + 1) / 8.0f - 1.0f - 0.01; - float y = noise2((float)i * 1.24f, t); + float x0 = i / 8.0f - 1.0f + gap; + float x1 = (i + 1) / 8.0f - 1.0f - gap; + float y = cgm_lerp(1.0f, noise2((float)i * 1.24f, t), scr.vis); gl_vertex2f(x0, -1); gl_vertex2f(x1, -1); gl_vertex2f(x1, y);