Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
BufferDescription.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 a buffer.
7  /// </summary>
8  public struct BufferDescription
9  {
10  /// <summary>
11  /// Initializes a new instance of <see cref="BufferDescription"/> struct.
12  /// </summary>
13  /// <param name="sizeInBytes">Size of the buffer in bytes.</param>
14  /// <param name="bufferFlags">Buffer flags describing the type of buffer.</param>
15  /// <param name="usage">Usage of this buffer.</param>
16  /// <param name="structureByteStride">The size of the structure (in bytes) when it represents a structured/typed buffer. Default = 0.</param>
17  public BufferDescription(int sizeInBytes, BufferFlags bufferFlags, GraphicsResourceUsage usage, int structureByteStride = 0)
18  {
19  SizeInBytes = sizeInBytes;
20  BufferFlags = bufferFlags;
21  Usage = usage;
22  StructureByteStride = structureByteStride;
23  }
24 
25  /// <summary>
26  /// Size of the buffer in bytes.
27  /// </summary>
28  public int SizeInBytes;
29 
30  /// <summary>
31  /// Buffer flags describing the type of buffer.
32  /// </summary>
34 
35  /// <summary>
36  /// Usage of this buffer.
37  /// </summary>
39 
40  /// <summary>
41  /// The size of the structure (in bytes) when it represents a structured/typed buffer.
42  /// </summary>
43  public int StructureByteStride;
44  }
45 }
BufferDescription(int sizeInBytes, BufferFlags bufferFlags, GraphicsResourceUsage usage, int structureByteStride=0)
Initializes a new instance of BufferDescription struct.
GraphicsResourceUsage
Identifies expected resource use during rendering. The usage directly reflects whether a resource is ...
BufferFlags BufferFlags
Buffer flags describing the type of buffer.
int StructureByteStride
The size of the structure (in bytes) when it represents a structured/typed buffer.
GraphicsResourceUsage Usage
Usage of this buffer.
int SizeInBytes
Size of the buffer in bytes.