Exemple #1
0
void ClearDrawingContext(int context_id)
{


	if(context_id==0)
		GsClearDrawEnv1(&draw_env[0]);		
	else
		GsClearDrawEnv2(&draw_env[1]);
	
}
Exemple #2
0
int main()
{
	

	
	InitGraphics();



	giftable.packet_count	= GIF_PACKET_MAX;
	giftable.packet			= &packets[0];



	

	InitSprites();

	

	

	while(1)
	{
		GsGifPacketsClear(&giftable);		// clear the area that we are going to put the sprites/triangles/....

		

		MoveSprites();
		DrawSprites(&giftable);				//add stuff to the packet area
	
		


		GsDrawSync(0);
		GsVSync(0);
		GsClearDrawEnv1(&draw_env);			// clear the draw environment before we draw stuff on it
		GsGifPacketsExecute(&giftable, 1);	// set to '1' becuse we want to wait for drawing to finish. if we dont wait we will write on packets that is currently writing to the gif
		
	}


	return 0;
}