pspsdk-1.0+beta2
pspgum.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * Copyright (c) 2005 Jesper Svennevid
7  */
8 
9 #ifndef __pspgum_h__
10 #define __pspgum_h__
11 
12 #include <psptypes.h>
13 
14 #if defined(__cplusplus)
15 extern "C" {
16 #endif
17 
18 // stack functions
19 
20 void sceGumDrawArray(int prim, int vtype, int count, const void* indices, const void* vertices);
21 void sceGumDrawArrayN(int prim, int vtype, int count, int a3, const void* indices, const void* vertices);
22 void sceGumDrawBezier(int vtype, int ucount, int vcount, const void* indices, const void* vertices);
23 void sceGumDrawSpline(int vtype, int ucount, int vcount, int uedge, int vedge, const void* indices, const void* vertices);
24 
33 void sceGumLoadIdentity(void);
34 
40 void sceGumLoadMatrix(const ScePspFMatrix4* m);
41 
43 
55 void sceGumMatrixMode(int mode);
56 
62 void sceGumMultMatrix(const ScePspFMatrix4* m);
63 
69 void sceGumOrtho(float left, float right, float bottom, float top, float near, float far);
70 
76 void sceGumPerspective(float fovy, float aspect, float near, float far);
77 
81 void sceGumPopMatrix(void);
82 
86 void sceGumPushMatrix(void);
87 
93 void sceGumRotateX(float angle);
94 
100 void sceGumRotateY(float angle);
101 
107 void sceGumRotateZ(float angle);
108 
114 void sceGumRotateXYZ(const ScePspFVector3* v);
115 
121 void sceGumRotateZYX(const ScePspFVector3* v);
122 
128 void sceGumScale(const ScePspFVector3* v);
129 
136 
142 void sceGumTranslate(const ScePspFVector3* v);
143 
147 void sceGumUpdateMatrix(void);
148 
154 void sceGumFullInverse();
155 
162 void sceGumFastInverse();
163 
174 void sceGumBeginObject(int vtype, int count, const void* indices, const void* vertices);
175 
181 void sceGumEndObject();
182 
183 // unimplemented functions
184 
185 //sceGumLoadContext
186 //sceGumSetCurMatrix
187 //sceGumSetMatrixStack
188 //sceGumStoreContext
189 
190 // standalone functions
191 
192 void gumInit(void);
193 
200 
203 void gumMultMatrix(ScePspFMatrix4* result, const ScePspFMatrix4* a, const ScePspFMatrix4* b);
204 void gumOrtho(ScePspFMatrix4* m, float left, float right, float bottom, float top, float near, float far);
205 void gumPerspective(ScePspFMatrix4* m, float fovy, float aspect, float near, float far);
206 void gumRotateX(ScePspFMatrix4* m, float angle);
207 void gumRotateXYZ(ScePspFMatrix4* m, const ScePspFVector3* v);
208 void gumRotateY(ScePspFMatrix4* m, float angle);
209 void gumRotateZ(ScePspFMatrix4* m, float angle);
210 void gumRotateZYX(ScePspFMatrix4* m, const ScePspFVector3* v);
211 void gumScale(ScePspFMatrix4* m, const ScePspFVector3* v);
212 void gumTranslate(ScePspFMatrix4* m, const ScePspFVector3* v);
214 
225 
226 // vector functions
227 
229 float gumDotProduct(const ScePspFVector3* a, const ScePspFVector3* b);
231 
232 #if defined(__cplusplus)
233 }
234 #endif
235 
236 #endif