annotate TaskManager/Test/simple_render/viewer.h @ 109:028ffc9c0375 draft

Cerium cvs version
author gongo@gendarme.local
date Wed, 12 Nov 2008 17:39:33 +0900
parents 9b96b190cb73
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
1 #include <SDL.h>
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
2
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
3 #ifndef INCLUDED_VIEWER
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
4 #define INCLUDED_VIEWER
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
5
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
6 #ifndef INCLUDED_VIEWER_TYPES
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
7 # include "viewer_types.h"
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
8 #endif
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
9
26
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
10 #include "TaskManager.h"
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
11
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
12 extern TaskManager *manager;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
13
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
14 class Viewer{
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
15 public:
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
16
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
17 static int width;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
18 static int height;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
19 static int bpp;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
20 static int spe_num;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
21 int rgb_size[3];
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
22 Uint32 video_flags;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
23 SDL_Surface *screen;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
24 Uint32 *pixels;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
25 //float zRow[1920][1080];
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
26 float zRow[MAX_WIDTH][MAX_HEIGHT];
26
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
27
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
28 Viewer(int b=32, int w=640, int h=480);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
29 Viewer(int b=32, int w=640, int h=480, int spenum = 1);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
30 void sdl_init();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
31 void init();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
32 int get_ticks();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
33 bool quit_check();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
34 void quit();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
35 void screen_clear();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
36 void swap_buffers();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
37 void write_pixel(int x, int y,float z, Uint32 rgb);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
38 void write_line(float x1, float y1, float x2, float y2, Uint32 rgb);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
39 void write_triangle(float x1, float y1, float x2, float y2, float x3, float y3, Uint32 rgb);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
40 void clean_pixels();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
41 void graph_line();
49
64ef030deb22 *** empty log message ***
gongo
parents: 48
diff changeset
42
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
43 //void run();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
44 void run_init(char *xml);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
45 void run_loop();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
46 void run_finish();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
47 void run_draw();
48
70a0ac46133e *** empty log message ***
gongo
parents: 28
diff changeset
48
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 85
diff changeset
49 void zRow_init();
26
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
50 };
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
51
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
52 #endif