Well, I managed to draw a triangle to the screen however it only stays on the screen for half a second and then is cleared. I am swapping buffers so maybe I need to draw my triangle to some other place in emmory as well however the sample graphics demos didn't seem to be doing that. Here is my main loop.
I guess if I said sceGuInit(), I wouldn't have had to post this. Sorry about this one. It was a careless overlook.
However I do have one other question.
How could I do a goraud shaded triangle based on the code I have provided? It seems that if I use sceGuColor 3 times before drawing the points, the last color I chose is tectured for the whole triangle. How can I send seperate colors for seperate verticies?
BlackDragon777 wrote:How could I do a goraud shaded triangle based on the code I have provided? It seems that if I use sceGuColor 3 times before drawing the points, the last color I chose is tectured for the whole triangle. How can I send seperate colors for seperate verticies?
struct Vertex
{
unsigned int color;
float x, y, z;
};
and then sceGuDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 3, 0, vertices) and sceGuShadeModel(GU_SMOOTH). See http://forums.ps2dev.org/viewtopic.php?p=24801#24801 for a full example and just add the ShadeModel call.