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 806 2005-07-31 11:47:10Z stefan $
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 /* __GE_H__ */

Generated on Tue Jul 24 15:21:22 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2