The code below is what I currently have and it looks really ugly because of my constant fiddling with it :D
Code: Select all
void sceGuDrawArray(int prim, int vtype, int count, const void* indices, const void* vertices)
{
	unsigned int *n=malloc((count)*3*sizeof(int));
	int i=0, a=0;
	for(a=0;a<count;a+=3,i++){
		n[a]=((Vertex*)vertices)[i].x;
		n[a+1]=((Vertex*)vertices)[i].y;
		n[a+2]=((Vertex*)vertices)[i].z;
	}
	if(indices!=0)
		glDrawRangeElements(  GL_MAX_ELEMENTS_INDICES, 0,count, count, vtype+1,indices );
	if(vertices!=0){
		glDrawElements(GL_LINE_STRIP,count, GL_UNSIGNED_INT,n );
	}
	while(((unsigned char*)vertices)[i]!=0){
		printf("X=%d\tY=%d\tZ=%d\n",((Vertex*)vertices)[i].x,((Vertex*)vertices)[i].y,((Vertex*)vertices)[i].z);
		i++;
	}
}