PSPSDK 1.0+beta2
pspgu.h File Reference
#include <psptypes.h>
#include <pspge.h>
Include dependency graph for pspgu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GU_PI   (3.141593f)
 
#define GU_FALSE   (0)
 
#define GU_TRUE   (1)
 
#define GU_POINTS   (0)
 
#define GU_LINES   (1)
 
#define GU_LINE_STRIP   (2)
 
#define GU_TRIANGLES   (3)
 
#define GU_TRIANGLE_STRIP   (4)
 
#define GU_TRIANGLE_FAN   (5)
 
#define GU_SPRITES   (6)
 
#define GU_ALPHA_TEST   (0)
 
#define GU_DEPTH_TEST   (1)
 
#define GU_SCISSOR_TEST   (2)
 
#define GU_STENCIL_TEST   (3)
 
#define GU_BLEND   (4)
 
#define GU_CULL_FACE   (5)
 
#define GU_DITHER   (6)
 
#define GU_FOG   (7)
 
#define GU_CLIP_PLANES   (8)
 
#define GU_TEXTURE_2D   (9)
 
#define GU_LIGHTING   (10)
 
#define GU_LIGHT0   (11)
 
#define GU_LIGHT1   (12)
 
#define GU_LIGHT2   (13)
 
#define GU_LIGHT3   (14)
 
#define GU_LINE_SMOOTH   (15)
 
#define GU_PATCH_CULL_FACE   (16)
 
#define GU_COLOR_TEST   (17)
 
#define GU_COLOR_LOGIC_OP   (18)
 
#define GU_FACE_NORMAL_REVERSE   (19)
 
#define GU_PATCH_FACE   (20)
 
#define GU_FRAGMENT_2X   (21)
 
#define GU_PROJECTION   (0)
 
#define GU_VIEW   (1)
 
#define GU_MODEL   (2)
 
#define GU_TEXTURE   (3)
 
#define GU_TEXTURE_SHIFT(n)   ((n)<<0)
 
#define GU_TEXTURE_8BIT   GU_TEXTURE_SHIFT(1)
 
#define GU_TEXTURE_16BIT   GU_TEXTURE_SHIFT(2)
 
#define GU_TEXTURE_32BITF   GU_TEXTURE_SHIFT(3)
 
#define GU_TEXTURE_BITS   GU_TEXTURE_SHIFT(3)
 
#define GU_COLOR_SHIFT(n)   ((n)<<2)
 
#define GU_COLOR_5650   GU_COLOR_SHIFT(4)
 
#define GU_COLOR_5551   GU_COLOR_SHIFT(5)
 
#define GU_COLOR_4444   GU_COLOR_SHIFT(6)
 
#define GU_COLOR_8888   GU_COLOR_SHIFT(7)
 
#define GU_COLOR_BITS   GU_COLOR_SHIFT(7)
 
#define GU_NORMAL_SHIFT(n)   ((n)<<5)
 
#define GU_NORMAL_8BIT   GU_NORMAL_SHIFT(1)
 
#define GU_NORMAL_16BIT   GU_NORMAL_SHIFT(2)
 
#define GU_NORMAL_32BITF   GU_NORMAL_SHIFT(3)
 
#define GU_NORMAL_BITS   GU_NORMAL_SHIFT(3)
 
#define GU_VERTEX_SHIFT(n)   ((n)<<7)
 
#define GU_VERTEX_8BIT   GU_VERTEX_SHIFT(1)
 
#define GU_VERTEX_16BIT   GU_VERTEX_SHIFT(2)
 
#define GU_VERTEX_32BITF   GU_VERTEX_SHIFT(3)
 
#define GU_VERTEX_BITS   GU_VERTEX_SHIFT(3)
 
#define GU_WEIGHT_SHIFT(n)   ((n)<<9)
 
#define GU_WEIGHT_8BIT   GU_WEIGHT_SHIFT(1)
 
#define GU_WEIGHT_16BIT   GU_WEIGHT_SHIFT(2)
 
#define GU_WEIGHT_32BITF   GU_WEIGHT_SHIFT(3)
 
#define GU_WEIGHT_BITS   GU_WEIGHT_SHIFT(3)
 
#define GU_INDEX_SHIFT(n)   ((n)<<11)
 
#define GU_INDEX_8BIT   GU_INDEX_SHIFT(1)
 
#define GU_INDEX_16BIT   GU_INDEX_SHIFT(2)
 
#define GU_INDEX_BITS   GU_INDEX_SHIFT(3)
 
#define GU_WEIGHTS(n)   ((((n)-1)&7)<<14)
 
#define GU_WEIGHTS_BITS   GU_WEIGHTS(8)
 
#define GU_VERTICES(n)   ((((n)-1)&7)<<18)
 
#define GU_VERTICES_BITS   GU_VERTICES(8)
 
#define GU_TRANSFORM_SHIFT(n)   ((n)<<23)
 
#define GU_TRANSFORM_3D   GU_TRANSFORM_SHIFT(0)
 
#define GU_TRANSFORM_2D   GU_TRANSFORM_SHIFT(1)
 
#define GU_TRANSFORM_BITS   GU_TRANSFORM_SHIFT(1)
 
#define GU_PSM_5650   (0) /* Display, Texture, Palette */
 
#define GU_PSM_5551   (1) /* Display, Texture, Palette */
 
#define GU_PSM_4444   (2) /* Display, Texture, Palette */
 
#define GU_PSM_8888   (3) /* Display, Texture, Palette */
 
#define GU_PSM_T4   (4) /* Texture */
 
#define GU_PSM_T8   (5) /* Texture */
 
#define GU_PSM_T16   (6) /* Texture */
 
#define GU_PSM_T32   (7) /* Texture */
 
#define GU_PSM_DXT1   (8) /* Texture */
 
#define GU_PSM_DXT3   (9) /* Texture */
 
#define GU_PSM_DXT5   (10) /* Texture */
 
#define GU_FILL_FILL   (0)
 
#define GU_OPEN_FILL   (1)
 
#define GU_FILL_OPEN   (2)
 
#define GU_OPEN_OPEN   (3)
 
#define GU_FLAT   (0)
 
#define GU_SMOOTH   (1)
 
#define GU_CLEAR   (0)
 
#define GU_AND   (1)
 
#define GU_AND_REVERSE   (2)
 
#define GU_COPY   (3)
 
#define GU_AND_INVERTED   (4)
 
#define GU_NOOP   (5)
 
#define GU_XOR   (6)
 
#define GU_OR   (7)
 
#define GU_NOR   (8)
 
#define GU_EQUIV   (9)
 
#define GU_INVERTED   (10)
 
#define GU_OR_REVERSE   (11)
 
#define GU_COPY_INVERTED   (12)
 
#define GU_OR_INVERTED   (13)
 
#define GU_NAND   (14)
 
#define GU_SET   (15)
 
#define GU_NEAREST   (0)
 
#define GU_LINEAR   (1)
 
#define GU_NEAREST_MIPMAP_NEAREST   (4)
 
#define GU_LINEAR_MIPMAP_NEAREST   (5)
 
#define GU_NEAREST_MIPMAP_LINEAR   (6)
 
#define GU_LINEAR_MIPMAP_LINEAR   (7)
 
#define GU_TEXTURE_COORDS   (0)
 
#define GU_TEXTURE_MATRIX   (1)
 
#define GU_ENVIRONMENT_MAP   (2)
 
#define GU_TEXTURE_AUTO   (0)
 
#define GU_TEXTURE_CONST   (1)
 
#define GU_TEXTURE_SLOPE   (2)
 
#define GU_POSITION   (0)
 
#define GU_UV   (1)
 
#define GU_NORMALIZED_NORMAL   (2)
 
#define GU_NORMAL   (3)
 
#define GU_REPEAT   (0)
 
#define GU_CLAMP   (1)
 
#define GU_CW   (0)
 
#define GU_CCW   (1)
 
#define GU_NEVER   (0)
 
#define GU_ALWAYS   (1)
 
#define GU_EQUAL   (2)
 
#define GU_NOTEQUAL   (3)
 
#define GU_LESS   (4)
 
#define GU_LEQUAL   (5)
 
#define GU_GREATER   (6)
 
#define GU_GEQUAL   (7)
 
#define GU_COLOR_BUFFER_BIT   (1)
 
#define GU_STENCIL_BUFFER_BIT   (2)
 
#define GU_DEPTH_BUFFER_BIT   (4)
 
#define GU_FAST_CLEAR_BIT   (16)
 
#define GU_TFX_MODULATE   (0)
 
#define GU_TFX_DECAL   (1)
 
#define GU_TFX_BLEND   (2)
 
#define GU_TFX_REPLACE   (3)
 
#define GU_TFX_ADD   (4)
 
#define GU_TCC_RGB   (0)
 
#define GU_TCC_RGBA   (1)
 
#define GU_ADD   (0)
 
#define GU_SUBTRACT   (1)
 
#define GU_REVERSE_SUBTRACT   (2)
 
#define GU_MIN   (3)
 
#define GU_MAX   (4)
 
#define GU_ABS   (5)
 
#define GU_SRC_COLOR   (0)
 
#define GU_ONE_MINUS_SRC_COLOR   (1)
 
#define GU_SRC_ALPHA   (2)
 
#define GU_ONE_MINUS_SRC_ALPHA   (3)
 
#define GU_DST_COLOR   (0)
 
#define GU_ONE_MINUS_DST_COLOR   (1)
 
#define GU_DST_ALPHA   (4)
 
#define GU_ONE_MINUS_DST_ALPHA   (5)
 
#define GU_FIX   (10)
 
#define GU_KEEP   (0)
 
#define GU_ZERO   (1)
 
#define GU_REPLACE   (2)
 
#define GU_INVERT   (3)
 
#define GU_INCR   (4)
 
#define GU_DECR   (5)
 
#define GU_AMBIENT   (1)
 
#define GU_DIFFUSE   (2)
 
#define GU_SPECULAR   (4)
 
#define GU_AMBIENT_AND_DIFFUSE   (GU_AMBIENT|GU_DIFFUSE)
 
#define GU_DIFFUSE_AND_SPECULAR   (GU_DIFFUSE|GU_SPECULAR)
 
#define GU_UNKNOWN_LIGHT_COMPONENT   (8)
 
#define GU_SINGLE_COLOR   (0)
 
#define GU_SEPARATE_SPECULAR_COLOR   (1)
 
#define GU_DIRECTIONAL   (0)
 
#define GU_POINTLIGHT   (1)
 
#define GU_SPOTLIGHT   (2)
 
#define GU_DIRECT   (0)
 
#define GU_CALL   (1)
 
#define GU_SEND   (2)
 
#define GU_TAIL   (0)
 
#define GU_HEAD   (1)
 
#define GU_SYNC_FINISH   (0)
 
#define GU_SYNC_SIGNAL   (1)
 
#define GU_SYNC_DONE   (2)
 
#define GU_SYNC_LIST   (3)
 
#define GU_SYNC_SEND   (4)
 
#define GU_SYNC_WAIT   (0)
 
#define GU_SYNC_NOWAIT   (1)
 
#define GU_SYNC_WHAT_DONE   (0)
 
#define GU_SYNC_WHAT_QUEUED   (1)
 
#define GU_SYNC_WHAT_DRAW   (2)
 
#define GU_SYNC_WHAT_STALL   (3)
 
#define GU_SYNC_WHAT_CANCEL   (4)
 
#define GU_CALLBACK_SIGNAL   (1)
 
#define GU_CALLBACK_FINISH   (4)
 
#define GU_BEHAVIOR_SUSPEND   (1)
 
#define GU_BEHAVIOR_CONTINUE   (2)
 
#define GU_ABGR(a, b, g, r)   (((a) << 24)|((b) << 16)|((g) << 8)|(r))
 
#define GU_ARGB(a, r, g, b)   GU_ABGR((a),(b),(g),(r))
 
#define GU_RGBA(r, g, b, a)   GU_ARGB((a),(r),(g),(b))
 
#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))
 

Typedefs

typedef void(* GuSwapBuffersCallback) (void **display, void **render)
 

Functions

void sceGuDepthBuffer (void *zbp, int zbw)
 Set depth buffer parameters. More...
 
void sceGuDispBuffer (int width, int height, void *dispbp, int dispbw)
 Set display buffer parameters. More...
 
void sceGuDrawBuffer (int psm, void *fbp, int fbw)
 Set draw buffer parameters (and store in context for buffer-swap) More...
 
void sceGuDrawBufferList (int psm, void *fbp, int fbw)
 Set draw buffer directly, not storing parameters in the context. More...
 
int sceGuDisplay (int state)
 Turn display on or off. More...
 
void sceGuDepthFunc (int function)
 Select which depth-test function to use. More...
 
void sceGuDepthMask (int mask)
 Mask depth buffer writes. More...
 
void sceGuDepthOffset (unsigned int offset)
 
void sceGuDepthRange (int near, int far)
 Set which range to use for depth calculations. More...
 
void sceGuFog (float near, float far, unsigned int color)
 
void sceGuInit (void)
 Initalize the GU system. More...
 
void sceGuTerm (void)
 Shutdown the GU system. More...
 
void sceGuBreak (int a0)
 
void sceGuContinue (void)
 
void * sceGuSetCallback (int signal, void(*callback)(int))
 Setup signal handler. More...
 
void sceGuSignal (int signal, int behavior)
 Trigger signal to call code from the command stream. More...
 
void sceGuSendCommandf (int cmd, float argument)
 Send raw float-command to the GE. More...
 
void sceGuSendCommandi (int cmd, int argument)
 Send raw command to the GE. More...
 
void * sceGuGetMemory (int size)
 Allocate memory on the current display list for temporary storage. More...
 
void sceGuStart (int cid, void *list)
 Start filling a new display-context. More...
 
int sceGuFinish (void)
 Finish current display list and go back to the parent context. More...
 
int sceGuFinishId (unsigned int id)
 Finish current display list and go back to the parent context, sending argument id for the finish callback. More...
 
void sceGuCallList (const void *list)
 Call previously generated display-list. More...
 
void sceGuCallMode (int mode)
 Set wether to use stack-based calls or signals to handle execution of called lists. More...
 
int sceGuCheckList (void)
 Check how large the current display-list is. More...
 
void sceGuSendList (int mode, const void *list, PspGeContext *context)
 Send a list to the GE directly. More...
 
void * sceGuSwapBuffers (void)
 Swap display and draw buffer. More...
 
int sceGuSync (int mode, int what)
 Wait until display list has finished executing. More...
 
void sceGuDrawArray (int prim, int vtype, int count, const void *indices, const void *vertices)
 Draw array of vertices forming primitives. More...
 
void sceGuBeginObject (int vtype, int count, const void *indices, const void *vertices)
 Begin conditional rendering of object. More...
 
void sceGuEndObject (void)
 End conditional rendering of object. More...
 
void sceGuSetStatus (int state, int status)
 Enable or disable GE state. More...
 
int sceGuGetStatus (int state)
 Get if state is currently enabled or disabled. More...
 
void sceGuSetAllStatus (int status)
 Set the status on all 22 available states. More...
 
int sceGuGetAllStatus (void)
 Query status on all 22 available states. More...
 
void sceGuEnable (int state)
 Enable GE state. More...
 
void sceGuDisable (int state)
 Disable GE state. More...
 
void sceGuLight (int light, int type, int components, const ScePspFVector3 *position)
 Set light parameters. More...
 
void sceGuLightAtt (int light, float atten0, float atten1, float atten2)
 Set light attenuation. More...
 
void sceGuLightColor (int light, int component, unsigned int color)
 Set light color. More...
 
void sceGuLightMode (int mode)
 Set light mode. More...
 
void sceGuLightSpot (int light, const ScePspFVector3 *direction, float exponent, float cutoff)
 Set spotlight parameters. More...
 
void sceGuClear (int flags)
 Clear current drawbuffer. More...
 
void sceGuClearColor (unsigned int color)
 Set the current clear-color. More...
 
void sceGuClearDepth (unsigned int depth)
 Set the current clear-depth. More...
 
void sceGuClearStencil (unsigned int stencil)
 Set the current stencil clear value. More...
 
void sceGuPixelMask (unsigned int mask)
 Set mask for which bits of the pixels to write. More...
 
void sceGuColor (unsigned int color)
 Set current primitive color. More...
 
void sceGuColorFunc (int func, unsigned int color, unsigned int mask)
 Set the color test function. More...
 
void sceGuColorMaterial (int components)
 Set which color components that the material will receive. More...
 
void sceGuAlphaFunc (int func, int value, int mask)
 Set the alpha test parameters. More...
 
void sceGuAmbient (unsigned int color)
 
void sceGuAmbientColor (unsigned int color)
 
void sceGuBlendFunc (int op, int src, int dest, unsigned int srcfix, unsigned int destfix)
 Set the blending-mode. More...
 
void sceGuMaterial (int mode, int color)
 
void sceGuModelColor (unsigned int emissive, unsigned int ambient, unsigned int diffuse, unsigned int specular)
 
void sceGuStencilFunc (int func, int ref, int mask)
 Set stencil function and reference value for stencil testing. More...
 
void sceGuStencilOp (int fail, int zfail, int zpass)
 Set the stencil test actions. More...
 
void sceGuSpecular (float power)
 Set the specular power for the material. More...
 
void sceGuFrontFace (int order)
 Set the current face-order (for culling) More...
 
void sceGuLogicalOp (int op)
 Set color logical operation. More...
 
void sceGuSetDither (const ScePspIMatrix4 *matrix)
 Set ordered pixel dither matrix. More...
 
void sceGuShadeModel (int mode)
 Set how primitives are shaded. More...
 
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. More...
 
void sceGuTexEnvColor (unsigned int color)
 Specify the texture environment color. More...
 
void sceGuTexFilter (int min, int mag)
 Set how the texture is filtered. More...
 
void sceGuTexFlush (void)
 Flush texture page-cache. More...
 
void sceGuTexFunc (int tfx, int tcc)
 Set how textures are applied. More...
 
void sceGuTexImage (int mipmap, int width, int height, int tbw, const void *tbp)
 Set current texturemap. More...
 
void sceGuTexLevelMode (unsigned int mode, float bias)
 Set texture-level mode (mipmapping) More...
 
void sceGuTexMapMode (int mode, unsigned int a1, unsigned int a2)
 Set the texture-mapping mode. More...
 
void sceGuTexMode (int tpsm, int maxmips, int a2, int swizzle)
 Set texture-mode parameters. More...
 
void sceGuTexOffset (float u, float v)
 Set texture offset. More...
 
void sceGuTexProjMapMode (int mode)
 Set texture projection-map mode. More...
 
void sceGuTexScale (float u, float v)
 Set texture scale. More...
 
void sceGuTexSlope (float slope)
 
void sceGuTexSync ()
 Synchronize rendering pipeline with image upload. More...
 
void sceGuTexWrap (int u, int v)
 Set if the texture should repeat or clamp. More...
 
void sceGuClutLoad (int num_blocks, const void *cbp)
 Upload CLUT (Color Lookup Table) More...
 
void sceGuClutMode (unsigned int cpsm, unsigned int shift, unsigned int mask, unsigned int a3)
 Set current CLUT mode. More...
 
void sceGuOffset (unsigned int x, unsigned int y)
 Set virtual coordinate offset. More...
 
void sceGuScissor (int x, int y, int w, int h)
 Set what to scissor within the current viewport. More...
 
void sceGuViewport (int cx, int cy, int width, int height)
 Set current viewport. More...
 
void sceGuDrawBezier (int vtype, int ucount, int vcount, const void *indices, const void *vertices)
 Draw bezier surface. More...
 
void sceGuPatchDivide (unsigned int ulevel, unsigned int vlevel)
 Set dividing for patches (beziers and splines) More...
 
void sceGuPatchFrontFace (unsigned int a0)
 
void sceGuPatchPrim (int prim)
 Set primitive for patches (beziers and splines) More...
 
void sceGuDrawSpline (int vtype, int ucount, int vcount, int uedge, int vedge, const void *indices, const void *vertices)
 
void sceGuSetMatrix (int type, const ScePspFMatrix4 *matrix)
 Set transform matrices. More...
 
void sceGuBoneMatrix (unsigned int index, const ScePspFMatrix4 *matrix)
 Specify skinning matrix entry. More...
 
void sceGuMorphWeight (int index, float weight)
 Specify morph weight entry. More...
 
void sceGuDrawArrayN (int primitive_type, int vertex_type, int count, int a3, const void *indices, const void *vertices)
 
void guSwapBuffersBehaviour (int behaviour)
 Set how the display should be set. More...
 
void guSwapBuffersCallback (GuSwapBuffersCallback callback)
 Set a buffer swap callback to allow for more advanced buffer methods without hacking the library. More...
 

Macro Definition Documentation

◆ GU_ABGR

#define GU_ABGR (   a,
  b,
  g,
  r 
)    (((a) << 24)|((b) << 16)|((g) << 8)|(r))

◆ GU_ABS

#define GU_ABS   (5)

◆ GU_ADD

#define GU_ADD   (0)

◆ GU_ALPHA_TEST

#define GU_ALPHA_TEST   (0)

◆ GU_ALWAYS

#define GU_ALWAYS   (1)

◆ GU_AMBIENT

#define GU_AMBIENT   (1)

◆ GU_AMBIENT_AND_DIFFUSE

#define GU_AMBIENT_AND_DIFFUSE   (GU_AMBIENT|GU_DIFFUSE)

◆ GU_AND

#define GU_AND   (1)

◆ GU_AND_INVERTED

#define GU_AND_INVERTED   (4)

◆ GU_AND_REVERSE

#define GU_AND_REVERSE   (2)

◆ GU_ARGB

#define GU_ARGB (   a,
  r,
  g,
  b 
)    GU_ABGR((a),(b),(g),(r))

◆ GU_BEHAVIOR_CONTINUE

#define GU_BEHAVIOR_CONTINUE   (2)

◆ GU_BEHAVIOR_SUSPEND

#define GU_BEHAVIOR_SUSPEND   (1)

◆ GU_BLEND

#define GU_BLEND   (4)

◆ GU_CALL

#define GU_CALL   (1)

◆ GU_CALLBACK_FINISH

#define GU_CALLBACK_FINISH   (4)

◆ GU_CALLBACK_SIGNAL

#define GU_CALLBACK_SIGNAL   (1)

◆ GU_CCW

#define GU_CCW   (1)

◆ GU_CLAMP

#define GU_CLAMP   (1)

◆ GU_CLEAR

#define GU_CLEAR   (0)

◆ GU_CLIP_PLANES

#define GU_CLIP_PLANES   (8)

◆ GU_COLOR

#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))

◆ GU_COLOR_4444

#define GU_COLOR_4444   GU_COLOR_SHIFT(6)

◆ GU_COLOR_5551

#define GU_COLOR_5551   GU_COLOR_SHIFT(5)

◆ GU_COLOR_5650

#define GU_COLOR_5650   GU_COLOR_SHIFT(4)

◆ GU_COLOR_8888

#define GU_COLOR_8888   GU_COLOR_SHIFT(7)

◆ GU_COLOR_BITS

#define GU_COLOR_BITS   GU_COLOR_SHIFT(7)

◆ GU_COLOR_BUFFER_BIT

#define GU_COLOR_BUFFER_BIT   (1)

◆ GU_COLOR_LOGIC_OP

#define GU_COLOR_LOGIC_OP   (18)

◆ GU_COLOR_SHIFT

#define GU_COLOR_SHIFT (   n)    ((n)<<2)

◆ GU_COLOR_TEST

#define GU_COLOR_TEST   (17)

◆ GU_COPY

#define GU_COPY   (3)

◆ GU_COPY_INVERTED

#define GU_COPY_INVERTED   (12)

◆ GU_CULL_FACE

#define GU_CULL_FACE   (5)

◆ GU_CW

#define GU_CW   (0)

◆ GU_DECR

#define GU_DECR   (5)

◆ GU_DEPTH_BUFFER_BIT

#define GU_DEPTH_BUFFER_BIT   (4)

◆ GU_DEPTH_TEST

#define GU_DEPTH_TEST   (1)

◆ GU_DIFFUSE

#define GU_DIFFUSE   (2)

◆ GU_DIFFUSE_AND_SPECULAR

#define GU_DIFFUSE_AND_SPECULAR   (GU_DIFFUSE|GU_SPECULAR)

◆ GU_DIRECT

#define GU_DIRECT   (0)

◆ GU_DIRECTIONAL

#define GU_DIRECTIONAL   (0)

◆ GU_DITHER

#define GU_DITHER   (6)

◆ GU_DST_ALPHA

#define GU_DST_ALPHA   (4)

◆ GU_DST_COLOR

#define GU_DST_COLOR   (0)

◆ GU_ENVIRONMENT_MAP

#define GU_ENVIRONMENT_MAP   (2)

◆ GU_EQUAL

#define GU_EQUAL   (2)

◆ GU_EQUIV

#define GU_EQUIV   (9)

◆ GU_FACE_NORMAL_REVERSE

#define GU_FACE_NORMAL_REVERSE   (19)

◆ GU_FALSE

#define GU_FALSE   (0)

◆ GU_FAST_CLEAR_BIT

#define GU_FAST_CLEAR_BIT   (16)

◆ GU_FILL_FILL

#define GU_FILL_FILL   (0)

◆ GU_FILL_OPEN

#define GU_FILL_OPEN   (2)

◆ GU_FIX

#define GU_FIX   (10)

◆ GU_FLAT

#define GU_FLAT   (0)

◆ GU_FOG

#define GU_FOG   (7)

◆ GU_FRAGMENT_2X

#define GU_FRAGMENT_2X   (21)

◆ GU_GEQUAL

#define GU_GEQUAL   (7)

◆ GU_GREATER

#define GU_GREATER   (6)

◆ GU_HEAD

#define GU_HEAD   (1)

◆ GU_INCR

#define GU_INCR   (4)

◆ GU_INDEX_16BIT

#define GU_INDEX_16BIT   GU_INDEX_SHIFT(2)

◆ GU_INDEX_8BIT

#define GU_INDEX_8BIT   GU_INDEX_SHIFT(1)

◆ GU_INDEX_BITS

#define GU_INDEX_BITS   GU_INDEX_SHIFT(3)

◆ GU_INDEX_SHIFT

#define GU_INDEX_SHIFT (   n)    ((n)<<11)

◆ GU_INVERT

#define GU_INVERT   (3)

◆ GU_INVERTED

#define GU_INVERTED   (10)

◆ GU_KEEP

#define GU_KEEP   (0)

◆ GU_LEQUAL

#define GU_LEQUAL   (5)

◆ GU_LESS

#define GU_LESS   (4)

◆ GU_LIGHT0

#define GU_LIGHT0   (11)

◆ GU_LIGHT1

#define GU_LIGHT1   (12)

◆ GU_LIGHT2

#define GU_LIGHT2   (13)

◆ GU_LIGHT3

#define GU_LIGHT3   (14)

◆ GU_LIGHTING

#define GU_LIGHTING   (10)

◆ GU_LINE_SMOOTH

#define GU_LINE_SMOOTH   (15)

◆ GU_LINE_STRIP

#define GU_LINE_STRIP   (2)

◆ GU_LINEAR

#define GU_LINEAR   (1)

◆ GU_LINEAR_MIPMAP_LINEAR

#define GU_LINEAR_MIPMAP_LINEAR   (7)

◆ GU_LINEAR_MIPMAP_NEAREST

#define GU_LINEAR_MIPMAP_NEAREST   (5)

◆ GU_LINES

#define GU_LINES   (1)

◆ GU_MAX

#define GU_MAX   (4)

◆ GU_MIN

#define GU_MIN   (3)

◆ GU_MODEL

#define GU_MODEL   (2)

◆ GU_NAND

#define GU_NAND   (14)

◆ GU_NEAREST

#define GU_NEAREST   (0)

◆ GU_NEAREST_MIPMAP_LINEAR

#define GU_NEAREST_MIPMAP_LINEAR   (6)

◆ GU_NEAREST_MIPMAP_NEAREST

#define GU_NEAREST_MIPMAP_NEAREST   (4)

◆ GU_NEVER

#define GU_NEVER   (0)

◆ GU_NOOP

#define GU_NOOP   (5)

◆ GU_NOR

#define GU_NOR   (8)

◆ GU_NORMAL

#define GU_NORMAL   (3)

◆ GU_NORMAL_16BIT

#define GU_NORMAL_16BIT   GU_NORMAL_SHIFT(2)

◆ GU_NORMAL_32BITF

#define GU_NORMAL_32BITF   GU_NORMAL_SHIFT(3)

◆ GU_NORMAL_8BIT

#define GU_NORMAL_8BIT   GU_NORMAL_SHIFT(1)

◆ GU_NORMAL_BITS

#define GU_NORMAL_BITS   GU_NORMAL_SHIFT(3)

◆ GU_NORMAL_SHIFT

#define GU_NORMAL_SHIFT (   n)    ((n)<<5)

◆ GU_NORMALIZED_NORMAL

#define GU_NORMALIZED_NORMAL   (2)

◆ GU_NOTEQUAL

#define GU_NOTEQUAL   (3)

◆ GU_ONE_MINUS_DST_ALPHA

#define GU_ONE_MINUS_DST_ALPHA   (5)

◆ GU_ONE_MINUS_DST_COLOR

#define GU_ONE_MINUS_DST_COLOR   (1)

◆ GU_ONE_MINUS_SRC_ALPHA

#define GU_ONE_MINUS_SRC_ALPHA   (3)

◆ GU_ONE_MINUS_SRC_COLOR

#define GU_ONE_MINUS_SRC_COLOR   (1)

◆ GU_OPEN_FILL

#define GU_OPEN_FILL   (1)

◆ GU_OPEN_OPEN

#define GU_OPEN_OPEN   (3)

◆ GU_OR

#define GU_OR   (7)

◆ GU_OR_INVERTED

#define GU_OR_INVERTED   (13)

◆ GU_OR_REVERSE

#define GU_OR_REVERSE   (11)

◆ GU_PATCH_CULL_FACE

#define GU_PATCH_CULL_FACE   (16)

◆ GU_PATCH_FACE

#define GU_PATCH_FACE   (20)

◆ GU_PI

#define GU_PI   (3.141593f)

◆ GU_POINTLIGHT

#define GU_POINTLIGHT   (1)

◆ GU_POINTS

#define GU_POINTS   (0)

◆ GU_POSITION

#define GU_POSITION   (0)

◆ GU_PROJECTION

#define GU_PROJECTION   (0)

◆ GU_PSM_4444

#define GU_PSM_4444   (2) /* Display, Texture, Palette */

◆ GU_PSM_5551

#define GU_PSM_5551   (1) /* Display, Texture, Palette */

◆ GU_PSM_5650

#define GU_PSM_5650   (0) /* Display, Texture, Palette */

◆ GU_PSM_8888

#define GU_PSM_8888   (3) /* Display, Texture, Palette */

◆ GU_PSM_DXT1

#define GU_PSM_DXT1   (8) /* Texture */

◆ GU_PSM_DXT3

#define GU_PSM_DXT3   (9) /* Texture */

◆ GU_PSM_DXT5

#define GU_PSM_DXT5   (10) /* Texture */

◆ GU_PSM_T16

#define GU_PSM_T16   (6) /* Texture */

◆ GU_PSM_T32

#define GU_PSM_T32   (7) /* Texture */

◆ GU_PSM_T4

#define GU_PSM_T4   (4) /* Texture */

◆ GU_PSM_T8

#define GU_PSM_T8   (5) /* Texture */

◆ GU_REPEAT

#define GU_REPEAT   (0)

◆ GU_REPLACE

#define GU_REPLACE   (2)

◆ GU_REVERSE_SUBTRACT

#define GU_REVERSE_SUBTRACT   (2)

◆ GU_RGBA

#define GU_RGBA (   r,
  g,
  b,
  a 
)    GU_ARGB((a),(r),(g),(b))

◆ GU_SCISSOR_TEST

#define GU_SCISSOR_TEST   (2)

◆ GU_SEND

#define GU_SEND   (2)

◆ GU_SEPARATE_SPECULAR_COLOR

#define GU_SEPARATE_SPECULAR_COLOR   (1)

◆ GU_SET

#define GU_SET   (15)

◆ GU_SINGLE_COLOR

#define GU_SINGLE_COLOR   (0)

◆ GU_SMOOTH

#define GU_SMOOTH   (1)

◆ GU_SPECULAR

#define GU_SPECULAR   (4)

◆ GU_SPOTLIGHT

#define GU_SPOTLIGHT   (2)

◆ GU_SPRITES

#define GU_SPRITES   (6)

◆ GU_SRC_ALPHA

#define GU_SRC_ALPHA   (2)

◆ GU_SRC_COLOR

#define GU_SRC_COLOR   (0)

◆ GU_STENCIL_BUFFER_BIT

#define GU_STENCIL_BUFFER_BIT   (2)

◆ GU_STENCIL_TEST

#define GU_STENCIL_TEST   (3)

◆ GU_SUBTRACT

#define GU_SUBTRACT   (1)

◆ GU_SYNC_DONE

#define GU_SYNC_DONE   (2)

◆ GU_SYNC_FINISH

#define GU_SYNC_FINISH   (0)

◆ GU_SYNC_LIST

#define GU_SYNC_LIST   (3)

◆ GU_SYNC_NOWAIT

#define GU_SYNC_NOWAIT   (1)

◆ GU_SYNC_SEND

#define GU_SYNC_SEND   (4)

◆ GU_SYNC_SIGNAL

#define GU_SYNC_SIGNAL   (1)

◆ GU_SYNC_WAIT

#define GU_SYNC_WAIT   (0)

◆ GU_SYNC_WHAT_CANCEL

#define GU_SYNC_WHAT_CANCEL   (4)

◆ GU_SYNC_WHAT_DONE

#define GU_SYNC_WHAT_DONE   (0)

◆ GU_SYNC_WHAT_DRAW

#define GU_SYNC_WHAT_DRAW   (2)

◆ GU_SYNC_WHAT_QUEUED

#define GU_SYNC_WHAT_QUEUED   (1)

◆ GU_SYNC_WHAT_STALL

#define GU_SYNC_WHAT_STALL   (3)

◆ GU_TAIL

#define GU_TAIL   (0)

◆ GU_TCC_RGB

#define GU_TCC_RGB   (0)

◆ GU_TCC_RGBA

#define GU_TCC_RGBA   (1)

◆ GU_TEXTURE

#define GU_TEXTURE   (3)

◆ GU_TEXTURE_16BIT

#define GU_TEXTURE_16BIT   GU_TEXTURE_SHIFT(2)

◆ GU_TEXTURE_2D

#define GU_TEXTURE_2D   (9)

◆ GU_TEXTURE_32BITF

#define GU_TEXTURE_32BITF   GU_TEXTURE_SHIFT(3)

◆ GU_TEXTURE_8BIT

#define GU_TEXTURE_8BIT   GU_TEXTURE_SHIFT(1)

◆ GU_TEXTURE_AUTO

#define GU_TEXTURE_AUTO   (0)

◆ GU_TEXTURE_BITS

#define GU_TEXTURE_BITS   GU_TEXTURE_SHIFT(3)

◆ GU_TEXTURE_CONST

#define GU_TEXTURE_CONST   (1)

◆ GU_TEXTURE_COORDS

#define GU_TEXTURE_COORDS   (0)

◆ GU_TEXTURE_MATRIX

#define GU_TEXTURE_MATRIX   (1)

◆ GU_TEXTURE_SHIFT

#define GU_TEXTURE_SHIFT (   n)    ((n)<<0)

◆ GU_TEXTURE_SLOPE

#define GU_TEXTURE_SLOPE   (2)

◆ GU_TFX_ADD

#define GU_TFX_ADD   (4)

◆ GU_TFX_BLEND

#define GU_TFX_BLEND   (2)

◆ GU_TFX_DECAL

#define GU_TFX_DECAL   (1)

◆ GU_TFX_MODULATE

#define GU_TFX_MODULATE   (0)

◆ GU_TFX_REPLACE

#define GU_TFX_REPLACE   (3)

◆ GU_TRANSFORM_2D

#define GU_TRANSFORM_2D   GU_TRANSFORM_SHIFT(1)

◆ GU_TRANSFORM_3D

#define GU_TRANSFORM_3D   GU_TRANSFORM_SHIFT(0)

◆ GU_TRANSFORM_BITS

#define GU_TRANSFORM_BITS   GU_TRANSFORM_SHIFT(1)

◆ GU_TRANSFORM_SHIFT

#define GU_TRANSFORM_SHIFT (   n)    ((n)<<23)

◆ GU_TRIANGLE_FAN

#define GU_TRIANGLE_FAN   (5)

◆ GU_TRIANGLE_STRIP

#define GU_TRIANGLE_STRIP   (4)

◆ GU_TRIANGLES

#define GU_TRIANGLES   (3)

◆ GU_TRUE

#define GU_TRUE   (1)

◆ GU_UNKNOWN_LIGHT_COMPONENT

#define GU_UNKNOWN_LIGHT_COMPONENT   (8)

◆ GU_UV

#define GU_UV   (1)

◆ GU_VERTEX_16BIT

#define GU_VERTEX_16BIT   GU_VERTEX_SHIFT(2)

◆ GU_VERTEX_32BITF

#define GU_VERTEX_32BITF   GU_VERTEX_SHIFT(3)

◆ GU_VERTEX_8BIT

#define GU_VERTEX_8BIT   GU_VERTEX_SHIFT(1)

◆ GU_VERTEX_BITS

#define GU_VERTEX_BITS   GU_VERTEX_SHIFT(3)

◆ GU_VERTEX_SHIFT

#define GU_VERTEX_SHIFT (   n)    ((n)<<7)

◆ GU_VERTICES

#define GU_VERTICES (   n)    ((((n)-1)&7)<<18)

◆ GU_VERTICES_BITS

#define GU_VERTICES_BITS   GU_VERTICES(8)

◆ GU_VIEW

#define GU_VIEW   (1)

◆ GU_WEIGHT_16BIT

#define GU_WEIGHT_16BIT   GU_WEIGHT_SHIFT(2)

◆ GU_WEIGHT_32BITF

#define GU_WEIGHT_32BITF   GU_WEIGHT_SHIFT(3)

◆ GU_WEIGHT_8BIT

#define GU_WEIGHT_8BIT   GU_WEIGHT_SHIFT(1)

◆ GU_WEIGHT_BITS

#define GU_WEIGHT_BITS   GU_WEIGHT_SHIFT(3)

◆ GU_WEIGHT_SHIFT

#define GU_WEIGHT_SHIFT (   n)    ((n)<<9)

◆ GU_WEIGHTS

#define GU_WEIGHTS (   n)    ((((n)-1)&7)<<14)

◆ GU_WEIGHTS_BITS

#define GU_WEIGHTS_BITS   GU_WEIGHTS(8)

◆ GU_XOR

#define GU_XOR   (6)

◆ GU_ZERO

#define GU_ZERO   (1)

Typedef Documentation

◆ GuSwapBuffersCallback

typedef void(* GuSwapBuffersCallback) (void **display, void **render)