ShaderProgram - Add assertion when getting uniform location

This commit is contained in:
miku-666
2024-02-25 15:22:20 +01:00
parent 023cabbb4a
commit 2cd3332a70

View File

@@ -94,6 +94,7 @@ namespace PckStudio.Rendering.Shader
if (locationCache.ContainsKey(name))
return locationCache[name];
int location = GL.GetUniformLocation(_programId, name);
Debug.Assert(location != -1);
locationCache.Add(name, location);
return location;
}