pspge.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspge.h - Prototypes for the sceGe library.
00007  *
00008  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
00009  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
00010  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
00011  *
00012  * $Id: pspge.h 2433 2008-10-15 10:00:27Z iwn $
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 /* __GE_H__ */

Generated on Thu Sep 9 07:00:52 2010 for pspsdk-1.0+beta2 by  doxygen 1.5.6