Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
MeshDrawData.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System.Collections.Generic;
4 using SiliconStudio.Core;
5 using SiliconStudio.Core.Serialization;
6 using SiliconStudio.Core.Serialization.Converters;
7 using SiliconStudio.Paradox.Graphics;
8 using SiliconStudio.Core.Serialization.Contents;
9 using SiliconStudio.Paradox.Graphics.Data;
10 
11 namespace SiliconStudio.Paradox.Effects.Data
12 {
13  /*
14  /// <summary>
15  /// Draw data.
16  /// It includes vertex buffers, index buffer and draw call information (primitive type, etc...).
17  /// </summary>
18  [ContentSerializer(typeof(DataContentSerializer<MeshDrawData>))]
19  [DataContract]
20  public class MeshDrawData
21  {
22  /// <summary>
23  /// Initializes a new instance of the <see cref="MeshDrawData"/> class.
24  /// </summary>
25  public MeshDrawData()
26  {
27  VertexBuffers = new List<VertexBufferBindingData>();
28  }
29 
30  /// <summary>
31  /// Gets or sets the vertex buffers.
32  /// </summary>
33  /// <value>
34  /// The vertex buffers.
35  /// </value>
36  public List<VertexBufferBindingData> VertexBuffers;
37 
38  /// <summary>
39  /// Gets or sets the index buffer.
40  /// </summary>
41  /// <value>
42  /// The index buffer.
43  /// </value>
44  public IndexBufferBindingData IndexBuffer;
45 
46  /// <summary>
47  /// Gets or sets the primitive type.
48  /// </summary>
49  /// <value>
50  /// The primitive type.
51  /// </value>
52  public PrimitiveType PrimitiveType;
53 
54  /// <summary>
55  /// Gets or sets the number of items to draw (either vertex or indices count, depending if an index buffer is present).
56  /// </summary>
57  /// <value>
58  /// The draw count.
59  /// </value>
60  public int DrawCount;
61 
62  public int StartLocation;
63 
64  public MeshDrawData Clone()
65  {
66  return (MeshDrawData)MemberwiseClone();
67  }
68 
69  protected void ForceGenericInstantiation()
70  {
71  // AOT helper:
72 
73  // Force generic instantiation of ListDataConverter because VertexBufferBinding is a struct (used with VertexBuffers)
74  typeof(ListDataConverter<List<VertexBufferBindingData>, VertexBufferBinding[], VertexBufferBindingData, VertexBufferBinding>).ToString();
75  }
76  }
77  * */
78 }