mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-23 19:44:32 +00:00
Shader.cs - Added IDisposable interface
This commit is contained in:
@@ -10,7 +10,7 @@ using OpenTK.Graphics.OpenGL;
|
||||
|
||||
namespace PckStudio.Rendering
|
||||
{
|
||||
internal class Shader
|
||||
internal class Shader : IDisposable
|
||||
{
|
||||
private int _programId;
|
||||
private Dictionary<string, int> locationCache = new Dictionary<string, int>();
|
||||
@@ -31,6 +31,12 @@ namespace PckStudio.Rendering
|
||||
GL.UseProgram(0);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Unbind();
|
||||
GL.DeleteProgram(_programId);
|
||||
}
|
||||
|
||||
public void SetUniform1(string name, int value)
|
||||
{
|
||||
int location = GetUniformLocation(name);
|
||||
|
||||
Reference in New Issue
Block a user