mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00
ogl: fix ubo workaround
This commit is contained in:
@ -33,9 +33,12 @@ void SetPSConstant4fvByName(const char * name, unsigned int offset, const float
|
||||
{
|
||||
if (tmp.shader.UniformLocations[a] == -1)
|
||||
return;
|
||||
else if (tmp.shader.UniformSize[a] <= offset)
|
||||
return;
|
||||
else
|
||||
{
|
||||
glUniform4fv(tmp.shader.UniformLocations[a] + offset, count, f);
|
||||
unsigned int maxcount= tmp.shader.UniformSize[a]-offset;
|
||||
glUniform4fv(tmp.shader.UniformLocations[a] + offset, std::min(count, maxcount), f);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user