SetDataOptions Enumeration
Collapse the table of content
Expand the table of content

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)

public enum SetDataOptions

 Member nameDescription

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.

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

© 2016 Microsoft