2 * Copyright (c) 2007-2010 SlimDX Group
\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
11 * The above copyright notice and this permission notice shall be included in
\r
12 * all copies or substantial portions of the Software.
\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
24 #include "Enums11.h"
\r
25 #include "VertexBufferBinding11.h"
\r
27 using System::Runtime::InteropServices::OutAttribute;
\r
31 namespace Direct3D11
\r
34 ref class InputLayout;
\r
37 /// Defines a wrapper for input assembler related commands on the device.
\r
39 public ref class InputAssemblerWrapper
\r
42 ID3D11DeviceContext* deviceContext;
\r
45 InputAssemblerWrapper( ID3D11DeviceContext* device );
\r
49 /// Gets or sets the layout of the input data currently bound to the input assembler.
\r
51 property InputLayout^ InputLayout
\r
53 Direct3D11::InputLayout^ get();
\r
54 void set( Direct3D11::InputLayout^ value );
\r
58 /// Gets or sets the topology of primitive data bound to the input assembler.
\r
60 property PrimitiveTopology PrimitiveTopology
\r
62 Direct3D11::PrimitiveTopology get();
\r
63 void set( Direct3D11::PrimitiveTopology value );
\r
67 /// Binds an index buffer to the input assembler.
\r
69 /// <param name="indexBuffer">The index buffer to bind.</param>
\r
70 /// <param name="format">The format of the data in the index buffer.</param>
\r
71 /// <param name="offset">The offset in bytes from the start of the index buffer to the first index to use.</param>
\r
72 void SetIndexBuffer( Buffer^ indexBuffer, DXGI::Format format, int offset );
\r
75 /// Gets the index buffer currently bound to the input assembler.
\r
77 /// <param name="indexBuffer">When the method completes, contains the currently bound index buffer.</param>
\r
78 /// <param name="format">When the method completes, contains the format of the data in the index buffer.</param>
\r
79 /// <param name="offset">When the method completes, contains the offset in bytes from the start of the index buffer to the first index to use.</param>
\r
80 void GetIndexBuffer( [Out] Buffer^ %indexBuffer, [Out] DXGI::Format %format, [Out] int %offset );
\r
83 /// Binds a single vertex buffer to the input assembler.
\r
85 /// <param name="slot">Index of the slot to which to bind the vertex buffer.</param>
\r
86 /// <param name="vertexBufferBinding">A binding for the input vertex buffer.</param>
\r
87 void SetVertexBuffers( int slot, VertexBufferBinding vertexBufferBinding );
\r
90 /// Binds an array of vertex buffers to the input assembler.
\r
92 /// <param name="firstSlot">Index of the first input slot to use for binding. The first vertex buffer is explicitly bound to the start slot; this causes each additional vertex buffer in the array to be implicitly bound to each subsequent input slot. There are 16 input slots.</param>
\r
93 /// <param name="vertexBufferBindings">An array of bindings for input vertex buffers.</param>
\r
94 void SetVertexBuffers( int firstSlot, ... array<VertexBufferBinding>^ vertexBufferBindings );
\r
97 /// Gets the set of vertex buffers currently bound to the input assembler.
\r
99 /// <param name="firstSlot">The input slot of the first vertex buffer to get.</param>
\r
100 /// <param name="count">The number of vertex buffers to retrieve.</param>
\r
101 /// <returns>An array of bound vertex buffers.</returns>
\r
102 array<VertexBufferBinding>^ GetVertexBuffers( int firstSlot, int count );
\r