4 using SiliconStudio.Core.Serialization.Converters;
6 namespace SiliconStudio.
Paradox.Graphics
11 [
DataConverter(AutoGenerate =
true, CustomConvertFromData =
true)]
14 private readonly
int hashCode;
26 if (vertexBuffer == null)
throw new ArgumentNullException(
"vertexBuffer");
27 if (vertexDeclaration == null)
throw new ArgumentNullException(
"vertexDeclaration");
30 Stride = vertexStride != 0 ? vertexStride : vertexDeclaration.VertexStride;
31 Offset = vertexOffset;
33 Declaration = vertexDeclaration;
37 hashCode = Buffer.GetHashCode();
38 hashCode = (hashCode*397) ^ Offset;
39 hashCode = (hashCode*397) ^ Stride;
40 hashCode = (hashCode*397) ^ Count;
41 hashCode = (hashCode*397) ^ Declaration.GetHashCode();
55 public int Offset {
get;
private set; }
61 public int Stride {
get;
private set; }
68 public int Count {
get;
private set; }
82 public override bool Equals(
object obj)
84 if (ReferenceEquals(null, obj))
return false;
The layout of a vertex buffer with a set of VertexElement.
bool Equals(VertexBufferBinding other)
Base class for converters to/from a data type.
override bool Equals(object obj)
override int GetHashCode()
All-in-One Buffer class linked SharpDX.Direct3D11.Buffer.
SiliconStudio.Paradox.Graphics.Buffer Buffer
int Stride
Gets the vertex stride.
VertexBufferBinding(Buffer vertexBuffer, VertexDeclaration vertexDeclaration, int vertexCount, int vertexStride=0, int vertexOffset=0)
Creates an instance of this object.
int Count
Gets the number of vertex.
VertexDeclaration Declaration
Gets the layout of the vertex buffer.
int Offset
Gets the offset (vertex index) between the beginning of the buffer and the vertex data to use...
Binding structure that specifies a vertex buffer and other per-vertex parameters (such as offset and ...