Mercurial > hg > Members > kono > Cerium
comparison old/simple_render/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_render/viewer.h@5c194c71eca8 |
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 #ifndef INCLUDED_VIEWER_TYPES | |
7 # include "viewer_types.h" | |
8 #endif | |
9 | |
10 #include "TaskManager.h" | |
11 | |
12 extern TaskManager *manager; | |
13 | |
14 class Viewer{ | |
15 public: | |
16 | |
17 static int width; | |
18 static int height; | |
19 static int bpp; | |
20 static int spe_num; | |
21 int rgb_size[3]; | |
22 Uint32 video_flags; | |
23 SDL_Surface *screen; | |
24 Uint32 *pixels; | |
25 //float zRow[1920][1080]; | |
26 float zRow[MAX_WIDTH][MAX_HEIGHT]; | |
27 | |
28 Viewer(int b=32, int w=640, int h=480); | |
29 Viewer(int b=32, int w=640, int h=480, int spenum = 1); | |
30 void sdl_init(); | |
31 void init(); | |
32 int get_ticks(); | |
33 bool quit_check(); | |
34 void quit(); | |
35 void screen_clear(); | |
36 void swap_buffers(); | |
37 void write_pixel(int x, int y,float z, Uint32 rgb); | |
38 void write_line(float x1, float y1, float x2, float y2, Uint32 rgb); | |
39 void write_triangle(float x1, float y1, float x2, float y2, float x3, float y3, Uint32 rgb); | |
40 void clean_pixels(); | |
41 void graph_line(); | |
42 | |
43 //void run(); | |
44 void run_init(char *xml); | |
45 void run_loop(); | |
46 void run_finish(); | |
47 void run_draw(); | |
48 | |
49 void zRow_init(); | |
50 }; | |
51 | |
52 #endif |