6 static struct gpu_gvert triangle[] = {{0xff0000}, {0x00ff00}, {0x0000ff}};
8 static struct gte_svector svtri[] = {
9 {-0x1000, -0x800}, {0, 0x1000}, {0x1000, -0x800}
17 unsigned int frame = 0;
18 int16_t rotmat[9] = {0x1000, 0, 0, 0, 0x1000, 0, 0, 0, 0x1000};
19 int trans[3] = {160, 120, 0};
25 gpu_setmode(320, 264, 15, 50);
28 REG_GP0 = GPCMD(GP0_TEXPG) | TEXPG_DRAWDISP | TEXPG_DITHER;
30 gpu_cliprect(0, 0, 320, 264);
34 rotmat[0] = rotmat[4] = COS(frame);
35 rotmat[1] = SIN(frame);
36 rotmat[3] = -SIN(frame);
39 //gte_loadtrans(trans);
41 gte_loadsvec0(svtri + i);
45 triangle[i].x = (resv[0] >> 6) + 160;
46 triangle[i].y = (resv[1] >> 6) + 130;
49 gpu_fillrect(0, 0, 320, 264, 0x202020);
51 gpu_draw_gouraud(GP0_GTRI, triangle, 3);
53 for(i=0; i<100000; i++) {
54 asm volatile("nop; nop; nop; nop");