VertexDeclaration Class (Microsoft.Xna.Framework.Graphics)

Defines per-vertex data of a vertex buffer.
System.Object
   Microsoft.Xna.Framework.Graphics.GraphicsResource
      Microsoft.Xna.Framework.Graphics.VertexDeclaration

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.819)
  • C#
  • VB
  • F#
public class VertexDeclaration : GraphicsResource, IEquatable<VertexDeclaration>

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The VertexDeclaration type exposes the following members.

  Platforms Name Description
VertexDeclaration(VertexElement[]) Initializes a new instance of the VertexDeclaration class. 
VertexDeclaration(int, VertexElement[]) Initializes a new instance of the VertexDeclaration class. 
Top
  Platforms Name Description
GraphicsDevice  (Inherited from GraphicsResource.)
IsDisposed  (Inherited from GraphicsResource.)
Name  (Inherited from GraphicsResource.)
Tag  (Inherited from GraphicsResource.)
VertexStride Gets the size of a vertex (including padding) in bytes. 
Top
  Platforms Name Description
Dispose()  (Inherited from GraphicsResource.)
Dispose(bool) The method that derived classes should override to implement disposing of managed and native resources. (Inherited from GraphicsResource.)
Equals(object) Determines whether the specified System.Object is equal to this instance. (Overrides object.Equals().)
Equals(VertexDeclaration) Determines whether the specified VertexDeclaration is equal to this instance. (Implements IEquatable<T>.Equals().)
Finalize  (Inherited from GraphicsResource.)
GetHashCode Returns a hash code for this instance. (Overrides object.GetHashCode().)
GetVertexElements Gets a copy of the vertex elements. 
GraphicsDeviceResetting Called before the device is reset. Allows graphics resources to invalidate their state so they can be recreated after the device reset. Warning: This may be called after a call to Dispose() up until the resource is garbage collected. (Inherited from GraphicsResource.)
ToString  (Inherited from GraphicsResource.)
Top
  Platforms Name Description
Disposing  (Inherited from GraphicsResource.)
Top
  Platforms Name Description
Equality Compares two VertexElement instances to determine whether they are the same. 
Inequality Compares two VertexElement instances to determine whether they are different. 
Top
VertexDeclaration implements System.IEquatable<T1> and can be used as a key in a dictionary. Two vertex declarations are considered equal if the vertices are structurally equivalent, i.e. the vertex elements and the vertex stride are identical. (The properties Name and Tag are ignored in GetHashCode() and Equals(VertexDeclaration)!)
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web