pspge.h
Go to the documentation of this file.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
00042 typedef struct PspGeListArgs
00043 {
00044 unsigned int size;
00045 PspGeContext* context;
00046 } PspGeListArgs;
00047
00053 unsigned int sceGeEdramGetSize(void);
00054
00060 void * sceGeEdramGetAddr(void);
00061
00069 unsigned int sceGeGetCmd(int cmd);
00070
00072 typedef enum PspGeMatrixTypes {
00074 PSP_GE_MATRIX_BONE0 = 0,
00075 PSP_GE_MATRIX_BONE1,
00076 PSP_GE_MATRIX_BONE2,
00077 PSP_GE_MATRIX_BONE3,
00078 PSP_GE_MATRIX_BONE4,
00079 PSP_GE_MATRIX_BONE5,
00080 PSP_GE_MATRIX_BONE6,
00081 PSP_GE_MATRIX_BONE7,
00083 PSP_GE_MATRIX_WORLD,
00085 PSP_GE_MATRIX_VIEW,
00087 PSP_GE_MATRIX_PROJECTION,
00088 PSP_GE_MATRIX_TEXGEN
00089 } PspGeMatrixTypes;
00090
00099 int sceGeGetMtx(int type, void *matrix);
00100
00108 int sceGeSaveContext(PspGeContext *context);
00109
00117 int sceGeRestoreContext(const PspGeContext *context);
00118
00130 int sceGeListEnQueue(const void *list, void *stall, int cbid, PspGeListArgs *arg);
00131
00143 int sceGeListEnQueueHead(const void *list, void *stall, int cbid, PspGeListArgs *arg);
00144
00152 int sceGeListDeQueue(int qid);
00153
00162 int sceGeListUpdateStallAddr(int qid, void *stall);
00163
00164
00166 typedef enum PspGeSyncType {
00167 PSP_GE_LIST_DONE = 0,
00168 PSP_GE_LIST_QUEUED,
00169 PSP_GE_LIST_DRAWING_DONE,
00170 PSP_GE_LIST_STALL_REACHED,
00171 PSP_GE_LIST_CANCEL_DONE
00172 } PspGeSyncType;
00173
00182 int sceGeListSync(int qid, int syncType);
00183
00191 int sceGeDrawSync(int syncType);
00192
00199 int sceGeSetCallback(PspGeCallbackData *cb);
00200
00207 int sceGeUnsetCallback(int cbid);
00208
00209 #ifdef __cplusplus
00210 }
00211 #endif
00212
00213 #endif