OSDN Git Service

DTXMania089リリースに際してのtag付け。
[dtxmania/dtxmania.git] / 110401(DTXMania089) / SlimDXc_Jun2010(VC++2008) / source / direct3d11 / Texture2DDescription11.h
1 /*\r
2 * Copyright (c) 2007-2010 SlimDX Group\r
3\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy\r
5 * of this software and associated documentation files (the "Software"), to deal\r
6 * in the Software without restriction, including without limitation the rights\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
8 * copies of the Software, and to permit persons to whom the Software is\r
9 * furnished to do so, subject to the following conditions:\r
10\r
11 * The above copyright notice and this permission notice shall be included in\r
12 * all copies or substantial portions of the Software.\r
13\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
20 * THE SOFTWARE.\r
21 */\r
22 #pragma once\r
23 \r
24 #include "../dxgi/Enums.h"\r
25 #include "../dxgi/SampleDescription.h"\r
26 \r
27 #include "Enums11.h"\r
28 \r
29 namespace SlimDX\r
30 {\r
31         namespace Direct3D11\r
32         {\r
33                 /// <summary>\r
34                 /// Describes a two-dimensional texture.\r
35                 /// </summary>\r
36                 /// <unmanaged>D3D11_TEXTURE2D_DESC</unmanaged>\r
37                 public value class Texture2DDescription : System::IEquatable<Texture2DDescription>\r
38                 {\r
39                 private:\r
40                         int m_Width;\r
41                         int m_Height;\r
42                         int m_MipLevels;\r
43                         int m_ArraySize;\r
44                         DXGI::Format m_Format;\r
45                         DXGI::SampleDescription m_SampleDesc;\r
46                         ResourceUsage m_Usage;\r
47                         BindFlags m_BindFlags;\r
48                         CpuAccessFlags m_CPUAccessFlags;\r
49                         ResourceOptionFlags m_MiscFlags;\r
50 \r
51                 internal:\r
52                         Texture2DDescription( const D3D11_TEXTURE2D_DESC& native );\r
53                         \r
54                         D3D11_TEXTURE2D_DESC CreateNativeVersion();\r
55                         \r
56                 public:\r
57                         /// <summary>\r
58                         /// Texture width (in texels).\r
59                         /// </summary>\r
60                         property int Width\r
61                         {\r
62                                 int get();\r
63                                 void set( int value );\r
64                         }\r
65                         \r
66                         /// <summary>\r
67                         /// Texture height (in texels).\r
68                         /// </summary>\r
69                         property int Height\r
70                         {\r
71                                 int get();\r
72                                 void set( int value );\r
73                         }\r
74                         \r
75                         /// <summary>\r
76                         /// The maximum number of mipmap levels in the texture. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.\r
77                         /// </summary>\r
78                         property int MipLevels\r
79                         {\r
80                                 int get();\r
81                                 void set( int value );\r
82                         }\r
83                         \r
84                         /// <summary>\r
85                         /// Number of textures in the array.\r
86                         /// </summary>\r
87                         property int ArraySize\r
88                         {\r
89                                 int get();\r
90                                 void set( int value );\r
91                         }\r
92                         \r
93                         /// <summary>\r
94                         /// Format of the data in the texture.\r
95                         /// </summary>\r
96                         property DXGI::Format Format\r
97                         {\r
98                                 DXGI::Format get();\r
99                                 void set( DXGI::Format value );\r
100                         }\r
101                         \r
102                         /// <summary>\r
103                         /// Gets or sets multisampling parameters for the texture.\r
104                         /// </summary>\r
105                         property DXGI::SampleDescription SampleDescription\r
106                         {\r
107                                 DXGI::SampleDescription get();\r
108                                 void set( DXGI::SampleDescription value );\r
109                         }\r
110                         \r
111                         /// <summary>\r
112                         /// Value that identifies how the texture is to be read from and written to.\r
113                         /// </summary>\r
114                         property ResourceUsage Usage\r
115                         {\r
116                                 ResourceUsage get();\r
117                                 void set( ResourceUsage value );\r
118                         }\r
119                         \r
120                         /// <summary>\r
121                         /// Flags that describe how the texture can be bound to the pipeline.\r
122                         /// </summary>\r
123                         property Direct3D11::BindFlags BindFlags\r
124                         {\r
125                                 Direct3D11::BindFlags get();\r
126                                 void set( Direct3D11::BindFlags value );\r
127                         }\r
128                         \r
129                         /// <summary>\r
130                         /// Flags that specify how the CPU may access the texture.\r
131                         /// </summary>\r
132                         property Direct3D11::CpuAccessFlags CpuAccessFlags\r
133                         {\r
134                                 Direct3D11::CpuAccessFlags get();\r
135                                 void set( Direct3D11::CpuAccessFlags value );\r
136                         }\r
137                         \r
138                         /// <summary>\r
139                         /// Flags that identifies other, less common resource options.\r
140                         /// </summary>\r
141                         property ResourceOptionFlags OptionFlags\r
142                         {\r
143                                 ResourceOptionFlags get();\r
144                                 void set( ResourceOptionFlags value );\r
145                         }\r
146 \r
147                         /// <summary>\r
148                         /// Tests for equality between two objects.\r
149                         /// </summary>\r
150                         /// <param name="left">The first value to compare.</param>\r
151                         /// <param name="right">The second value to compare.</param>\r
152                         /// <returns><c>true</c> if <paramref name="left"/> has the same value as <paramref name="right"/>; otherwise, <c>false</c>.</returns>\r
153                         static bool operator == ( Texture2DDescription left, Texture2DDescription right );\r
154 \r
155                         /// <summary>\r
156                         /// Tests for inequality between two objects.\r
157                         /// </summary>\r
158                         /// <param name="left">The first value to compare.</param>\r
159                         /// <param name="right">The second value to compare.</param>\r
160                         /// <returns><c>true</c> if <paramref name="left"/> has a different value than <paramref name="right"/>; otherwise, <c>false</c>.</returns>\r
161                         static bool operator != ( Texture2DDescription left, Texture2DDescription right );\r
162 \r
163                         /// <summary>\r
164                         /// Returns the hash code for this instance.\r
165                         /// </summary>\r
166                         /// <returns>A 32-bit signed integer hash code.</returns>\r
167                         virtual int GetHashCode() override;\r
168 \r
169                         /// <summary>\r
170                         /// Returns a value that indicates whether the current instance is equal to a specified object. \r
171                         /// </summary>\r
172                         /// <param name="obj">Object to make the comparison with.</param>\r
173                         /// <returns><c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns>\r
174                         virtual bool Equals( System::Object^ obj ) override;\r
175 \r
176                         /// <summary>\r
177                         /// Returns a value that indicates whether the current instance is equal to the specified object. \r
178                         /// </summary>\r
179                         /// <param name="other">Object to make the comparison with.</param>\r
180                         /// <returns><c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns>\r
181                         virtual bool Equals( Texture2DDescription other );\r
182 \r
183                         /// <summary>\r
184                         /// Determines whether the specified object instances are considered equal. \r
185                         /// </summary>\r
186                         /// <param name="value1">The first value to compare.</param>\r
187                         /// <param name="value2">The second value to compare.</param>\r
188                         /// <returns><c>true</c> if <paramref name="value1"/> is the same instance as <paramref name="value2"/> or \r
189                         /// if both are <c>null</c> references or if <c>value1.Equals(value2)</c> returns <c>true</c>; otherwise, <c>false</c>.</returns>\r
190                         static bool Equals( Texture2DDescription% value1, Texture2DDescription% value2 );\r
191                 };\r
192         }\r
193 };