VertexDeclaration¶
-
class
VertexDeclaration
: GraphicsResource, System.IDisposable, System.IEquatable<VertexDeclaration> Defines per-vertex data of a vertex buffer.
-
readonly int
VertexStride
Gets the size of a vertex (including padding) in bytes.
Value: The size of a vertex (including padding) in bytes.
-
VertexDeclaration
GetOrCreate
(int vertexStride, Microsoft.Xna.Framework.Graphics.VertexElement[] elements) Parameters: - vertexStride (int) –
- elements (Microsoft.Xna.Framework.Graphics.VertexElement[]) –
-
Microsoft.Xna.Framework.Graphics.VertexElement[]
get_InternalVertexElements
()
-
VertexDeclaration
FromType
(System.Type vertexType) Returns the VertexDeclaration for Type.
Parameters: - vertexType (System.Type) – A value type which implements the IVertexType interface.
Returns: The VertexDeclaration.
-
public Microsoft.Xna.Framework.Graphics.VertexElement[]
GetVertexElements
() Gets a copy of the vertex elements.
Returns: A copy of the vertex elements.
-
public bool
Equals
(System.Object obj) Determines whether the specified T:System.Object is equal to this instance.
Parameters: - obj (System.Object) – The object to compare with the current object.
Returns: - :ref:`` if the specified T:System.Object is equal to this instance;
otherwise, :ref:``.
-
public bool
Equals
(VertexDeclaration other) Determines whether the specified T:Microsoft.Xna.Framework.Graphics.VertexDeclaration is equal to this instance.
Parameters: - other (Microsoft.Xna.Framework.Graphics.VertexDeclaration) – The object to compare with the current object.
Returns: - :ref:`` if the specified T:Microsoft.Xna.Framework.Graphics.VertexDeclaration is equal to this
instance; otherwise, :ref:``.
-
public int
GetHashCode
() Returns a hash code for this instance.
Returns: A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
-
public bool
op_Equality
(VertexDeclaration left, VertexDeclaration right) Compares two T:Microsoft.Xna.Framework.Graphics.VertexElement instances to determine whether they are the same.
Parameters: - left (Microsoft.Xna.Framework.Graphics.VertexDeclaration) – The first instance.
- right (Microsoft.Xna.Framework.Graphics.VertexDeclaration) – The second instance.
Returns: - :ref:`` if the and are
the same; otherwise, :ref:``.
-
public bool
op_Inequality
(VertexDeclaration left, VertexDeclaration right) Compares two T:Microsoft.Xna.Framework.Graphics.VertexElement instances to determine whether they are different.
Parameters: - left (Microsoft.Xna.Framework.Graphics.VertexDeclaration) – The first instance.
- right (Microsoft.Xna.Framework.Graphics.VertexDeclaration) – The second instance.
Returns: - :ref:`` if the and are
the different; otherwise, :ref:``.
-
readonly int