mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Copy the data size of old uniforms to the new uniform when reinitializing shader uniforms after love.window.setMode.
Fixes a crash in the Data variant of Shader:send when it's called after setMode on a shader that was created before the setMode call.
This commit is contained in:
@@ -148,6 +148,7 @@ void Shader::mapActiveUniforms()
|
||||
if (oldu != olduniforms.end())
|
||||
{
|
||||
u.data = oldu->second.data;
|
||||
u.dataSize = oldu->second.dataSize;
|
||||
u.textures = oldu->second.textures;
|
||||
|
||||
updateUniform(&u, u.count, true);
|
||||
|
||||
Reference in New Issue
Block a user