OSDN Git Service

DTXMania089リリースに際してのtag付け。
[dtxmania/dtxmania.git] / 110401(DTXMania089) / SlimDXc_Jun2010(VC++2008) / source / direct3d11 / VertexShaderWrapper11.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 namespace SlimDX\r
25 {\r
26         namespace Direct3D11\r
27         {\r
28                 ref class VertexShader;\r
29                 ref class Buffer;\r
30                 ref class ShaderResourceView;\r
31                 ref class SamplerState;\r
32                 ref class ClassInstance;\r
33 \r
34                 /// <summary>\r
35                 /// Defines a wrapper for vertex shader related commands on the device.\r
36                 /// </summary>\r
37                 public ref class VertexShaderWrapper\r
38                 {\r
39                 private:\r
40                         ID3D11DeviceContext* deviceContext;\r
41                         \r
42                 internal:\r
43                         VertexShaderWrapper( ID3D11DeviceContext* device );\r
44 \r
45                 public:\r
46                         /// <summary>\r
47                         /// Assigns a vertex shader to the device.\r
48                         /// </summary>\r
49                         /// <param name="shader">The shader to assign to the device. Assign null to disable the vertex shader.</param>\r
50                         void Set( VertexShader^ shader );\r
51 \r
52                         /// <summary>\r
53                         /// Assigns a vertex shader to the device.\r
54                         /// </summary>\r
55                         /// <param name="shader">The shader to assign to the device. Assign <c>null</c> to disable the vertex shader.</param>\r
56                         /// <param name="classInstances">An array of class-instance interfaces. Each interface used by a shader must have a corresponding class instance or the shader will get disabled.</param>\r
57                         void Set( VertexShader^ shader, array<ClassInstance^>^ classInstances );\r
58 \r
59                         /// <summary>\r
60                         /// Gets the vertex shader currently assigned to the device.\r
61                         /// </summary>\r
62                         /// <returns>The vertex shader (null if no shader is assigned).</returns>\r
63                         VertexShader^ Get();\r
64 \r
65                         /// <summary>\r
66                         /// Gets the vertex shader currently assigned to the device.\r
67                         /// </summary>\r
68                         /// <param name="classInstances">An array that will be used to contain any class instances currently active.</param>\r
69                         /// <returns>The vertex shader (null if no shader is assigned).</returns>\r
70                         VertexShader^ Get( array<ClassInstance^>^ classInstances );\r
71 \r
72                         /// <summary>\r
73                         /// Gets the constant buffers used by the vertex shader stage.\r
74                         /// </summary>\r
75                         /// <param name="startSlot">Index into the device's zero-based array from which to begin retrieving constant buffers.</param>\r
76                         /// <param name="count">Number of buffers to retrieve.</param>\r
77                         /// <returns>An array of constant buffers.</returns>\r
78                         array<Buffer^>^ GetConstantBuffers( int startSlot, int count );\r
79 \r
80                         /// <summary>\r
81                         /// Gets the sampler states used by the vertex shader stage.\r
82                         /// </summary>\r
83                         /// <param name="startSlot">Index into the device's zero-based array from which to begin retrieving samplers.</param>\r
84                         /// <param name="count">Number of samplers to retrieve.</param>\r
85                         /// <returns>An array of sampler states.</returns>\r
86                         array<SamplerState^>^ GetSamplers( int startSlot, int count );\r
87 \r
88                         /// <summary>\r
89                         /// Gets the shader resources used by the vertex shader stage.\r
90                         /// </summary>\r
91                         /// <param name="startSlot">Index into the device's zero-based array from which to begin retrieving shader resources.</param>\r
92                         /// <param name="count">Number of resources to retrieve.</param>\r
93                         /// <returns>An array of shader resources.</returns>\r
94                         array<ShaderResourceView^>^ GetShaderResources( int startSlot, int count );\r
95 \r
96                         /// <summary>\r
97                         /// Sets a single constant buffer to be used by the vertex shader stage.\r
98                         /// </summary>\r
99                         /// <param name="slot">Index into the device's zero-based array to which to set the constant buffer.</param>\r
100                         void SetConstantBuffer( Buffer^ constantBuffer, int slot );\r
101 \r
102                         /// <summary>\r
103                         /// Sets the constant buffers used by the vertex shader stage.\r
104                         /// </summary>\r
105                         /// <param name="startSlot">Index into the device's zero-based array to which to begin setting constant buffers.</param>\r
106                         /// <param name="count">Number of buffers from the source array to set.</param>\r
107                         void SetConstantBuffers( array<Buffer^>^ constantBuffers, int startSlot, int count );\r
108 \r
109                         /// <summary>\r
110                         /// Sets a single sampler to be used by the vertex shader stage.\r
111                         /// </summary>\r
112                         /// <param name="slot">Index into the device's zero-based array to which to set the sampler.</param>\r
113                         void SetSampler( SamplerState^ sampler, int slot );\r
114 \r
115                         /// <summary>\r
116                         /// Sets the sampler states used by the vertex shader stage.\r
117                         /// </summary>\r
118                         /// <param name="startSlot">Index into the device's zero-based array to which to begin setting samplers.</param>\r
119                         /// <param name="count">Number of samplers from the source array to set.</param>\r
120                         void SetSamplers( array<SamplerState^>^ samplers, int startSlot, int count );\r
121 \r
122                         /// <summary>\r
123                         /// Sets a single shader resource to be used by the vertex shader stage.\r
124                         /// </summary>\r
125                         /// <param name="slot">Index into the device's zero-based array to which to set the resource.</param>\r
126                         void SetShaderResource( ShaderResourceView^ resourceView, int slot );\r
127 \r
128                         /// <summary>\r
129                         /// Sets the shader resources used by the vertex shader stage.\r
130                         /// </summary>\r
131                         /// <param name="startSlot">Index into the device's zero-based array to which to begin setting shader resources.</param>\r
132                         /// <param name="count">Number of resources from the source array to set.</param>\r
133                         void SetShaderResources( array<ShaderResourceView^>^ resourceViews, int startSlot, int count );\r
134                 };\r
135         }\r
136 };