Sdílet prostřednictvím


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)

Syntax

[FlagsAttribute]
public enum SetDataOptions

Members

  Member name Description
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.

None Portions of existing data in the buffer may be overwritten during this operation.
NoOverwrite The 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.

Remarks

Note

Discard is not valid on Xbox 360, but dynamic geometry may be rendered on the Xbox 360 by using DrawUserPrimitives.

See Also

Reference

GraphicsDevice.DrawUserPrimitives Generic Method
IndexBuffer.SetData Method
Texture2D.SetData Method
Texture3D.SetData Method
TextureCube.SetData Method
VertexBuffer.SetData Method
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista