Hello, I use the sceGuDrawArray()-Function with GU_TRIANGLE_FAN from PSPSDK to draw filled rectangles on the screen. However, I found out that when I use the GU_LINE_STRIP primitive, the edges of my rectangle differ, for a better understanding here is some sample code:
Code: Select all
Vertex* square = (Vertex*)sceGuGetMemory(5 * sizeof(Vertex));
if(square==NULL) return -1;
square[0].x=10;
square[0].y=10;
square[1].x=59;
square[1].y=10;
square[2].x=59;
square[2].y=59;
square[3].x=10;
square[3].y=59;
square[4].x=10;
square[4].y=10;
int i;
for(i=0;i<5;i++) square[i].color=0xFF00FF00;
sceGuDrawArray(GU_LINE_STRIP,GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_2D,5,NULL,square);
for(i=0;i<5;i++) square[i].color=0xFFFFFFFF;
sceGuDrawArray(GU_TRIANGLE_FAN,GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_2D,5,NULL,square);
Thanks for your help
Dave-O