00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __GE_H__
00015 #define __GE_H__
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00022 typedef struct PspGeContext {
00023 unsigned int context[512];
00024 } PspGeContext;
00025
00027 typedef void (*PspGeCallback)(int id, void *arg);
00028
00030 typedef struct PspGeCallbackData
00031 {
00033 PspGeCallback signal_func;
00035 void *signal_arg;
00037 PspGeCallback finish_func;
00039 void *finish_arg;
00040 } PspGeCallbackData;
00041
00047 unsigned int sceGeEdramGetSize(void);
00048
00054 void * sceGeEdramGetAddr(void);
00055
00063 unsigned int sceGeGetCmd(int cmd);
00064
00066 typedef enum PspGeMatrixTypes {
00068 PSP_GE_MATRIX_BONE0 = 0,
00069 PSP_GE_MATRIX_BONE1,
00070 PSP_GE_MATRIX_BONE2,
00071 PSP_GE_MATRIX_BONE3,
00072 PSP_GE_MATRIX_BONE4,
00073 PSP_GE_MATRIX_BONE5,
00074 PSP_GE_MATRIX_BONE6,
00075 PSP_GE_MATRIX_BONE7,
00077 PSP_GE_MATRIX_WORLD,
00079 PSP_GE_MATRIX_VIEW,
00081 PSP_GE_MATRIX_PROJECTION,
00082 PSP_GE_MATRIX_TEXGEN
00083 } PspGeMatrixTypes;
00084
00093 int sceGeGetMtx(int type, void *matrix);
00094
00102 int sceGeSaveContext(PspGeContext *context);
00103
00111 int sceGeRestoreContext(const PspGeContext *context);
00112
00124 int sceGeListEnQueue(const void *list, void *stall, int cbid, void *arg);
00125
00137 int sceGeListEnQueueHead(const void *list, void *stall, int cbid, void *arg);
00138
00146 int sceGeListDeQueue(int qid);
00147
00156 int sceGeListUpdateStallAddr(int qid, void *stall);
00157
00158
00160 typedef enum PspGeSyncType {
00161 PSP_GE_LIST_DONE = 0,
00162 PSP_GE_LIST_QUEUED,
00163 PSP_GE_LIST_DRAWING_DONE,
00164 PSP_GE_LIST_STALL_REACHED,
00165 PSP_GE_LIST_CANCEL_DONE
00166 } PspGeSyncType;
00167
00176 int sceGeListSync(int qid, int syncType);
00177
00185 int sceGeDrawSync(int syncType);
00186
00193 int sceGeSetCallback(PspGeCallbackData *cb);
00194
00201 int sceGeUnsetCallback(int cbid);
00202
00203 #ifdef __cplusplus
00204 }
00205 #endif
00206
00207 #endif