예제 #1
0
        /// <summary>
        /// Adds a VBO object to the VAO needs to have one to draw, if a second is added it will replace the first and the first will be disposed of
        /// </summary>
        /// <param name="VBO">The VBO object to be added</param>
        public void SetVBO(VertexBufferObject VBO)
        {
            if (vbo != null)
            {
                UnBind();
                vbo.Dispose();
                Bind();
            }

            vbo = VBO;
            vbo.Bind();
            vbo.BufferData();
        }