OSDN Git Service

作業部屋#50802 画面キャプチャができなくなっていた問題を暫定対応(F12キー固定で対応中)
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / SlimDXc_Jun2010(VC++2008) / source / direct3d11 / ShaderResourceView11.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 "ResourceView11.h"
25 #include "ImageLoadInformation11.h"
26
27 namespace SlimDX
28 {
29         namespace Direct3D11
30         {
31                 ref class Device;
32                 ref class Resource;
33                 value class ShaderResourceViewDescription;
34
35                 /// <summary>Specifies the subresources that a shader can access during rendering.</summary>
36                 /// <unmanaged>ID3D11ShaderResourceView</unmanaged>
37                 public ref class ShaderResourceView : public ResourceView
38                 {
39                         COMOBJECT(ID3D11ShaderResourceView, ShaderResourceView);
40
41                         static ID3D11ShaderResourceView* ConstructFromFile( SlimDX::Direct3D11::Device^ device, System::String^ fileName, D3DX11_IMAGE_LOAD_INFO* loadInformation );
42                         static ID3D11ShaderResourceView* ConstructFromMemory( SlimDX::Direct3D11::Device^ device, array<System::Byte>^ memory, D3DX11_IMAGE_LOAD_INFO* loadInformation );
43                         static ID3D11ShaderResourceView* ConstructFromStream( SlimDX::Direct3D11::Device^ device, System::IO::Stream^ stream, int sizeInBytes, D3DX11_IMAGE_LOAD_INFO* loadInformation );
44                         
45                 public:
46                         /// <summary>Creates a <see cref="ShaderResourceView" /> for accessing resource data.</summary>
47                         /// <param name="device">The device to use when creating this <see cref="ShaderResourceView" />.</param>
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>
49                         /// <unmanaged>ID3D11Device::CreateShaderResourceView</unmanaged>
50                         ShaderResourceView( SlimDX::Direct3D11::Device^ device, SlimDX::Direct3D11::Resource^ resource );
51
52                         /// <summary>Creates a <see cref="ShaderResourceView" /> for accessing resource data.</summary>
53                         /// <param name="device">The device to use when creating this <see cref="ShaderResourceView" />.</param>
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>
55                         /// <param name="description">A structure describing the <see cref="ShaderResourceView" /> to be created.</param>
56                         /// <unmanaged>ID3D11Device::CreateShaderResourceView</unmanaged>
57                         ShaderResourceView( SlimDX::Direct3D11::Device^ device, SlimDX::Direct3D11::Resource^ resource, ShaderResourceViewDescription description );
58
59                         /// <summary>Gets a structure describing this <see cref="ShaderResourceView" />.</summary>
60                         /// <unmanaged>ID3D11ShaderResourceView::GetDesc</unmanaged>
61                         property ShaderResourceViewDescription Description
62                         {
63                                 ShaderResourceViewDescription get();
64                         }
65
66                         /// <summary>
67                         /// Creates a shader resource view from a file.
68                         /// </summary>
69                         /// <param name="device">The device that will own the resource.</param>
70                         /// <param name="fileName">The name of the file that contains the shader resource view.</param>
71                         /// <returns>The created resource view.</returns>
72                         static ShaderResourceView^ FromFile( SlimDX::Direct3D11::Device^ device, System::String^ fileName );
73
74                         /// <summary>
75                         /// Creates a shader resource view from a file.
76                         /// </summary>
77                         /// <param name="device">The device that will own the resource.</param>
78                         /// <param name="fileName">The name of the file that contains the shader resource view.</param>
79                         /// <param name="loadInformation">Identifies characteristics of the texture to be loaded.</param>
80                         /// <returns>The created resource view.</returns>
81                         static ShaderResourceView^ FromFile( SlimDX::Direct3D11::Device^ device, System::String^ fileName, ImageLoadInformation loadInformation );
82
83                         /// <summary>
84                         /// Creates a shader resource view from memory.
85                         /// </summary>
86                         /// <param name="device">The device that will own the resource.</param>
87                         /// <param name="memory">The block of memory that contains the shader resource view.</param>
88                         /// <returns>The created resource view.</returns>
89                         static ShaderResourceView^ FromMemory( SlimDX::Direct3D11::Device^ device, array<System::Byte>^ memory );
90
91                         /// <summary>
92                         /// Creates a shader resource view from memory.
93                         /// </summary>
94                         /// <param name="device">The device that will own the resource.</param>
95                         /// <param name="memory">The block of memory that contains the shader resource view.</param>
96                         /// <param name="loadInfo">Identifies characteristics of the texture to be loaded.</param>
97                         /// <returns>The created resource view.</returns>
98                         static ShaderResourceView^ FromMemory( SlimDX::Direct3D11::Device^ device, array<System::Byte>^ memory, ImageLoadInformation loadInfo );
99
100                         /// <summary>
101                         /// Creates a shader resource view from a stream.
102                         /// </summary>
103                         /// <param name="device">The device that will own the resource.</param>
104                         /// <param name="stream">The stream that contains the shader resource view.</param>
105                         /// <param name="sizeInBytes">Size of the shader resource, in bytes.</param>
106                         /// <returns>The created resource view.</returns>
107                         static ShaderResourceView^ FromStream( SlimDX::Direct3D11::Device^ device, System::IO::Stream^ stream, int sizeInBytes );
108
109                         /// <summary>
110                         /// Creates a shader resource view from a stream.
111                         /// </summary>
112                         /// <param name="device">The device that will own the resource.</param>
113                         /// <param name="stream">The stream that contains the shader resource view.</param>
114                         /// <param name="sizeInBytes">Size of the shader resource, in bytes.</param>
115                         /// <param name="loadInfo">Identifies characteristics of the texture to be loaded.</param>
116                         /// <returns>The created resource view.</returns>
117                         static ShaderResourceView^ FromStream( SlimDX::Direct3D11::Device^ device, System::IO::Stream^ stream, int sizeInBytes, ImageLoadInformation loadInfo );
118                 };
119         }
120 };