Fix EFB Scaled Copy in OpenGL plugin.

It no longer uses the TEXTURE_RECTANGLE extension for GameCube textures. Since GameCube always uses normalized texture coordinates, it's an unnecessary burden.

Please test hi-res textures.

Wow, it's been a while.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6144 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check
2010-08-29 04:56:53 +00:00
parent 4e81cb4012
commit e1d1a1eba0
3 changed files with 44 additions and 92 deletions

View File

@ -274,30 +274,15 @@ void Flush()
if (tentry)
{
// texture loaded fine, set dims for pixel shader
if (tentry->isRectangle)
{
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, tentry->mode.wrap_s, tentry->mode.wrap_t);
nonpow2tex |= 1 << i;
if (tentry->mode.wrap_s > 0) nonpow2tex |= 1 << (8 + i);
if (tentry->mode.wrap_t > 0) nonpow2tex |= 1 << (16 + i);
}
// if texture is power of two, set to ones (since don't need scaling)
// (the above seems to have changed - we set the width and height here too.
else
{
// 0s are probably for no manual wrapping needed.
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0);
}
// texture is hires - pass the scaling size
if (tentry->scaleX != 1.0f || tentry->scaleY != 1.0f)
PixelShaderManager::SetCustomTexScale(i, tentry->scaleX, tentry->scaleY);
// 0s are probably for no manual wrapping needed.
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0);
if (g_ActiveConfig.iLog & CONF_SAVETEXTURES)
{
// save the textures
char strfile[255];
sprintf(strfile, "%stex%.3d_%d.tga", File::GetUserPath(D_DUMPFRAMES_IDX), g_Config.iSaveTargetId, i);
SaveTexture(strfile, tentry->isRectangle?GL_TEXTURE_RECTANGLE_ARB:GL_TEXTURE_2D, tentry->texture, tentry->w, tentry->h);
SaveTexture(strfile, GL_TEXTURE_2D, tentry->texture, tentry->w, tentry->h);
}
}
else