94
|
1 #ifndef INCLUDED_TASK_SPU_DRAW
|
|
2 #define INCLUDED_TASK_SPU_DRAW
|
|
3
|
|
4 #ifndef INCLUDED_SCHED_TASK
|
|
5 # include "SchedTask.h"
|
|
6 #endif
|
|
7
|
105
|
8 //#define IMG_MAX_X 1920
|
109
|
9 //#define IMG_MAX_X 640
|
94
|
10
|
|
11 typedef int8_t Sint8;
|
|
12 typedef uint8_t Uint8;
|
|
13 typedef int16_t Sint16;
|
|
14 typedef uint16_t Uint16;
|
|
15 typedef int32_t Sint32;
|
|
16 typedef uint32_t Uint32;
|
99
|
17 typedef unsigned short GLushort;
|
94
|
18
|
|
19 class SpuDraw : public SchedTask {
|
|
20 public:
|
|
21 SpuDraw(TaskListPtr _tlist, TaskPtr _task,
|
|
22 void* _rbuf, void* _wbuf, DmaManager* _con)
|
|
23 :SchedTask(_tlist, _task, _rbuf, _wbuf, _con) {}
|
|
24
|
|
25 ~SpuDraw(void);
|
|
26
|
99
|
27 int *linebuf;
|
|
28 float *zRow;
|
102
|
29 unsigned int dma_tags;
|
|
30
|
94
|
31 int run(void *readbuf, void *writebuf);
|
105
|
32 void write(void);
|
94
|
33
|
|
34 private:
|
|
35 void zRow_init(void);
|
109
|
36 void linebuf_init(int rgb = 0xffffff);
|
102
|
37 void writebuffer(unsigned int fbdev_addr, int y);
|
94
|
38
|
|
39 char* get_pixel(int tx, int ty, void *texture_image);
|
|
40 Uint32 get_rgb(int tx, int ty, void *texture);
|
|
41 };
|
|
42
|
|
43 #endif
|