/// <summary>
        /// Calls glBindBuffer.
        /// </summary>
        /// <param name="gl"></param>
        public virtual void BindBuffer(OpenGL gl, OGLBindBufferTarget target, VertexAttribPointer pointer = null)
        {
            gl.BindBuffer((uint)target, BufferId.Value);
            VertexAttribPointer pointerToUse = null;

            if (pointer != null)
                pointerToUse = pointer;
            else if (VertexAttribPointer != null)
                pointerToUse = VertexAttribPointer;

            if (pointerToUse != null)
            {
                pointerToUse.Invoke(gl);
                gl.EnableVertexAttribArray(pointerToUse.Index);
            }
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="buffer"></param>
 /// <param name="pointer">Usually used to provide information about how the shader accepts this buffer as input parameter. </param>
 public OGLBufferObject(OGLBufferId buffer, VertexAttribPointer pointer = null)
 {
     BufferId = buffer;
     VertexAttribPointer = pointer;
 }