Code: Select all
void DrawScene( void )
{
sceGuStart( GU_DIRECT, dList );
sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT);
sceGumMatrixMode(GU_MODEL);
//----- shape 1
sceGumLoadIdentity();
{
ScePspFVector3 move = { 0.0f,-0.05f, -3.1f };
sceGumTranslate( &move );
sceGumRotateZ( 0.00f );
}
sceGuTexImage(...);
sceGumDrawArray(...);
//----- shape 2
sceGumLoadIdentity();
{
ScePspFVector3 move = { 0.0f,-0.05f, -3.1f };
sceGumTranslate( &move );
sceGumRotateZ( 0.00f );
}
sceGuTexImage(...);
sceGumDrawArray(...);
//----- shape 3
sceGumLoadIdentity();
{
ScePspFVector3 move = { 0.0f,-0.05f, -3.1f };
sceGumTranslate( &move );
sceGumRotateZ( 0.00f );
}
sceGuTexImage(...);
sceGumDrawArray(...);
sceGuFinish();
sceGuSync(0,0);
}
Code: Select all
void DrawScene( void )
{
sceGuStart( GU_DIRECT, dList );
sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT);
sceGumMatrixMode(GU_MODEL);
ruspa_draw(shape1,texture1,0);
ruspa_draw(shape2,texture2,0);
ruspa_draw(shape3,texture3,0);
sceGuFinish();
sceGuSync(0,0);
}
void ruspa_draw(Vertex shape,Image* texture,float rotation){
sceGumLoadIdentity();
sceGuTexFilter( GU_LINEAR, GU_LINEAR );
sceGuTexFilter( GU_LINEAR, GU_LINEAR );
{
ScePspFVector3 move = { -0.03f,0.0f, -3.0f };
sceGumTranslate( &move );
sceGumRotateZ( rotation);
}
sceGuTexImage( 0, texture->textureWidth, texture->textureHeight, texture->textureWidth,texture->data );
sceGumDrawArray( GU_TRIANGLES, GU_TEXTURE_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,3*2, 0, shape);
}