also use shaderCaches in rasterFont

This commit is contained in:
degasus
2012-12-28 00:52:44 +01:00
parent 316a33d1e6
commit 193056493a
4 changed files with 29 additions and 14 deletions

View File

@ -202,7 +202,8 @@ void VertexManager::vFlush()
}
VERTEXSHADER* vs = VertexShaderCache::SetShader(g_nativeVertexFmt->m_components);
ProgramShaderCache::SetBothShaders(ps->glprogid, vs->glprogid);
if(ps && vs)
ProgramShaderCache::SetBothShaders(ps->glprogid, vs->glprogid);
// set global constants
VertexShaderManager::SetConstants();
@ -219,7 +220,8 @@ void VertexManager::vFlush()
if (useDstAlpha && !dualSourcePossible)
{
ps = PixelShaderCache::SetShader(DSTALPHA_ALPHA_PASS,g_nativeVertexFmt->m_components);
ProgramShaderCache::SetBothShaders(ps->glprogid, 0);
if(ps)
ProgramShaderCache::SetBothShaders(ps->glprogid, 0);
if (!g_ActiveConfig.backend_info.bSupportsGLSLUBO)
PixelShaderManager::SetConstants(); // Need to set these again, if we don't support UBO
if (g_nativeVertexFmt)