Exemplo n.º 1
0
        private void InitializeVertexArrayObject()
        {
            GL.BindVertexArray(this.vao);
            {
                GL.BindBuffer(BufferTarget.ArrayBuffer, this.vertexBuffer);

                BlockVertex.InitializeVertexBinding();

                GL.BindBuffer(BufferTarget.ElementArrayBuffer, this.indexBuffer);
            }
            GL.BindVertexArray(0);
            GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
            GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0);
        }
Exemplo n.º 2
0
        internal void Load()
        {
            this.vao          = GL.GenVertexArray();
            this.vertexBuffer = GL.GenBuffer();

            GL.BindVertexArray(this.vao);
            {
                GL.BindBuffer(BufferTarget.ArrayBuffer, this.vertexBuffer);
                BlockVertex.InitializeVertexBinding();
            }
            GL.BindVertexArray(0);
            GL.BindBuffer(BufferTarget.ArrayBuffer, 0);

            this.UpdateVertexBuffer();
        }