OSDN Git Service

作業部屋#50802 画面キャプチャができなくなっていた問題を暫定対応(F12キー固定で対応中)
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / SlimDXc_Jun2010(VC++2008) / source / direct3d11 / BufferDescription11.h
1 /*
2 * Copyright (c) 2007-2010 SlimDX Group
3
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22 #pragma once
23
24 #include "Enums11.h"
25
26 namespace SlimDX
27 {
28         namespace Direct3D11
29         {       
30                 /// <summary>
31                 /// Describes a buffer resource.
32                 /// </summary>
33                 /// <unmanaged>D3D11_BUFFER_DESC</unmanaged>
34                 public value class BufferDescription : System::IEquatable<BufferDescription>
35                 {
36                 private:
37                         int m_ByteWidth;
38                         ResourceUsage m_Usage;
39                         BindFlags m_BindFlags;
40                         CpuAccessFlags m_CPUAccessFlags;
41                         ResourceOptionFlags m_MiscFlags;
42                         int m_StructureByteStride;
43
44                 internal:
45                         BufferDescription( const D3D11_BUFFER_DESC& native );
46                         
47                 public:
48                         /// <summary>
49                         /// Gets or sets the size, in bytes, of the buffer.
50                         /// </summary>
51                         property int SizeInBytes
52                         {
53                                 int get();
54                                 void set( int value );
55                         }
56
57                         /// <summary>
58                         /// Gets or sets the intended usage pattern of the buffer.
59                         /// </summary>
60                         property ResourceUsage Usage
61                         {
62                                 ResourceUsage get();
63                                 void set( ResourceUsage value );
64                         }
65
66                         /// <summary>
67                         /// Gets or sets the flags specifying how the buffer is bound to the pipeline.
68                         /// </summary>
69                         property Direct3D11::BindFlags BindFlags
70                         {
71                                 Direct3D11::BindFlags get();
72                                 void set( Direct3D11::BindFlags value );
73                         }
74
75                         /// <summary>
76                         /// Gets or sets the flags specifying how the CPU will be allowed to access the buffer.
77                         /// </summary>
78                         property Direct3D11::CpuAccessFlags CpuAccessFlags
79                         {
80                                 Direct3D11::CpuAccessFlags get();
81                                 void set( Direct3D11::CpuAccessFlags value );
82                         }
83
84                         /// <summary>
85                         /// Gets or sets the flags specifying miscellaneous resource options.
86                         /// </summary>
87                         property ResourceOptionFlags OptionFlags
88                         {
89                                 ResourceOptionFlags get();
90                                 void set( ResourceOptionFlags value );
91                         }
92                         
93                         /// <summary>
94                         /// Gets or sets the size (in bytes) of the structure used for elements of a structured buffer.
95                         /// </summary>
96                         property int StructureByteStride
97                         {
98                                 int get();
99                                 void set( int value );
100                         }
101
102                         /// <summary>
103                         /// Initializes a new instance of the <see cref="BufferDescription"/> struct.
104                         /// </summary>
105                         /// <param name="sizeInBytes">The size, in bytes, of the buffer.</param>
106                         /// <param name="usage">The usage pattern for the buffer.</param>
107                         /// <param name="bindFlags">Flags specifying how the buffer will be bound to the pipeline.</param>
108                         /// <param name="accessFlags">Flags specifying how the buffer will be accessible from the CPU.</param>
109                         /// <param name="optionFlags">Miscellaneous resource options.</param>
110                         /// <param name="structureByteStride">The size (in bytes) of the structure for a structured buffer.</param>
111                         BufferDescription( int sizeInBytes, ResourceUsage usage, Direct3D11::BindFlags bindFlags, Direct3D11::CpuAccessFlags accessFlags, ResourceOptionFlags optionFlags, int structureByteStride );
112                 
113                         /// <summary>
114                         /// Tests for equality between two BufferDescriptions.
115                         /// </summary>
116                         /// <param name="left">The first value to compare.</param>
117                         /// <param name="right">The second value to compare.</param>
118                         /// <returns><c>true</c> if <paramref name="left"/> has the same value as <paramref name="right"/>; otherwise, <c>false</c>.</returns>
119                         static bool operator == ( BufferDescription left, BufferDescription right );
120                         
121                         /// <summary>
122                         /// Tests for inequality between two BufferDescriptions.
123                         /// </summary>
124                         /// <param name="left">The first value to compare.</param>
125                         /// <param name="right">The second value to compare.</param>
126                         /// <returns><c>true</c> if <paramref name="left"/> has a different value than <paramref name="right"/>; otherwise, <c>false</c>.</returns>
127                         static bool operator != ( BufferDescription left, BufferDescription right );
128                         
129                         /// <summary>
130                         /// Returns the hash code for this instance.
131                         /// </summary>
132                         /// <returns>A 32-bit signed integer hash code.</returns>
133                         virtual int GetHashCode() override;
134                         
135                         /// <summary>
136                         /// Returns a value indicating whether this instance is equal to the specified object.
137                         /// </summary>
138                         /// <param name="obj">An object to compare with this instance.</param>
139                         /// <returns><c>true</c> if <paramref name="obj"/> has the same value as this instance; otherwise, <c>false</c>.</returns>
140                         virtual bool Equals( System::Object^ obj ) override;
141
142                         /// <summary>
143                         /// Returns a value indicating whether this instance is equal to the specified object.
144                         /// </summary>
145                         /// <param name="other">A <see cref="BufferDescription"/> to compare with this instance.</param>
146                         /// <returns><c>true</c> if <paramref name="other"/> has the same value as this instance; otherwise, <c>false</c>.</returns>
147                         virtual bool Equals( BufferDescription other );
148
149                         /// <summary>
150                         /// Returns a value indicating whether the two BufferDescriptions are equivalent.
151                         /// </summary>
152                         /// <param name="value1">The first value to compare.</param>
153                         /// <param name="value2">The second value to compare.</param>
154                         /// <returns><c>true</c> if <paramref name="value1"/> has the same value as <paramref name="value2"/>; otherwise, <c>false</c>.</returns>
155                         static bool Equals( BufferDescription% value1, BufferDescription% value2 );
156                 };
157         }
158 };