OSDN Git Service

DTXMania089リリースに際してのtag付け。
[dtxmania/dtxmania.git] / 110401(DTXMania089) / SlimDXc_Jun2010(VC++2008) / source / direct3d11 / ShaderResourceView11.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 "ResourceView11.h"\r
25 #include "ImageLoadInformation11.h"\r
26 \r
27 namespace SlimDX\r
28 {\r
29         namespace Direct3D11\r
30         {\r
31                 ref class Device;\r
32                 ref class Resource;\r
33                 value class ShaderResourceViewDescription;\r
34 \r
35                 /// <summary>Specifies the subresources that a shader can access during rendering.</summary>\r
36                 /// <unmanaged>ID3D11ShaderResourceView</unmanaged>\r
37                 public ref class ShaderResourceView : public ResourceView\r
38                 {\r
39                         COMOBJECT(ID3D11ShaderResourceView, ShaderResourceView);\r
40 \r
41                         static ID3D11ShaderResourceView* ConstructFromFile( SlimDX::Direct3D11::Device^ device, System::String^ fileName, D3DX11_IMAGE_LOAD_INFO* loadInformation );\r
42                         static ID3D11ShaderResourceView* ConstructFromMemory( SlimDX::Direct3D11::Device^ device, array<System::Byte>^ memory, D3DX11_IMAGE_LOAD_INFO* loadInformation );\r
43                         static ID3D11ShaderResourceView* ConstructFromStream( SlimDX::Direct3D11::Device^ device, System::IO::Stream^ stream, int sizeInBytes, D3DX11_IMAGE_LOAD_INFO* loadInformation );\r
44                         \r
45                 public:\r
46                         /// <summary>Creates a <see cref="ShaderResourceView" /> for accessing resource data.</summary>\r
47                         /// <param name="device">The device to use when creating this <see cref="ShaderResourceView" />.</param>\r
48                         /// <param name="resource">The resource that will serve as input to a shader. This resource must have been created with the <see cref="BindFlags">ShaderResource</see> flag.</param>\r
49                         /// <unmanaged>ID3D11Device::CreateShaderResourceView</unmanaged>\r
50                         ShaderResourceView( SlimDX::Direct3D11::Device^ device, SlimDX::Direct3D11::Resource^ resource );\r
51 \r
52                         /// <summary>Creates a <see cref="ShaderResourceView" /> for accessing resource data.</summary>\r
53                         /// <param name="device">The device to use when creating this <see cref="ShaderResourceView" />.</param>\r
54                         /// <param name="resource">The resource that will serve as input to a shader. This resource must have been created with the <see cref="BindFlags">ShaderResource</see> flag.</param>\r
55                         /// <param name="description">A structure describing the <see cref="ShaderResourceView" /> to be created.</param>\r
56                         /// <unmanaged>ID3D11Device::CreateShaderResourceView</unmanaged>\r
57                         ShaderResourceView( SlimDX::Direct3D11::Device^ device, SlimDX::Direct3D11::Resource^ resource, ShaderResourceViewDescription description );\r
58 \r
59                         /// <summary>Gets a structure describing this <see cref="ShaderResourceView" />.</summary>\r
60                         /// <unmanaged>ID3D11ShaderResourceView::GetDesc</unmanaged>\r
61                         property ShaderResourceViewDescription Description\r
62                         {\r
63                                 ShaderResourceViewDescription get();\r
64                         }\r
65 \r
66                         /// <summary>\r
67                         /// Creates a shader resource view from a file.\r
68                         /// </summary>\r
69                         /// <param name="device">The device that will own the resource.</param>\r
70                         /// <param name="fileName">The name of the file that contains the shader resource view.</param>\r
71                         /// <returns>The created resource view.</returns>\r
72                         static ShaderResourceView^ FromFile( SlimDX::Direct3D11::Device^ device, System::String^ fileName );\r
73 \r
74                         /// <summary>\r
75                         /// Creates a shader resource view from a file.\r
76                         /// </summary>\r
77                         /// <param name="device">The device that will own the resource.</param>\r
78                         /// <param name="fileName">The name of the file that contains the shader resource view.</param>\r
79                         /// <param name="loadInformation">Identifies characteristics of the texture to be loaded.</param>\r
80                         /// <returns>The created resource view.</returns>\r
81                         static ShaderResourceView^ FromFile( SlimDX::Direct3D11::Device^ device, System::String^ fileName, ImageLoadInformation loadInformation );\r
82 \r
83                         /// <summary>\r
84                         /// Creates a shader resource view from memory.\r
85                         /// </summary>\r
86                         /// <param name="device">The device that will own the resource.</param>\r
87                         /// <param name="memory">The block of memory that contains the shader resource view.</param>\r
88                         /// <returns>The created resource view.</returns>\r
89                         static ShaderResourceView^ FromMemory( SlimDX::Direct3D11::Device^ device, array<System::Byte>^ memory );\r
90 \r
91                         /// <summary>\r
92                         /// Creates a shader resource view from memory.\r
93                         /// </summary>\r
94                         /// <param name="device">The device that will own the resource.</param>\r
95                         /// <param name="memory">The block of memory that contains the shader resource view.</param>\r
96                         /// <param name="loadInfo">Identifies characteristics of the texture to be loaded.</param>\r
97                         /// <returns>The created resource view.</returns>\r
98                         static ShaderResourceView^ FromMemory( SlimDX::Direct3D11::Device^ device, array<System::Byte>^ memory, ImageLoadInformation loadInfo );\r
99 \r
100                         /// <summary>\r
101                         /// Creates a shader resource view from a stream.\r
102                         /// </summary>\r
103                         /// <param name="device">The device that will own the resource.</param>\r
104                         /// <param name="stream">The stream that contains the shader resource view.</param>\r
105                         /// <param name="sizeInBytes">Size of the shader resource, in bytes.</param>\r
106                         /// <returns>The created resource view.</returns>\r
107                         static ShaderResourceView^ FromStream( SlimDX::Direct3D11::Device^ device, System::IO::Stream^ stream, int sizeInBytes );\r
108 \r
109                         /// <summary>\r
110                         /// Creates a shader resource view from a stream.\r
111                         /// </summary>\r
112                         /// <param name="device">The device that will own the resource.</param>\r
113                         /// <param name="stream">The stream that contains the shader resource view.</param>\r
114                         /// <param name="sizeInBytes">Size of the shader resource, in bytes.</param>\r
115                         /// <param name="loadInfo">Identifies characteristics of the texture to be loaded.</param>\r
116                         /// <returns>The created resource view.</returns>\r
117                         static ShaderResourceView^ FromStream( SlimDX::Direct3D11::Device^ device, System::IO::Stream^ stream, int sizeInBytes, ImageLoadInformation loadInfo );\r
118                 };\r
119         }\r
120 };