예제 #1
0
        public static VertexBuffer Create(VertexPositionColorTexture[] vertices, VertexLayout layout, BufferFlags flags = BufferFlags.None)
        {
            var vertex_buffer = new VertexBuffer
            {
                Handle = GraphicsContext.CreateVertexBuffer(vertices, layout, flags)
            };

            GraphicsContext.RegisterAllocatedResource(vertex_buffer);

            return(vertex_buffer);
        }