OSDN Git Service

first
[psychlops/cpp.git] / win32gl / test / shader / ShaderDot.cpp
1 #include <psychlops.h>
2 using namespace Psychlops;
3
4 void psychlops_main() {
5         Canvas cnvs(1024,768,Canvas::window);
6         cnvs.watchFPS();
7         cnvs.showFPS();
8         Mouse::show();
9         Color::setGammaValue(1.0,1.0,1.0);
10
11
12         Figures::ShaderGaussianDot shaderDot;
13         shaderDot.setSigma(6).centering();
14
15         Image imageDot;
16         shaderDot.to(imageDot);
17         shaderDot.fill = Color::red;
18         imageDot.centering().shift(0,100);
19
20
21         while(!Keyboard::esc.pushed()) {
22                 cnvs.clear(Color::gray);
23                 cnvs.msg(L"シェーダ", cnvs.getHcenter(), shaderDot.getTop());
24                 shaderDot.shift(0.05,0).draw();
25                 cnvs.msg(L"オフスクリーン画像", cnvs.getHcenter(), imageDot.getTop());
26                 imageDot .shift(0.05,0).draw();
27                 cnvs.flip();
28         }
29 }
30