00001 #ifndef INCLUDED_TASK_SPU_DRAW
00002 #define INCLUDED_TASK_SPU_DRAW
00003
00004 #ifndef INCLUDED_SCHED_TASK
00005 # include "SchedTask.h"
00006 #endif
00007
00008
00009
00010
00011 typedef int8_t Sint8;
00012 typedef uint8_t Uint8;
00013 typedef int16_t Sint16;
00014 typedef uint16_t Uint16;
00015 typedef int32_t Sint32;
00016 typedef uint32_t Uint32;
00017 typedef unsigned short GLushort;
00018
00019 class SpuDraw : public SchedTask {
00020 public:
00021 SpuDraw(TaskListPtr _tlist, TaskPtr _task,
00022 void* _rbuf, void* _wbuf, DmaManager* _con)
00023 :SchedTask(_tlist, _task, _rbuf, _wbuf, _con) {}
00024
00025 ~SpuDraw(void);
00026
00027 int *linebuf;
00028 float *zRow;
00029 unsigned int dma_tags;
00030
00031 int run(void *readbuf, void *writebuf);
00032 void write(void);
00033
00034 private:
00035 void zRow_init(void);
00036 void linebuf_init(int rgb = 0xffffff);
00037 void writebuffer(unsigned int fbdev_addr, int y);
00038
00039 char* get_pixel(int tx, int ty, void *texture_image);
00040 Uint32 get_rgb(int tx, int ty, void *texture);
00041 };
00042
00043 #endif