5 static void destroy(void);
6 static void draw(void);
8 static unsigned int sdr_foo;
10 void regscr_testb(void)
12 static struct demoscreen scr = { "testb", init, destroy, 0, 0, 0, 0, draw };
13 dsys_add_screen(&scr);
18 if(!(sdr_foo = get_sdrprog("sdr/foo.v.glsl", "sdr/foo-notex.p.glsl"))) {
24 static void destroy(void)
31 static void draw(void)
34 float x, y, xr, yr, sz;
35 float t = dsys_time / 700.0f;
37 glUseProgram(sdr_foo);
40 y = (i + 0.5f) / (NY/2.0f) - 1.0f;
42 x = (j + 0.5f) / (NX/2.0f) - 1.0f;
43 sz = noise2(x * 5.0f, t) * noise2(y * 5.0f, t) * 2.5f;
44 if(sz < 0.0f) sz = 0.0f;
45 if(sz > 1.0f) sz = 1.0f;
49 gl_vertex2f(x - xr, y - yr);
50 gl_vertex2f(x + xr, y - yr);
51 gl_vertex2f(x + xr, y + yr);
52 gl_vertex2f(x - xr, y + yr);