PSPSDK 2025-05-14
Loading...
Searching...
No Matches
pspgu.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
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 __pspgu_h__
10#define __pspgu_h__
11
12#include <psptypes.h>
13#include <pspge.h>
14
19#if defined(__cplusplus)
20extern "C" {
21#endif
22
23/* PI, float-sized */
24#define GU_PI (3.141593f)
25
26/* Boolean values for convenience */
27#define GU_FALSE (0)
28#define GU_TRUE (1)
29
30/* Primitive types */
31#define GU_POINTS (0)
32#define GU_LINES (1)
33#define GU_LINE_STRIP (2)
34#define GU_TRIANGLES (3)
35#define GU_TRIANGLE_STRIP (4)
36#define GU_TRIANGLE_FAN (5)
37#define GU_SPRITES (6)
38
39/* States */
40#define GU_ALPHA_TEST (0)
41#define GU_DEPTH_TEST (1)
42#define GU_SCISSOR_TEST (2)
43#define GU_STENCIL_TEST (3)
44#define GU_BLEND (4)
45#define GU_CULL_FACE (5)
46#define GU_DITHER (6)
47#define GU_FOG (7)
48#define GU_CLIP_PLANES (8)
49#define GU_TEXTURE_2D (9)
50#define GU_LIGHTING (10)
51#define GU_LIGHT0 (11)
52#define GU_LIGHT1 (12)
53#define GU_LIGHT2 (13)
54#define GU_LIGHT3 (14)
55#define GU_LINE_SMOOTH (15)
56#define GU_PATCH_CULL_FACE (16)
57#define GU_COLOR_TEST (17)
58#define GU_COLOR_LOGIC_OP (18)
59#define GU_FACE_NORMAL_REVERSE (19)
60#define GU_PATCH_FACE (20)
61#define GU_FRAGMENT_2X (21)
62#define GU_MAX_STATUS (22)
63
64/* Matrix modes */
65#define GU_PROJECTION (0)
66#define GU_VIEW (1)
67#define GU_MODEL (2)
68#define GU_TEXTURE (3)
69
70/* Vertex Declarations Begin */
71#define GU_TEXTURE_SHIFT(n) ((n)<<0)
72#define GU_TEXTURE_8BIT GU_TEXTURE_SHIFT(1)
73#define GU_TEXTURE_16BIT GU_TEXTURE_SHIFT(2)
74#define GU_TEXTURE_32BITF GU_TEXTURE_SHIFT(3)
75#define GU_TEXTURE_BITS GU_TEXTURE_SHIFT(3)
76
77#define GU_COLOR_SHIFT(n) ((n)<<2)
78#define GU_COLOR_5650 GU_COLOR_SHIFT(4)
79#define GU_COLOR_5551 GU_COLOR_SHIFT(5)
80#define GU_COLOR_4444 GU_COLOR_SHIFT(6)
81#define GU_COLOR_8888 GU_COLOR_SHIFT(7)
82#define GU_COLOR_BITS GU_COLOR_SHIFT(7)
83
84#define GU_NORMAL_SHIFT(n) ((n)<<5)
85#define GU_NORMAL_8BIT GU_NORMAL_SHIFT(1)
86#define GU_NORMAL_16BIT GU_NORMAL_SHIFT(2)
87#define GU_NORMAL_32BITF GU_NORMAL_SHIFT(3)
88#define GU_NORMAL_BITS GU_NORMAL_SHIFT(3)
89
90#define GU_VERTEX_SHIFT(n) ((n)<<7)
91#define GU_VERTEX_8BIT GU_VERTEX_SHIFT(1)
92#define GU_VERTEX_16BIT GU_VERTEX_SHIFT(2)
93#define GU_VERTEX_32BITF GU_VERTEX_SHIFT(3)
94#define GU_VERTEX_BITS GU_VERTEX_SHIFT(3)
95
96#define GU_WEIGHT_SHIFT(n) ((n)<<9)
97#define GU_WEIGHT_8BIT GU_WEIGHT_SHIFT(1)
98#define GU_WEIGHT_16BIT GU_WEIGHT_SHIFT(2)
99#define GU_WEIGHT_32BITF GU_WEIGHT_SHIFT(3)
100#define GU_WEIGHT_BITS GU_WEIGHT_SHIFT(3)
101
102#define GU_INDEX_SHIFT(n) ((n)<<11)
103#define GU_INDEX_8BIT GU_INDEX_SHIFT(1)
104#define GU_INDEX_16BIT GU_INDEX_SHIFT(2)
105#define GU_INDEX_BITS GU_INDEX_SHIFT(3)
106
107#define GU_WEIGHTS(n) ((((n)-1)&7)<<14)
108#define GU_WEIGHTS_BITS GU_WEIGHTS(8)
109#define GU_VERTICES(n) ((((n)-1)&7)<<18)
110#define GU_VERTICES_BITS GU_VERTICES(8)
111
112#define GU_TRANSFORM_SHIFT(n) ((n)<<23)
113#define GU_TRANSFORM_3D GU_TRANSFORM_SHIFT(0)
114#define GU_TRANSFORM_2D GU_TRANSFORM_SHIFT(1)
115#define GU_TRANSFORM_BITS GU_TRANSFORM_SHIFT(1)
116/* Vertex Declarations End */
117
118/* display ON/OFF switch */
119#define GU_DISPLAY_OFF 0
120#define GU_DISPLAY_ON 1
121
122/* screen size */
123#define GU_SCR_WIDTH 480
124#define GU_SCR_HEIGHT 272
125#define GU_SCR_ASPECT ((float)GU_SCR_WIDTH / (float)GU_SCR_HEIGHT)
126#define GU_SCR_OFFSETX ((4096 - GU_SCR_WIDTH) / 2)
127#define GU_SCR_OFFSETY ((4096 - GU_SCR_HEIGHT) / 2)
128
129/* Frame buffer */
130#define GU_VRAM_TOP 0x00000000
131#define GU_VRAM_WIDTH 512
132/* 16bit mode */
133#define GU_VRAM_BUFSIZE (GU_VRAM_WIDTH*GU_SCR_HEIGHT*2)
134#define GU_VRAM_BP_0 (void *)(GU_VRAM_TOP)
135#define GU_VRAM_BP_1 (void *)(GU_VRAM_TOP+GU_VRAM_BUFSIZE)
136#define GU_VRAM_BP_2 (void *)(GU_VRAM_TOP+(GU_VRAM_BUFSIZE*2))
137/* 32bit mode */
138#define GU_VRAM_BUFSIZE32 (GU_VRAM_WIDTH*GU_SCR_HEIGHT*4)
139#define GU_VRAM_BP32_0 (void *)(GU_VRAM_TOP)
140#define GU_VRAM_BP32_1 (void *)(GU_VRAM_TOP+GU_VRAM_BUFSIZE32)
141#define GU_VRAM_BP32_2 (void *)(GU_VRAM_TOP+(GU_VRAM_BUFSIZE32*2))
142
143/* Pixel Formats */
144#define GU_PSM_5650 (0) /* Display, Texture, Palette */
145#define GU_PSM_5551 (1) /* Display, Texture, Palette */
146#define GU_PSM_4444 (2) /* Display, Texture, Palette */
147#define GU_PSM_8888 (3) /* Display, Texture, Palette */
148#define GU_PSM_T4 (4) /* Texture */
149#define GU_PSM_T8 (5) /* Texture */
150#define GU_PSM_T16 (6) /* Texture */
151#define GU_PSM_T32 (7) /* Texture */
152#define GU_PSM_DXT1 (8) /* Texture */
153#define GU_PSM_DXT3 (9) /* Texture */
154#define GU_PSM_DXT5 (10) /* Texture */
155
156/* Spline Mode */
157#define GU_FILL_FILL (0)
158#define GU_OPEN_FILL (1)
159#define GU_FILL_OPEN (2)
160#define GU_OPEN_OPEN (3)
161
162/* Shading Model */
163#define GU_FLAT (0)
164#define GU_SMOOTH (1)
165
166/* Logical operation */
167#define GU_CLEAR (0)
168#define GU_AND (1)
169#define GU_AND_REVERSE (2)
170#define GU_COPY (3)
171#define GU_AND_INVERTED (4)
172#define GU_NOOP (5)
173#define GU_XOR (6)
174#define GU_OR (7)
175#define GU_NOR (8)
176#define GU_EQUIV (9)
177#define GU_INVERTED (10)
178#define GU_OR_REVERSE (11)
179#define GU_COPY_INVERTED (12)
180#define GU_OR_INVERTED (13)
181#define GU_NAND (14)
182#define GU_SET (15)
183
184/* Texture Filter */
185#define GU_NEAREST (0)
186#define GU_LINEAR (1)
187#define GU_NEAREST_MIPMAP_NEAREST (4)
188#define GU_LINEAR_MIPMAP_NEAREST (5)
189#define GU_NEAREST_MIPMAP_LINEAR (6)
190#define GU_LINEAR_MIPMAP_LINEAR (7)
191
192/* Texture Map Mode */
193#define GU_TEXTURE_COORDS (0)
194#define GU_TEXTURE_MATRIX (1)
195#define GU_ENVIRONMENT_MAP (2)
196
197/* Texture Level Mode */
198#define GU_TEXTURE_AUTO (0)
199#define GU_TEXTURE_CONST (1)
200#define GU_TEXTURE_SLOPE (2)
201
202/* Texture Projection Map Mode */
203#define GU_POSITION (0)
204#define GU_UV (1)
205#define GU_NORMALIZED_NORMAL (2)
206#define GU_NORMAL (3)
207
208/* Wrap Mode */
209#define GU_REPEAT (0)
210#define GU_CLAMP (1)
211
212/* Front Face Direction */
213#define GU_CW (0)
214#define GU_CCW (1)
215
216/* Test Function */
217#define GU_NEVER (0)
218#define GU_ALWAYS (1)
219#define GU_EQUAL (2)
220#define GU_NOTEQUAL (3)
221#define GU_LESS (4)
222#define GU_LEQUAL (5)
223#define GU_GREATER (6)
224#define GU_GEQUAL (7)
225
226/* Clear Buffer Mask */
227#define GU_COLOR_BUFFER_BIT (1)
228#define GU_STENCIL_BUFFER_BIT (2)
229#define GU_DEPTH_BUFFER_BIT (4)
230#define GU_FAST_CLEAR_BIT (16)
231
232/* Texture Effect */
233#define GU_TFX_MODULATE (0)
234#define GU_TFX_DECAL (1)
235#define GU_TFX_BLEND (2)
236#define GU_TFX_REPLACE (3)
237#define GU_TFX_ADD (4)
238
239/* Texture Color Component */
240#define GU_TCC_RGB (0)
241#define GU_TCC_RGBA (1)
242
243/* Blending Op */
244#define GU_ADD (0)
245#define GU_SUBTRACT (1)
246#define GU_REVERSE_SUBTRACT (2)
247#define GU_MIN (3)
248#define GU_MAX (4)
249#define GU_ABS (5)
250
251/* Blending Factor */
252#define GU_SRC_COLOR (0)
253#define GU_ONE_MINUS_SRC_COLOR (1)
254#define GU_SRC_ALPHA (2)
255#define GU_ONE_MINUS_SRC_ALPHA (3)
256#define GU_DST_COLOR (0)
257#define GU_ONE_MINUS_DST_COLOR (1)
258#define GU_DST_ALPHA (4)
259#define GU_ONE_MINUS_DST_ALPHA (5)
260#define GU_FIX (10)
261
262/* Stencil Operations */
263#define GU_KEEP (0)
264#define GU_ZERO (1)
265#define GU_REPLACE (2)
266#define GU_INVERT (3)
267#define GU_INCR (4)
268#define GU_DECR (5)
269
270/* Light Components */
271#define GU_AMBIENT (1)
272#define GU_DIFFUSE (2)
273#define GU_SPECULAR (4)
274#define GU_AMBIENT_AND_DIFFUSE (GU_AMBIENT|GU_DIFFUSE)
275#define GU_DIFFUSE_AND_SPECULAR (GU_DIFFUSE|GU_SPECULAR)
276#define GU_UNKNOWN_LIGHT_COMPONENT (8)
277
278/* Light modes */
279#define GU_SINGLE_COLOR (0)
280#define GU_SEPARATE_SPECULAR_COLOR (1)
281
282/* Light Type */
283#define GU_DIRECTIONAL (0)
284#define GU_POINTLIGHT (1)
285#define GU_SPOTLIGHT (2)
286
287/* Contexts */
288#define GU_DIRECT (0)
289#define GU_CALL (1)
290#define GU_SEND (2)
291
292/* List Queue */
293#define GU_TAIL (0)
294#define GU_HEAD (1)
295
296/* Sync behavior (mode) */
297#define GU_SYNC_FINISH (0)
298#define GU_SYNC_SIGNAL (1)
299#define GU_SYNC_DONE (2)
300#define GU_SYNC_LIST (3)
301#define GU_SYNC_SEND (4)
302
303/* behavior (what) */
304#define GU_SYNC_WAIT (0)
305#define GU_SYNC_NOWAIT (1)
306
307/* Sync behavior (what) [see pspge.h] */
308#define GU_SYNC_WHAT_DONE (0)
309#define GU_SYNC_WHAT_QUEUED (1)
310#define GU_SYNC_WHAT_DRAW (2)
311#define GU_SYNC_WHAT_STALL (3)
312#define GU_SYNC_WHAT_CANCEL (4)
313
314/* Call mode */
315#define GU_CALL_NORMAL (0)
316#define GU_CALL_SIGNAL (1)
317
318/* Signal models */
319#define GU_SIGNAL_WAIT (1)
320#define GU_SIGNAL_NOWAIT (2)
321#define GU_SIGNAL_PAUSE (3)
322
323/* Signals */
324#define GU_CALLBACK_SIGNAL (1)
325#define GU_CALLBACK_FINISH (4)
326
327/* Signal behavior */
328#define GU_BEHAVIOR_SUSPEND (1)
329#define GU_BEHAVIOR_CONTINUE (2)
330
331/* Break mode */
332#define GU_BREAK_PAUSE (0)
333#define GU_BREAK_CANCEL (1)
334
335/* Color Macros, maps 8 bit unsigned channels into one 32-bit value */
336#define GU_ABGR(a,b,g,r) (((a) << 24)|((b) << 16)|((g) << 8)|(r))
337#define GU_ARGB(a,r,g,b) GU_ABGR((a),(b),(g),(r))
338#define GU_RGBA(r,g,b,a) GU_ARGB((a),(r),(g),(b))
339
340/* Color Macro, maps floating point channels (0..1) into one 32-bit value */
341#define GU_COLOR(r,g,b,a) GU_RGBA((u32)((r) * 255.0f),(u32)((g) * 255.0f),(u32)((b) * 255.0f),(u32)((a) * 255.0f))
342
343typedef void (*GuSwapBuffersCallback)(void** display,void** render);
344
355void sceGuDepthBuffer(void* zbp, int zbw);
356
371void sceGuDispBuffer(int width, int height, void* dispbp, int dispbw);
372
391void sceGuDrawBuffer(int psm, void* fbp, int fbw);
392
400void sceGuDrawBufferList(int psm, void* fbp, int fbw);
401
412int sceGuDisplay(int state);
413
429void sceGuDepthFunc(int function);
430
436void sceGuDepthMask(int mask);
437
438void sceGuDepthOffset(unsigned int offset);
439
453void sceGuDepthRange(int near, int far);
454
455void sceGuFog(float near, float far, unsigned int color);
456
464int sceGuInit(void);
465
471void sceGuTerm(void);
472
481int sceGuBreak(int mode);
482
488int sceGuContinue(void);
489
501void* sceGuSetCallback(int signal, void (*callback)(int));
502
518void sceGuSignal(int signal, int behavior);
519
528void sceGuSendCommandf(int cmd, float argument);
529
538void sceGuSendCommandi(int cmd, int argument);
539
550void* sceGuGetMemory(int size);
551
566int sceGuStart(int ctype, void* list);
567
581int sceGuFinish(void);
582
594int sceGuFinishId(unsigned int id);
595
602int sceGuCallList(const void* list);
603
610void sceGuCallMode(int mode);
611
617int sceGuCheckList(void);
618
631int sceGuSendList(int mode, const void* list, PspGeContext* context);
632
638void* sceGuSwapBuffers(void);
639
666int sceGuSync(int mode, int what);
667
757void sceGuDrawArray(int prim, int vtype, int count, const void* indices, const void* vertices);
758
778void sceGuBeginObject(int vtype, int count, const void* indices, const void* vertices);
779
783void sceGuEndObject(void);
784
793void sceGuSetStatus(int state, int status);
794
803int sceGuGetStatus(int state);
804
812void sceGuSetAllStatus(int status);
813
821int sceGuGetAllStatus(void);
822
844void sceGuEnable(int state);
845
853void sceGuDisable(int state);
854
873void sceGuLight(int light, int type, int components, const ScePspFVector3* position);
874
883void sceGuLightAtt(int light, float atten0, float atten1, float atten2);
884
899void sceGuLightColor(int light, int component, unsigned int color);
900
913void sceGuLightMode(int mode);
914
923void sceGuLightSpot(int light, const ScePspFVector3* direction, float exponent, float cutoff);
924
935void sceGuClear(int flags);
936
942void sceGuClearColor(unsigned int color);
943
949void sceGuClearDepth(unsigned int depth);
950
957void sceGuClearStencil(unsigned int stencil);
958
965void sceGuPixelMask(unsigned int mask);
966
972void sceGuColor(unsigned int color);
973
994void sceGuColorFunc(int func, unsigned int color, unsigned int mask);
995
1006void sceGuColorMaterial(int components);
1007
1025void sceGuAlphaFunc(int func, int value, int mask);
1026
1032void sceGuAmbient(unsigned int color);
1033
1039void sceGuAmbientColor(unsigned int color);
1040
1075void sceGuBlendFunc(int op, int src, int dest, unsigned int srcfix, unsigned int destfix);
1076
1077void sceGuMaterial(int mode, int color);
1078
1082void sceGuModelColor(unsigned int emissive, unsigned int ambient, unsigned int diffuse, unsigned int specular);
1083
1101void sceGuStencilFunc(int func, int ref, int mask);
1102
1121void sceGuStencilOp(int fail, int zfail, int zpass);
1122
1129void sceGuSpecular(float power);
1130
1142void sceGuFrontFace(int order);
1143
1169void sceGuLogicalOp(int op);
1170
1178void sceGuSetDither(const ScePspIMatrix4* matrix);
1179
1189void sceGuShadeModel(int mode);
1190
1213void sceGuCopyImage(int psm, int sx, int sy, int width, int height, int srcw, void* src, int dx, int dy, int destw, void* dest);
1214
1224void sceGuTexEnvColor(unsigned int color);
1225
1240void sceGuTexFilter(int min, int mag);
1241
1248void sceGuTexFlush(void);
1249
1280void sceGuTexFunc(int tfx, int tcc);
1281
1296void sceGuTexImage(int mipmap, int width, int height, int tbw, const void* tbp);
1297
1309void sceGuTexLevelMode(unsigned int mode, float bias);
1310
1323void sceGuTexMapMode(int mode, unsigned int lu, unsigned int lv);
1324
1341void sceGuTexMode(int tpsm, int maxmips, int mc, int swizzle);
1342
1352void sceGuTexOffset(float u, float v);
1353
1365void sceGuTexProjMapMode(int mode);
1366
1376void sceGuTexScale(float u, float v);
1377void sceGuTexSlope(float slope);
1378
1385void sceGuTexSync();
1386
1397void sceGuTexWrap(int u, int v);
1398
1407void sceGuClutLoad(int num_blocks, const void* cbp);
1408
1423void sceGuClutMode(unsigned int cpsm, unsigned int shift, unsigned int mask, unsigned int a3);
1424
1438void sceGuOffset(unsigned int x, unsigned int y);
1439
1450void sceGuScissor(int x, int y, int w, int h);
1451
1465void sceGuViewport(int cx, int cy, int width, int height);
1466
1476void sceGuDrawBezier(int vtype, int ucount, int vcount, const void* indices, const void* vertices);
1477
1484void sceGuPatchDivide(unsigned int ulevel, unsigned int vlevel);
1485
1491void sceGuPatchFrontFace(unsigned int mode);
1492
1498void sceGuPatchPrim(int prim);
1499
1500void sceGuDrawSpline(int vtype, int ucount, int vcount, int uedge, int vedge, const void* indices, const void* vertices);
1501
1514void sceGuSetMatrix(int type, const ScePspFMatrix4* matrix);
1515
1529void sceGuBoneMatrix(unsigned int index, const ScePspFMatrix4* matrix);
1530
1544void sceGuMorphWeight(int index, float weight);
1545
1556void sceGuDrawArrayN(int primitive_type, int vertex_type, int vcount, int primcount, const void* indices, const void* vertices);
1557
1568void guSwapBuffersBehaviour(int behaviour);
1569
1592
1608void* guGetStaticVramBuffer(unsigned int width, unsigned int height, unsigned int psm);
1609
1627void* guGetStaticVramTexture(unsigned int width, unsigned int height, unsigned int psm);
1628
1638int guGetDisplayState();
1639
1642#if defined(__cplusplus)
1643};
1644#endif
1645
1646#endif
#define a3
Definition as_reg_compat.h:25
void sceGuSpecular(float power)
Set the specular power for the material.
Definition sceGuSpecular.c:11
void sceGuDispBuffer(int width, int height, void *dispbp, int dispbw)
Set display buffer parameters.
Definition sceGuDispBuffer.c:14
void sceGuFog(float near, float far, unsigned int color)
Definition sceGuFog.c:11
void sceGuTexProjMapMode(int mode)
Set texture projection-map mode.
Definition sceGuTexProjMapMode.c:11
void sceGuTexScale(float u, float v)
Set texture scale.
Definition sceGuTexScale.c:11
void sceGuDepthRange(int near, int far)
Set which range to use for depth calculations.
Definition sceGuDepthRange.c:11
void * sceGuSwapBuffers(void)
Swap display and draw buffer.
Definition sceGuSwapBuffers.c:14
void sceGuClearStencil(unsigned int stencil)
Set the current stencil clear value.
Definition sceGuClearStencil.c:11
int sceGuInit(void)
Initalize the GU system.
Definition sceGuInit.c:256
void sceGuSetMatrix(int type, const ScePspFMatrix4 *matrix)
Set transform matrices.
Definition sceGuSetMatrix.c:11
int sceGuFinishId(unsigned int id)
Finish current display list and go back to the parent context, sending argument id for the finish cal...
Definition sceGuFinishId.c:13
void sceGuPatchDivide(unsigned int ulevel, unsigned int vlevel)
Set dividing for patches (beziers and splines)
Definition sceGuPatchDivide.c:11
void sceGuLogicalOp(int op)
Set color logical operation.
Definition sceGuLogicalOp.c:11
void sceGuClutLoad(int num_blocks, const void *cbp)
Upload CLUT (Color Lookup Table)
Definition sceGuClutLoad.c:11
void sceGuDisable(int state)
Disable GE state.
Definition sceGuDisable.c:11
void sceGuPatchPrim(int prim)
Set primitive for patches (beziers and splines)
Definition sceGuPatchPrim.c:11
int sceGuGetStatus(int state)
Get if state is currently enabled or disabled.
Definition sceGuGetStatus.c:11
void sceGuBeginObject(int vtype, int count, const void *indices, const void *vertices)
Begin conditional rendering of object.
Definition sceGuBeginObject.c:11
void sceGuStencilFunc(int func, int ref, int mask)
Set stencil function and reference value for stencil testing.
Definition sceGuStencilFunc.c:11
void * sceGuGetMemory(int size)
Allocate memory on the current display list for temporary storage.
Definition sceGuGetMemory.c:14
void sceGuDrawBezier(int vtype, int ucount, int vcount, const void *indices, const void *vertices)
Draw bezier surface.
Definition sceGuDrawBezier.c:11
void sceGuViewport(int cx, int cy, int width, int height)
Set current viewport.
Definition sceGuViewport.c:11
int sceGuSync(int mode, int what)
Wait until display list has finished executing.
Definition sceGuSync.c:14
void sceGuMaterial(int mode, int color)
Definition sceGuMaterial.c:11
void sceGuDrawBuffer(int psm, void *fbp, int fbw)
Set draw buffer parameters (and store in context for buffer-swap)
Definition sceGuDrawBuffer.c:11
void sceGuTexFlush(void)
Flush texture page-cache.
Definition sceGuTexFlush.c:11
void sceGuTerm(void)
Shutdown the GU system.
Definition sceGuTerm.c:14
int sceGuFinish(void)
Finish current display list and go back to the parent context.
Definition sceGuFinish.c:11
void sceGuTexMapMode(int mode, unsigned int lu, unsigned int lv)
Set the texture-mapping mode.
Definition sceGuTexMapMode.c:11
void sceGuScissor(int x, int y, int w, int h)
Set what to scissor within the current viewport.
Definition sceGuScissor.c:11
void sceGuDepthMask(int mask)
Mask depth buffer writes.
Definition sceGuDepthMask.c:11
void sceGuMorphWeight(int index, float weight)
Specify morph weight entry.
Definition sceGuMorphWeight.c:11
void sceGuFrontFace(int order)
Set the current face-order (for culling)
Definition sceGuFrontFace.c:11
void * guGetStaticVramBuffer(unsigned int width, unsigned int height, unsigned int psm)
Allocate a draw buffer in vram.
Definition vram.c:37
void sceGuModelColor(unsigned int emissive, unsigned int ambient, unsigned int diffuse, unsigned int specular)
Definition sceGuModelColor.c:11
void guSwapBuffersBehaviour(int behaviour)
Set how the display should be set.
Definition sceGuSwapBuffers.c:33
void sceGuTexSync()
Synchronize rendering pipeline with image upload.
Definition sceGuTexSync.c:11
void sceGuTexFilter(int min, int mag)
Set how the texture is filtered.
Definition sceGuTexFilter.c:11
int sceGuCheckList(void)
Check how large the current display-list is.
Definition sceGuCheckList.c:11
void sceGuLightMode(int mode)
Set light mode.
Definition sceGuLightMode.c:11
void sceGuTexFunc(int tfx, int tcc)
Set how textures are applied.
Definition sceGuTexFunc.c:11
void sceGuBoneMatrix(unsigned int index, const ScePspFMatrix4 *matrix)
Specify skinning matrix entry.
Definition sceGuBoneMatrix.c:11
void sceGuSignal(int signal, int behavior)
Trigger signal to call code from the command stream.
Definition sceGuSignal.c:11
int sceGuContinue(void)
Continue the display list.
Definition sceGuContinue.c:11
void sceGuLight(int light, int type, int components, const ScePspFVector3 *position)
Set light parameters.
Definition sceGuLight.c:11
void sceGuCopyImage(int psm, int sx, int sy, int width, int height, int srcw, void *src, int dx, int dy, int destw, void *dest)
Image transfer using the GE.
Definition sceGuCopyImage.c:11
void sceGuDepthOffset(unsigned int offset)
Definition sceGuDepthOffset.c:11
void sceGuDrawArray(int prim, int vtype, int count, const void *indices, const void *vertices)
Draw array of vertices forming primitives.
Definition sceGuDrawArray.c:11
void sceGuLightAtt(int light, float atten0, float atten1, float atten2)
Set light attenuation.
Definition sceGuLightAtt.c:11
int sceGuStart(int ctype, void *list)
Start filling a new display-context.
Definition sceGuStart.c:15
void sceGuTexEnvColor(unsigned int color)
Specify the texture environment color.
Definition sceGuTexEnvColor.c:11
void sceGuSetAllStatus(int status)
Set the status on all 22 available states.
Definition sceGuSetAllStatus.c:11
void sceGuBlendFunc(int op, int src, int dest, unsigned int srcfix, unsigned int destfix)
Set the blending-mode.
Definition sceGuBlendFunc.c:11
void sceGuSetStatus(int state, int status)
Enable or disable GE state.
Definition sceGuSetStatus.c:11
void sceGuColorMaterial(int components)
Set which color components that the material will receive.
Definition sceGuColorMaterial.c:11
int sceGuDisplay(int state)
Turn display on or off.
Definition sceGuDisplay.c:14
void sceGuClearDepth(unsigned int depth)
Set the current clear-depth.
Definition sceGuClearDepth.c:11
void * sceGuSetCallback(int signal, void(*callback)(int))
Setup signal handler.
Definition sceGuSetCallback.c:11
void * guGetStaticVramTexture(unsigned int width, unsigned int height, unsigned int psm)
Allocate a texture in vram.
Definition vram.c:47
void sceGuEndObject(void)
End conditional rendering of object.
Definition sceGuEndObject.c:11
void sceGuPatchFrontFace(unsigned int mode)
Set front face for patches (beziers and splines)
Definition sceGuPatchFrontFace.c:11
void sceGuAmbient(unsigned int color)
Set the ambient light color.
Definition sceGuAmbient.c:11
void sceGuDepthBuffer(void *zbp, int zbw)
Set depth buffer parameters.
Definition sceGuDepthBuffer.c:11
int sceGuGetAllStatus(void)
Query status on all 22 available states.
Definition sceGuGetAllStatus.c:11
void sceGuDrawArrayN(int primitive_type, int vertex_type, int vcount, int primcount, const void *indices, const void *vertices)
Draw an array of primitives.
Definition sceGuDrawArrayN.c:11
void sceGuPixelMask(unsigned int mask)
Set mask for which bits of the pixels to write.
Definition sceGuPixelMask.c:11
void sceGuColor(unsigned int color)
Set current primitive color.
Definition sceGuColor.c:11
void sceGuAlphaFunc(int func, int value, int mask)
Set the alpha test parameters.
Definition sceGuAlphaFunc.c:11
int sceGuSendList(int mode, const void *list, PspGeContext *context)
Send a list to the GE directly.
Definition sceGuSendList.c:14
void sceGuDepthFunc(int function)
Select which depth-test function to use.
Definition sceGuDepthFunc.c:11
void sceGuTexOffset(float u, float v)
Set texture offset.
Definition sceGuTexOffset.c:11
void sceGuDrawSpline(int vtype, int ucount, int vcount, int uedge, int vedge, const void *indices, const void *vertices)
Definition sceGuDrawSpline.c:11
void sceGuSendCommandi(int cmd, int argument)
Send raw command to the GE.
Definition sceGuSendCommandi.c:11
int sceGuBreak(int mode)
Break the display list.
Definition sceGuBreak.c:11
int sceGuCallList(const void *list)
Call previously generated display-list.
Definition sceGuCallList.c:11
void sceGuDrawBufferList(int psm, void *fbp, int fbw)
Set draw buffer directly, not storing parameters in the context.
Definition sceGuDrawBufferList.c:11
void sceGuLightSpot(int light, const ScePspFVector3 *direction, float exponent, float cutoff)
Set spotlight parameters.
Definition sceGuLightSpot.c:11
void sceGuCallMode(int mode)
Set wether to use stack-based calls or signals to handle execution of called lists.
Definition sceGuCallMode.c:11
void sceGuLightColor(int light, int component, unsigned int color)
Set light color.
Definition sceGuLightColor.c:11
void sceGuEnable(int state)
Enable GE state.
Definition sceGuEnable.c:11
int guGetDisplayState()
Get state of display.
Definition sceGuDisplay.c:25
void sceGuClutMode(unsigned int cpsm, unsigned int shift, unsigned int mask, unsigned int a3)
Set current CLUT mode.
Definition sceGuClutMode.c:11
void sceGuClear(int flags)
Clear current drawbuffer.
Definition sceGuClear.c:11
void sceGuTexMode(int tpsm, int maxmips, int mc, int swizzle)
Set texture-mode parameters.
Definition sceGuTexMode.c:11
void sceGuStencilOp(int fail, int zfail, int zpass)
Set the stencil test actions.
Definition sceGuStencilOp.c:11
void sceGuColorFunc(int func, unsigned int color, unsigned int mask)
Set the color test function.
Definition sceGuColorFunc.c:11
void sceGuAmbientColor(unsigned int color)
Set the ambient color.
Definition sceGuAmbientColor.c:11
void sceGuTexLevelMode(unsigned int mode, float bias)
Set texture-level mode (mipmapping)
Definition sceGuTexLevelMode.c:13
void sceGuTexSlope(float slope)
Definition sceGuTexSlope.c:11
void sceGuOffset(unsigned int x, unsigned int y)
Set virtual coordinate offset.
Definition sceGuOffset.c:11
void sceGuTexImage(int mipmap, int width, int height, int tbw, const void *tbp)
Set current texturemap.
Definition sceGuTexImage.c:16
void guSwapBuffersCallback(GuSwapBuffersCallback callback)
Set a buffer swap callback to allow for more advanced buffer methods without hacking the library.
Definition sceGuSwapBuffers.c:38
void sceGuClearColor(unsigned int color)
Set the current clear-color.
Definition sceGuClearColor.c:11
void sceGuSetDither(const ScePspIMatrix4 *matrix)
Set ordered pixel dither matrix.
Definition sceGuSetDither.c:11
void sceGuShadeModel(int mode)
Set how primitives are shaded.
Definition sceGuShadeModel.c:11
void sceGuSendCommandf(int cmd, float argument)
Send raw float-command to the GE.
Definition sceGuSendCommandf.c:11
void sceGuTexWrap(int u, int v)
Set if the texture should repeat or clamp.
Definition sceGuTexWrap.c:11
void(* GuSwapBuffersCallback)(void **display, void **render)
Definition pspgu.h:343
Stores the state of the GE.
Definition pspge.h:23
Definition psptypes.h:301
Definition psptypes.h:183
Definition psptypes.h:287