Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
MapMode.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 namespace SiliconStudio.Paradox.Graphics
4 {
5  /// <summary>
6  /// Describes how the cpu is accessing a <see cref="GraphicsResource"/> with the <see cref="GraphicsDeviceContext.Map"/> method.
7  /// </summary>
8  public enum MapMode
9  {
10  /// <summary>
11  /// Resource is mapped for reading.
12  /// </summary>
13  /// <remarks>
14  /// The resource must have been created with usage <see cref="GraphicsResourceUsage.Staging"/>.
15  /// </remarks>
16  Read = 1,
17 
18  /// <summary>
19  /// Resource is mapped for writing.
20  /// </summary>
21  /// <remarks>
22  /// The resource must have been created with usage <see cref="GraphicsResourceUsage.Dynamic"/> or <see cref="GraphicsResourceUsage.Staging"/>.
23  /// </remarks>
24  Write = 2,
25 
26  /// <summary>
27  /// Resource is mapped for read-write.
28  /// </summary>
29  /// <remarks>
30  /// The resource must have been created with usage <see cref="GraphicsResourceUsage.Staging"/>.
31  /// </remarks>
32  ReadWrite = 3,
33 
34  /// <summary>
35  /// Resource is mapped for writing; the previous contents of the resource will be undefined.
36  /// </summary>
37  /// <remarks>
38  /// The resource must have been created with usage <see cref="GraphicsResourceUsage.Dynamic"/>.
39  /// </remarks>
40  WriteDiscard = 4,
41 
42  /// <summary>
43  /// Resource is mapped for writing; the existing contents of the resource cannot be overwritten.
44  /// </summary>
45  /// <remarks>
46  /// This flag is only valid on vertex and index buffers.
47  /// </remarks>
48  WriteNoOverwrite = 5,
49  }
50 }
Resource is mapped for writing; the previous contents of the resource will be undefined.
Resource is mapped for writing; the existing contents of the resource cannot be overwritten.
MapMode
Describes how the cpu is accessing a GraphicsResource with the GraphicsDeviceContext.Map method.
Definition: MapMode.cs:8