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