Example #1
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 #2
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;
     }
 }