コード例 #1
0
 /// <summary>
 /// Initializes a new instance of VertexBufferContent of the specified size.
 /// </summary>
 /// <param name="size">The size of the vertex buffer content, in bytes.</param>
 public VertexBufferContent(int size)
     : base()
 {
     stream            = new MemoryStream(size);
     writer            = new BinaryWriter(stream);
     VertexDeclaration = new VertexDeclarationContent();
 }
コード例 #2
0
        private static VertexBufferContent CreateMorphTargetVertexBuffer()
        {
            var vertexDeclaration = new VertexDeclarationContent { VertexStride = 24 };
              vertexDeclaration.VertexElements.Add(new Microsoft.Xna.Framework.Graphics.VertexElement(0, VertexElementFormat.Vector3, VertexElementUsage.Position, 0));
              vertexDeclaration.VertexElements.Add(new Microsoft.Xna.Framework.Graphics.VertexElement(12, VertexElementFormat.Vector3, VertexElementUsage.Normal, 0));

              return new VertexBufferContent { VertexDeclaration = vertexDeclaration };
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of VertexBufferContent of the specified size.
 /// </summary>
 /// <param name="size">The size of the vertex buffer content, in bytes.</param>
 public VertexBufferContent(int size)
     : base()
 {
     stream            = new MemoryStream(size);
     VertexDeclaration = new VertexDeclarationContent();
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of VertexBufferContent.
 /// </summary>
 public VertexBufferContent()
 {
     stream            = new MemoryStream();
     VertexDeclaration = new VertexDeclarationContent();
 }