Bit of cleanup and fixing of one issue that was noticeable in SMS with Mario's shadow.

This commit is contained in:
Ryan Houdek
2012-10-27 22:50:06 -05:00
parent dfb3c44d1a
commit fb92c338af
5 changed files with 46 additions and 46 deletions

View File

@ -222,13 +222,14 @@ void EncodeToRamUsingShader(FRAGMENTSHADER& shader, GLuint srcTexture, const Tar
(float)sourceRc.right, (float)sourceRc.top
};
GLfloat vtx1[] = {
-1, -1, 1,
-1, 1, 1,
1, 1, 1,
1, -1, 1
-1.f, -1.f,
-1.f, 1.f,
1.f, 1.f,
1.f, -1.f
};
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
glVertexPointer(3, GL_FLOAT, 0, vtx1);
glVertexPointer(2, GL_FLOAT, 0, vtx1);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
GL_REPORT_ERRORD();
@ -389,20 +390,22 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur
GLfloat tex1[] = {
(float)srcFmtWidth, (float)srcHeight,
(float)srcFmtWidth, 0,
0, 0,
0, (float)srcHeight
(float)srcFmtWidth, 0.f,
0.f, 0.f,
0.f, (float)srcHeight
};
GLfloat vtx1[] = {
1, -1, 1,
1, 1, 1,
-1, 1, 1,
-1, -1, 1
1.f, -1.f,
1.f, 1.f,
-1.f, 1.f,
-1.f, -1.f
};
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
glVertexPointer(3, GL_FLOAT, 0, vtx1);
glVertexPointer(2, GL_FLOAT, 0, vtx1);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
GL_REPORT_ERRORD();
// reset state