Export (0) Print
Expand All
Expand Minimize

SetDataOptions Enumeration

Describes whether existing buffer data will be overwritten or discarded during a SetData operation.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

[FlagsAttribute]
public enum SetDataOptions

 Member nameDescription
Discard

The SetData operation will discard all existing buffer data.

The operation will overwrite (with a write-only operation) every location within the locked surface. This is a valid option when using dynamic textures, dynamic vertex buffers, and dynamic index buffers. You may not use this option to update a portion of a surface.

For vertex and index buffers, the SetData operation will discard the entire buffer. A pointer to a new memory area is returned so that the direct memory access (DMA) and rendering from the previous area do not stall.

For textures, the SetData operation will overwrite (with a write-only operation) every location within the region being locked.

NonePortions of existing data in the buffer may be overwritten during this operation.
NoOverwriteThe SetData operation will not overwrite existing data in the vertex and index buffers. Specifying this option allows the driver to return immediately from a SetData operation and continue rendering.

Bb198822.note(en-US,XNAGameStudio.10).gifNote
Discard is not valid on Xbox 360, but dynamic geometry may be rendered on the Xbox 360 by using DrawUserPrimitives.

Xbox 360, Windows XP SP2, Windows Vista

Show:
© 2014 Microsoft