Example #1
0
 public void DisableAttrib(uint index)
 {
     GL_ARB.glDisableVertexArrayAttrib(Handle, index);
     if (!GL.glGetError(out uint err))
     {
         Console.WriteLine($"ERROR Disabling Vertex Attribute {err}");
     }
 }
Example #2
0
 public void Unbind()
 {
     if (IsBound)
     {
         GL_ARB.glBindVertexArray(0);
         if (!GL.glGetError(out uint err))
         {
             Console.WriteLine($"ERROR Unbinding vertex array {err}");
         }
         boundVAO = null;
         IsBound  = false;
     }
 }
Example #3
0
 public void Bind()
 {
     if (!IsBound)
     {
         GL_ARB.glBindVertexArray(Handle);
         if (!GL.glGetError(out uint err))
         {
             Console.WriteLine($"ERROR Binding vertex array {err}");
         }
         if (boundVAO != null)
         {
             boundVAO.IsBound = false;
         }
         boundVAO = this;
         IsBound  = true;
     }
 }
Example #4
0
 public VertexArrayObject()
 {
     Handle = GL_ARB.glGenVertexArrays(1)[0];
 }