Works on AMD now

This commit is contained in:
2017-02-24 23:08:21 -05:00
parent ece5b0d30f
commit 234d1669dd
9 changed files with 167 additions and 185 deletions

View File

@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK.Graphics.OpenGL4;
namespace hexworld.Util
@@ -53,7 +51,14 @@ namespace hexworld.Util
{
if (!uniforms.TryGetValue(name, out int id))
throw new ShaderException($"Shader Program {Id} does not contain uniform '{name}'");
else return id;
return id;
}
public int GetAttribute(string name)
{
if (!attributes.TryGetValue(name, out int id))
throw new ShaderException($"Shader Program {Id} does not contain attribute '{name}'");
return id;
}
public void Use() => GL.UseProgram(Id);