remove usage of glMultiTexCoord2f

Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
This commit is contained in:
degasus 2012-12-07 14:40:52 +01:00 committed by Ryan Houdek
parent fb92c338af
commit 888b5fb061
4 changed files with 21 additions and 11 deletions

View File

@ -317,16 +317,19 @@ void XFBSource::Draw(const MathUtil::Rectangle<float> &sourcerc,
sourcerc.right, sourcerc.top,
sourcerc.right, sourcerc.bottom
};
GLfloat tex2[] = { // For TEXTURE1
0.0f, 0.0f,
0.0f, 1.0f,
1.0f, 1.0f,
1.0f, 0.0f
};
glClientActiveTexture(GL_TEXTURE0);
glMultiTexCoord2f(GL_TEXTURE1, 0, 0);
glMultiTexCoord2f(GL_TEXTURE1, 0, 1);
glMultiTexCoord2f(GL_TEXTURE1, 1, 1);
glMultiTexCoord2f(GL_TEXTURE1, 1, 0);
glVertexPointer(2, GL_FLOAT, 0, vtx1);
glClientActiveTexture(GL_TEXTURE0);
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
glClientActiveTexture(GL_TEXTURE1);
glTexCoordPointer(2, GL_FLOAT, 0, tex2);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);

View File

@ -1153,18 +1153,22 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
right, top,
right, bottom
};
GLfloat tex2[] = { // For TEXTURE1
0.0f, 0.0f,
0.0f, 1.0f,
1.0f, 1.0f,
1.0f, 0.0f
};
glClientActiveTexture(GL_TEXTURE0);
if (applyShader)
{
glMultiTexCoord2f(GL_TEXTURE1, 0, 0);
glMultiTexCoord2f(GL_TEXTURE1, 0, 1);
glMultiTexCoord2f(GL_TEXTURE1, 1, 1);
glMultiTexCoord2f(GL_TEXTURE1, 1, 0);
glClientActiveTexture(GL_TEXTURE1);
glTexCoordPointer(2, GL_FLOAT, 0, tex2);
}
glVertexPointer(3, GL_FLOAT, 0, vtx1);
glClientActiveTexture(GL_TEXTURE0);
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);

View File

@ -319,6 +319,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
1.f, 1.f
};
glClientActiveTexture(GL_TEXTURE0);
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
glVertexPointer(2, GL_FLOAT, 0, vtx1);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);

View File

@ -228,6 +228,7 @@ void EncodeToRamUsingShader(FRAGMENTSHADER& shader, GLuint srcTexture, const Tar
1.f, -1.f
};
glClientActiveTexture(GL_TEXTURE0);
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
glVertexPointer(2, GL_FLOAT, 0, vtx1);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
@ -401,6 +402,7 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur
-1.f, -1.f
};
glClientActiveTexture(GL_TEXTURE0);
glTexCoordPointer(2, GL_FLOAT, 0, tex1);
glVertexPointer(2, GL_FLOAT, 0, vtx1);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);