1 //Psychlops Code Template
2 // Please visit following web site to get sample codes.
3 // http://psychlops.sourceforge.jp/ja/?StartCode
4 // CodeDresser at following address is also available to view the code.
5 // http://visitope.org/Tools/codedresser.html
7 ///+ 0 Setup Psychlops Circumstances
8 //// 0 Setup Psychlops Circumstances
10 using namespace Psychlops;
11 // Psychlops Win32 1.6.0 / 20120220
12 ///- 0 Setup Psychlops Circumstances
14 void psychlops_main() {
17 ///+ 1 Declaration /////////////////////////////////////////////////////////////
19 // declare default window and variables for its parameters
20 Canvas cnvs(Canvas::window, Display::secondary);
21 double CANVAS_FRAMENUM;
22 int CANVAS_REFRESHRATE;
23 Psychlops::Color DEFAULT_BG_COLOR;
25 //declare local variables around here
27 ///- 1 Declaration /////////////////////////////////////////////////////////////
29 ///+ 2 Initialization //////////////////////////////////////////////////////////
32 // Set initial values for local variables
33 CANVAS_REFRESHRATE = cnvs.getRefreshRate();
35 DEFAULT_BG_COLOR.set(127.0/255.0,127.0/255.0,127.0/255.0,1.0); // default background color is 127/255 mid-gray
37 // Draw Offline images around here
39 // Offline Movie calculation using Image array around here
41 ///- 2 Initialization //////////////////////////////////////////////////////////
43 ///+ 3 Drawing /////////////////////////////////////////////////////////////////
45 while(!Input::get(Keyboard::esc)) {
46 cnvs.clear(DEFAULT_BG_COLOR);
48 //Write draw commands for realtime figure calculation and drawing around here
50 //Write copy (Draw) commands for rendered movies in section 2 around here
55 ///- 3 Drawing /////////////////////////////////////////////////////////////////