Ejemplo n.º 1
0
        public SharpDX.Toolkit.Graphics.Buffer CreateVertexBuffer(GraphicsDevice graphicsDevice, MeshData meshData, VertexLayout layout)
        {
            if (layout.GetType() == typeof(PositionNormalTextureLayout))
            {
                return(pntVertBuff.CreateBufferFromMeshData(graphicsDevice, meshData));
            }

            if (layout.GetType() == typeof(PositionNormalTangentTextureLayout))
            {
                return(pnttVertBuff.CreateBufferFromMeshData(graphicsDevice, meshData));
            }

            throw new UnableToCreateVertexBufferException();
        }