comparison old/simple_pack/viewer.h @ 507:735f76483bb2

Reorganization..
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 12 Oct 2009 09:39:35 +0900
parents TaskManager/Test/simple_pack/viewer.h@35a6cf176c38
children
comparison
equal deleted inserted replaced
506:1d4a8a86f26b 507:735f76483bb2
1 #include <SDL.h>
2
3 #ifndef INCLUDED_VIEWER
4 #define INCLUDED_VIEWER
5
6 #include "TaskManager.h"
7
8 extern TaskManager *manager;
9
10 /*
11 #ifndef INCLUDED_DEMONSTRATION
12 #include "demonstration.h"
13 #endif
14
15 #ifndef INCLUDED_SCENE
16 #include "scene.h"
17 #endif
18 */
19
20 class Viewer{
21 public:
22
23 int width;
24 int height;
25 int bpp;
26 int rgb_size[3];
27 Uint32 video_flags;
28 //Demonstration *play_demo;
29 //Scene *scene;
30 SDL_Surface *screen;
31 Uint32 *pixels;
32 float zRow[1920][1080];
33 //float **zRow;
34
35 Viewer(int b=32, int w=640, int h=480);
36 void sdl_init();
37 void init();
38 int get_ticks();
39 bool quit_check();
40 void quit();
41 void screen_clear();
42 void swap_buffers();
43 void write_pixel(int x, int y,float z, Uint32 rgb);
44 void write_line(float x1, float y1, float x2, float y2, Uint32 rgb);
45 void write_triangle(float x1, float y1, float x2, float y2, float x3, float y3, Uint32 rgb);
46 void clean_pixels();
47 void graph_line();
48
49 //void run();
50 void run_init();
51 void run_loop();
52 void run_finish();
53 void run_draw();
54
55 void zRow_init();
56 };
57
58 #endif