예제 #1
0
 private void EnsureInitialized()
 {
     if (Initialized)
     {
         return;
     }
     if (_Handle == -1)
     {
         Create();
     }
     Bind();
     if (_vbo == null)
     {
         _vbo = CreateVBO();
     }
     // if (_ebo == null)
     //     _ebo = CreateEBO();
     Layout.InitAttributes();
     Initialized = true;
 }
예제 #2
0
 public VertexArrayObject(VertexLayoutBinded layout, VertexBufferObject vbo = null, ElementsBufferObject ebo = null)
 {
     Layout = layout;
     _vbo   = vbo;
     _ebo   = ebo;
 }
예제 #3
0
 public void SetVbo(VertexBufferObject vbo)
 {
     _vbo = vbo;
 }