annotate TaskManager/Test/simple_render/viewer.h @ 70:178459e03f5c

*** empty log message ***
author gongo
date Mon, 18 Feb 2008 01:13:00 +0900
parents 64ef030deb22
children 9b96b190cb73
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
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
6 #include "TaskManager.h"
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
7
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
8 extern TaskManager *manager;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
9
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
10 /*
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
11 #ifndef INCLUDED_DEMONSTRATION
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
12 #include "demonstration.h"
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
13 #endif
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
14
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
15 #ifndef INCLUDED_SCENE
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
16 #include "scene.h"
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
17 #endif
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
18 */
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
19
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
20 class Viewer{
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
21 public:
70
178459e03f5c *** empty log message ***
gongo
parents: 49
diff changeset
22 ~Viewer(void) { run_finish();}
26
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
23
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
24 int width;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
25 int height;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
26 int bpp;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
27 int rgb_size[3];
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
28 Uint32 video_flags;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
29 //Demonstration *play_demo;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
30 //Scene *scene;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
31 SDL_Surface *screen;
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
32 Uint32 *pixels;
28
243ee0a1fe6f *** empty log message ***
gongo
parents: 26
diff changeset
33 float zRow[1920][1080];
243ee0a1fe6f *** empty log message ***
gongo
parents: 26
diff changeset
34 //float **zRow;
26
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
35
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
36 Viewer(int b=32, int w=640, int h=480);
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
37 void sdl_init();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
38 void init();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
39 int get_ticks();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
40 bool quit_check();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
41 void quit();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
42 void screen_clear();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
43 void swap_buffers();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
44 void write_pixel(int x, int y,float z, Uint32 rgb);
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
45 void write_line(float x1, float y1, float x2, float y2, Uint32 rgb);
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
46 void write_triangle(float x1, float y1, float x2, float y2, float x3, float y3, Uint32 rgb);
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
47 void clean_pixels();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
48 void graph_line();
49
64ef030deb22 *** empty log message ***
gongo
parents: 48
diff changeset
49
64ef030deb22 *** empty log message ***
gongo
parents: 48
diff changeset
50 //void run();
64ef030deb22 *** empty log message ***
gongo
parents: 48
diff changeset
51 void run_init();
48
70a0ac46133e *** empty log message ***
gongo
parents: 28
diff changeset
52 void run_loop();
70a0ac46133e *** empty log message ***
gongo
parents: 28
diff changeset
53 void run_finish();
70a0ac46133e *** empty log message ***
gongo
parents: 28
diff changeset
54 void run_draw();
70a0ac46133e *** empty log message ***
gongo
parents: 28
diff changeset
55
26
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
56 void zRow_init();
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
57 };
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
58
3f68b2ef4fb0 *** empty log message ***
gongo
parents:
diff changeset
59 #endif