Data Structures | |
struct | pgeVertV |
struct | pgeVertNV |
struct | pgeVertCV |
struct | pgeVertCNV |
struct | pgeVertTV |
struct | pgeVertTNV |
struct | pgeVertTCV |
struct | pgeVertTCNV |
struct | pgeRect |
struct | pgeCamera |
Defines | |
#define | ARGB(a, r, g, b) ((a << 24) | (r << 16) | (g << 8) | b) |
#define | RGBA(r, g, b, a) ((a << 24) | (b << 16) | (g << 8) | r) |
#define | PGE_GFX_PROJECTION GU_PROJECTION |
#define | PGE_GFX_VIEW GU_VIEW |
#define | PGE_GFX_MODEL GU_MODEL |
Enumerations | |
enum | pgeGfxVertexType { PGE_VERT_V = GU_VERTEX_32BITF, PGE_VERT_NV = GU_NORMAL_32BITF|GU_VERTEX_32BITF, PGE_VERT_CV = GU_COLOR_8888|GU_VERTEX_32BITF, PGE_VERT_CNV = GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF, PGE_VERT_TV = GU_TEXTURE_32BITF|GU_VERTEX_32BITF, PGE_VERT_TNV = GU_TEXTURE_32BITF|GU_NORMAL_32BITF|GU_VERTEX_32BITF, PGE_VERT_TCV = GU_TEXTURE_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF, PGE_VERT_TCNV = GU_TEXTURE_32BITF|GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF } |
enum | pgeGfxPrim { PGE_PRIM_POINTS, PGE_PRIM_LINES, PGE_PRIM_LINE_STRIP, PGE_PRIM_TRIANGLES, PGE_PRIM_TRIANGLE_STRIP, PGE_PRIM_TRIANGLE_FAN, PGE_PRIM_SPRITES } |
enum | pgeBlendMode { PGE_BLEND_MODE_TRANSPARENT, PGE_BLEND_MODE_REGULAR } |
enum | pgeWaitVsync { PGE_NO_WAIT_VSYNC = 0, PGE_WAIT_VSYNC } |
Functions | |
unsigned int * | pgeGfxGetFramebuffer (void) |
int | pgeGfxInit (enum pgePixelFormat pixelformat) |
void | pgeGfxShutdown (void) |
void | pgeGfxStartDrawing (void) |
void | pgeGfxEndDrawing (void) |
void | pgeGfxSwapBuffers (enum pgeWaitVsync vsync) |
void | pgeGfxClearScreen (unsigned int color) |
unsigned int | pgeGfxCreateColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
void | pgeGfxRenderToTexture (pgeTexture *texture) |
void | pgeGfxRenderToScreen (void) |
int | pgeGfxSetBlendMode (enum pgeBlendMode mode) |
void | pgeGfxSetMode3DCamera (float fov, pgeCamera *cam) |
void | pgeGfxDrawLine (float startx, float starty, float endx, float endy, unsigned int color) |
void | pgeGfxDrawStar (float x, float y, float outerradius, float innerradius, unsigned int numpoints, unsigned int color, float angle) |
void | pgeGfxDrawStarOutline (float x, float y, float outerradius, float innerradius, unsigned int numpoints, unsigned int color, float angle) |
void | pgeGfxDrawCircle (float x, float y, float radius, unsigned int numsteps, unsigned int color) |
void | pgeGfxDrawCircleOutline (float x, float y, float radius, unsigned int numsteps, unsigned int color) |
void | pgeGfxDrawRect (pgeRect *destrect, unsigned int color, float angle) |
void | pgeGfxDrawRectOutline (pgeRect *destrect, unsigned int color, float angle) |
void | pgeGfxDrawRectGrad (pgeRect *destrect, unsigned int color1, unsigned int color2, unsigned int color3, unsigned int color4, float angle) |
void | pgeGfxDrawTextureEasy (pgeTexture *texture, float x, float y, float angle, unsigned char alpha) |
void | pgeGfxDrawTexture (pgeRect *destrect, pgeRect *sourcerect, float angle, unsigned char alpha) |
void | pgeGfxDrawTextureColored (pgeRect *destrect, pgeRect *sourcerect, float angle, unsigned int color) |
void * | pgeGfxGetVertexMemory (int size) |
void | pgeGfxDrawCustom2D (enum pgeGfxPrim prim, enum pgeGfxVertexType vtype, int count, const void *vertices) |
void | pgeGfxDrawCustom3D (ScePspFVector3 *position, ScePspFVector3 *rotation, enum pgeGfxPrim prim, enum pgeGfxVertexType vtype, int count, const void *vertices) |
void | pgeGfxDrawTexture3D (ScePspFVector3 *position, ScePspFVector3 *rotation, float width, float height) |
void | pgeGfxDrawTexture3DColored (ScePspFVector3 *position, ScePspFVector3 *rotation, float width, float height, unsigned int color) |
void | pgeGfxDrawCube (ScePspFVector3 *position, ScePspFVector3 *rotation, float width, float height, float depth, unsigned int color) |
void | pgeGfxDrawCubeTexture (ScePspFVector3 *position, ScePspFVector3 *rotation, float width, float height, float depth) |
void | pgeGfxDrawObj (pgeObj *obj, ScePspFVector3 *position, ScePspFVector3 *rotation) |
int | pgeGfxGetMatrix (ScePspFMatrix4 *m, int mode) |
void | pgeGfxRotateY (float angle) |
void | pgeGfxRotateX (float angle) |
void | pgeGfxLookAt (ScePspFVector3 *eye, ScePspFVector3 *center, ScePspFVector3 *up) |
void | pgeGfxPerspective (float fovy, float aspect, float near, float far) |
void | pgeGfxMatrixMode (int mode) |
void | pgeGfxLoadIdentity (void) |
int | pgeGfxProject (ScePspFVector3 *object, ScePspFVector3 *screen) |
int | pgeGfxUnproject (ScePspFVector3 *screen, ScePspFVector3 *object) |
void | pgeGfxSetTransparent (unsigned int color) |
void | pgeGfxUnsetTransparent (void) |
unsigned int | pgeGfxColorSub (unsigned int color1, unsigned int color2) |
unsigned int | pgeGfxColorAdd (unsigned int color1, unsigned int color2) |
unsigned int | pgeGfxColorMul (unsigned int color1, unsigned int color2) |
unsigned int | pgeGfxColorMulScalar (unsigned int color, float scalar) |
unsigned int | pgeGfxColorDivScalar (unsigned int color, float scalar) |
int | pgeGfxColorCompare (unsigned int color1, unsigned int color2) |
unsigned int | pgeGfxColorClamp (unsigned int color) |
#define ARGB | ( | a, | |||
r, | |||||
g, | |||||
b | ) | ((a << 24) | (r << 16) | (g << 8) | b) |
#define PGE_GFX_MODEL GU_MODEL |
#define PGE_GFX_PROJECTION GU_PROJECTION |
#define PGE_GFX_VIEW GU_VIEW |
#define RGBA | ( | r, | |||
g, | |||||
b, | |||||
a | ) | ((a << 24) | (b << 16) | (g << 8) | r) |
enum pgeBlendMode |
enum pgeGfxPrim |
enum pgeGfxVertexType |
enum pgeWaitVsync |
void pgeGfxClearScreen | ( | unsigned int | color | ) |
Clear the screen.
color | - The color to clear the screen to. |
unsigned int pgeGfxColorAdd | ( | unsigned int | color1, | |
unsigned int | color2 | |||
) |
unsigned int pgeGfxColorClamp | ( | unsigned int | color | ) |
int pgeGfxColorCompare | ( | unsigned int | color1, | |
unsigned int | color2 | |||
) |
unsigned int pgeGfxColorDivScalar | ( | unsigned int | color, | |
float | scalar | |||
) |
unsigned int pgeGfxColorMul | ( | unsigned int | color1, | |
unsigned int | color2 | |||
) |
unsigned int pgeGfxColorMulScalar | ( | unsigned int | color, | |
float | scalar | |||
) |
unsigned int pgeGfxColorSub | ( | unsigned int | color1, | |
unsigned int | color2 | |||
) |
unsigned int pgeGfxCreateColor | ( | unsigned char | r, | |
unsigned char | g, | |||
unsigned char | b, | |||
unsigned char | a | |||
) |
Create a 32-bit color.
r | - The red value (0-255). | |
g | - The green value (0-255). | |
b | - The blue value (0-255). | |
a | - The alpha value (0-255). |
void pgeGfxDrawCircle | ( | float | x, | |
float | y, | |||
float | radius, | |||
unsigned int | numsteps, | |||
unsigned int | color | |||
) |
Draw a circle.
x | - The central position of the circle on the x axis. | |
y | - The central position of the circle on the y axis. | |
radius | - The radius of the circle. | |
numsteps | - Number of steps to take when generating the circle (higher is better quality). | |
color | - The color of the circle. |
void pgeGfxDrawCircleOutline | ( | float | x, | |
float | y, | |||
float | radius, | |||
unsigned int | numsteps, | |||
unsigned int | color | |||
) |
Draw an outline circle.
x | - The central position of the circle on the x axis. | |
y | - The central position of the circle on the y axis. | |
radius | - The radius of the circle. | |
numsteps | - Number of steps to take when generating the circle (higher is better quality). | |
color | - The color of the circle. |
void pgeGfxDrawCube | ( | ScePspFVector3 * | position, | |
ScePspFVector3 * | rotation, | |||
float | width, | |||
float | height, | |||
float | depth, | |||
unsigned int | color | |||
) |
Draw a cube.
position | - Vector holding the position. | |
rotation | - Vector holding the rotation. | |
width | - The width of the cube. | |
height | - The height of the cube. | |
depth | - The depth of the cube. | |
color | - The color of the cube. |
void pgeGfxDrawCubeTexture | ( | ScePspFVector3 * | position, | |
ScePspFVector3 * | rotation, | |||
float | width, | |||
float | height, | |||
float | depth | |||
) |
Draw a textured cube.
position | - Vector holding the position. | |
rotation | - Vector holding the rotation. | |
width | - The width of the cube. | |
height | - The height of the cube. | |
depth | - The depth of the cube. |
void pgeGfxDrawCustom2D | ( | enum pgeGfxPrim | prim, | |
enum pgeGfxVertexType | vtype, | |||
int | count, | |||
const void * | vertices | |||
) |
Draw custom (2D).
prim | - One of pgeGfxPrim. | |
vtype | - One of pgeGfxVertexType. | |
count | - Number of vertices. | |
vertices | - A pointer to the vertex data. |
void pgeGfxDrawCustom3D | ( | ScePspFVector3 * | position, | |
ScePspFVector3 * | rotation, | |||
enum pgeGfxPrim | prim, | |||
enum pgeGfxVertexType | vtype, | |||
int | count, | |||
const void * | vertices | |||
) |
Draw custom (3D).
position | - Vector holding the position. | |
rotation | - Vector holding the rotation. | |
prim | - One of pgeGfxPrim. | |
vtype | - One of pgeGfxVertexType. | |
count | - Number of vertices. | |
vertices | - A pointer to the vertex data. |
void pgeGfxDrawLine | ( | float | startx, | |
float | starty, | |||
float | endx, | |||
float | endy, | |||
unsigned int | color | |||
) |
Draw a line.
startx | - The start x position of the line. | |
starty | - The start y position of the line. | |
endx | - The end x position of the line. | |
endy | - The end y position of the line. | |
color | - The color of the line. |
void pgeGfxDrawObj | ( | pgeObj * | obj, | |
ScePspFVector3 * | position, | |||
ScePspFVector3 * | rotation | |||
) |
Draw an OBJ file.
obj | - Pointer to a pgeObj. | |
position | - Vector holding the position. | |
rotation | - Vector holding the rotation. |
void pgeGfxDrawRect | ( | pgeRect * | destrect, | |
unsigned int | color, | |||
float | angle | |||
) |
Draw a rectangle.
destrect | - A pgeRect that contains the x, y, width & height. | |
color | - The color of the rectangle. | |
angle | - The rotation of the rectangle. |
void pgeGfxDrawRectGrad | ( | pgeRect * | destrect, | |
unsigned int | color1, | |||
unsigned int | color2, | |||
unsigned int | color3, | |||
unsigned int | color4, | |||
float | angle | |||
) |
Draw a gradient rectangle.
destrect | - A pgeRect that contains the x, y, width & height. | |
color1 | - The color of the rectangle's XXX XXX point. | |
color2 | - The color of the rectangle's XXX XXX point. | |
color3 | - The color of the rectangle's XXX XXX point. | |
color4 | - The color of the rectangle's XXX XXX point. | |
angle | - The rotation of the rectangle. |
void pgeGfxDrawRectOutline | ( | pgeRect * | destrect, | |
unsigned int | color, | |||
float | angle | |||
) |
Draw an outline rectangle.
destrect | - A pgeRect that contains the x, y, width & height. | |
color | - The color of the rectangle. | |
angle | - The rotation of the rectangle. |
void pgeGfxDrawStar | ( | float | x, | |
float | y, | |||
float | outerradius, | |||
float | innerradius, | |||
unsigned int | numpoints, | |||
unsigned int | color, | |||
float | angle | |||
) |
Draw a star.
x | - The central position of the star on the x axis. | |
y | - The central position of the star on the y axis. | |
outerradius | - The outer radius of the star. | |
innerradius | - The inner radius of the star. | |
numpoints | - Number of points of the star. | |
color | - The color of the star. | |
angle | - The rotation of the star. |
void pgeGfxDrawStarOutline | ( | float | x, | |
float | y, | |||
float | outerradius, | |||
float | innerradius, | |||
unsigned int | numpoints, | |||
unsigned int | color, | |||
float | angle | |||
) |
Draw an outline star.
x | - The central position of the star on the x axis. | |
y | - The central position of the star on the y axis. | |
outerradius | - The outer radius of the star. | |
innerradius | - The inner radius of the star. | |
numpoints | - Number of points of the star. | |
color | - The color of the star. | |
angle | - The rotation of the star. |
void pgeGfxDrawTexture3D | ( | ScePspFVector3 * | position, | |
ScePspFVector3 * | rotation, | |||
float | width, | |||
float | height | |||
) |
Draw texture (3D).
position | - Vector holding the position. | |
rotation | - Vector holding the rotation. | |
width | - Width to be drawn. | |
height | - Height to be drawn. |
void pgeGfxDrawTexture3DColored | ( | ScePspFVector3 * | position, | |
ScePspFVector3 * | rotation, | |||
float | width, | |||
float | height, | |||
unsigned int | color | |||
) |
Draw texture (3D) in a given color.
position | - Vector holding the position. | |
rotation | - Vector holding the rotation. | |
width | - Width to be drawn. | |
height | - Height to be drawn. | |
color | - pgeColorRGB containing the color and alpha the texture has to be drawn in. |
void pgeGfxDrawTextureEasy | ( | pgeTexture * | texture, | |
float | x, | |||
float | y, | |||
float | angle, | |||
unsigned char | alpha | |||
) |
Draw a texture (easy).
texture | - A pgeTexture. | |
x | - The x position of the texture. | |
y | - The y position of the texture. | |
angle | - The rotation of the texture. | |
alpha | - The transparency of the texture (0-255). |
void pgeGfxEndDrawing | ( | void | ) |
End drawing.
unsigned int* pgeGfxGetFramebuffer | ( | void | ) |
Get current framebuffer
int pgeGfxGetMatrix | ( | ScePspFMatrix4 * | m, | |
int | mode | |||
) |
void* pgeGfxGetVertexMemory | ( | int | size | ) |
Get display list memory.
size | - Display list size required (in bytes). |
int pgeGfxInit | ( | enum pgePixelFormat | pixelformat | ) |
void pgeGfxLoadIdentity | ( | void | ) |
void pgeGfxLookAt | ( | ScePspFVector3 * | eye, | |
ScePspFVector3 * | center, | |||
ScePspFVector3 * | up | |||
) |
void pgeGfxMatrixMode | ( | int | mode | ) |
void pgeGfxPerspective | ( | float | fovy, | |
float | aspect, | |||
float | near, | |||
float | far | |||
) |
int pgeGfxProject | ( | ScePspFVector3 * | object, | |
ScePspFVector3 * | screen | |||
) |
void pgeGfxRenderToScreen | ( | void | ) |
Render to screen.
color | - The color to clear the screen to. |
void pgeGfxRenderToTexture | ( | pgeTexture * | texture | ) |
Render to a texture.
texture | - The texture to render to (must reside in VRAM). |
void pgeGfxRotateX | ( | float | angle | ) |
void pgeGfxRotateY | ( | float | angle | ) |
int pgeGfxSetBlendMode | ( | enum pgeBlendMode | mode | ) |
void pgeGfxSetMode3DCamera | ( | float | fov, | |
pgeCamera * | cam | |||
) |
Set 3D camera drawing mode.
fov | - The field of view to set. | |
cam | - Pointer to a pgeCamera. |
void pgeGfxSetTransparent | ( | unsigned int | color | ) |
void pgeGfxShutdown | ( | void | ) |
Shutdown graphics.
void pgeGfxStartDrawing | ( | void | ) |
Start drawing.
void pgeGfxSwapBuffers | ( | enum pgeWaitVsync | vsync | ) |
int pgeGfxUnproject | ( | ScePspFVector3 * | screen, | |
ScePspFVector3 * | object | |||
) |
void pgeGfxUnsetTransparent | ( | void | ) |