OSDN Git Service

first
[psychlops/cpp.git] / win32gl / test / shader / ShaderFirm.cpp
1 #include <psychlops.h>
2 using namespace Psychlops;
3
4 void psychlops_main() {
5   Canvas cnvs(Canvas::window);
6
7   Figures::ShaderGrating grating;
8   grating.phase = 0;
9   grating.contrast = 1;
10   grating.wavelength = 50;
11   grating.orientation = 2*PI/10.0;
12   grating.set(500,1000).centering();
13
14
15   while(!Keyboard::esc.pushed()) {
16     cnvs.clear(Color::gray);
17     grating.phase += 2*PI/60;
18     grating.draw();
19     cnvs.flip();
20   }
21 }