(GX) Add 90/180/270 degree rotation tex coord matrices -

wii_set_rotation just needs to be implemented now
This commit is contained in:
Twinaphex 2012-08-08 00:36:47 +02:00
parent ba2323c443
commit a5f8651dcd

View File

@ -22,8 +22,6 @@
#include <stdlib.h>
#include <string.h>
// All very hardcoded for now.
void *g_framebuf[2];
unsigned g_current_framebuf;
@ -48,6 +46,41 @@ uint8_t gx_fifo[256 * 1024] ATTRIBUTE_ALIGN(32);
uint8_t display_list[1024] ATTRIBUTE_ALIGN(32);
size_t display_list_size;
float verts[16] ATTRIBUTE_ALIGN(32) = {
-1, 1, -0.5,
-1, -1, -0.5,
1, -1, -0.5,
1, 1, -0.5,
};
float tex_coords[8] ATTRIBUTE_ALIGN(32) = {
0, 0,
0, 1,
1, 1,
1, 0,
};
float vertexes_90[8] ATTRIBUTE_ALIGN(32) = {
0, 1,
1, 1,
1, 0,
0, 0
};
float vertexes_180[8] ATTRIBUTE_ALIGN(32) = {
1, 1,
1, 0,
0, 0,
0, 1
};
float vertexes_270[8] ATTRIBUTE_ALIGN(32) = {
1, 0,
0, 0,
0, 1,
1, 1
};
static void retrace_callback(u32 retrace_count)
{
(void)retrace_count;
@ -76,20 +109,6 @@ static void setup_video_mode(GXRModeObj *mode)
VIDEO_WaitVSync();
}
float verts[16] ATTRIBUTE_ALIGN(32) = {
-1, 1, -0.5,
-1, -1, -0.5,
1, -1, -0.5,
1, 1, -0.5,
};
float tex_coords[8] ATTRIBUTE_ALIGN(32) = {
0, 0,
0, 1,
1, 1,
1, 0,
};
static void init_vtx(GXRModeObj *mode)
{
GX_SetViewport(0, 0, mode->fbWidth, mode->efbHeight, 0, 1);