#include Ps2Simple Ps2; void DrawTriangles( int x, int y, int size ) { // Create of GS RegList packet... // By default, 0,0 is the middle of the screen. GIFVecRL vec; vec.prim( PS2_GS_PRIM_PRIM_TRIANGLE, PS2_GS_PRIM_IIP_GOURAUD, PS2_GS_PRIM_TME_OFF, PS2_GS_PRIM_FGE_OFF, PS2_GS_PRIM_ABE_OFF, PS2_GS_PRIM_AA1_OFF, PS2_GS_PRIM_FST_STQ, PS2_GS_PRIM_CTXT_CONTEXT1, PS2_GS_PRIM_FIX_NOFIXDDA ); vec.rgbaq( 255, 0, 0, 0, 0 ); vec.xyzf2( x, y-size, 1 ); vec.rgbaq( 0, 255, 0, 0, 0 ); vec.xyzf2( x+size*2, y+size, 1 ); vec.rgbaq( 0, 0, 255, 0, 0 ); vec.xyzf2( x-size*2, y+size, 1 ); vec.prim( PS2_GS_PRIM_PRIM_TRIANGLE, PS2_GS_PRIM_IIP_GOURAUD, PS2_GS_PRIM_TME_OFF, PS2_GS_PRIM_FGE_OFF, PS2_GS_PRIM_ABE_OFF, PS2_GS_PRIM_AA1_OFF, PS2_GS_PRIM_FST_STQ, PS2_GS_PRIM_CTXT_CONTEXT1, PS2_GS_PRIM_FIX_NOFIXDDA ); vec.rgbaq( 255, 0, 0, 0, 0 ); vec.xyzf2( x+10, y-size, 1 ); vec.rgbaq( 0, 255, 0, 0, 0 ); vec.xyzf2( x+size*2+10, y+size, 1 ); vec.rgbaq( 0, 0, 255, 0, 0 ); vec.xyzf2( x+size*4+10, y-size, 1 ); vec.draw(); } int main( int ac, char **av ) { Ps2.init( ac, av ); Ps2.useStandardTestControls(); Ps2.start(); for (;;) { DrawTriangles( 0, 0, 40 ); Ps2.flip(); } }