OSDN Git Service

チケット #35358 に対応するためのブランチの作成。
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / direct3d11 / Buffer11.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 "Enums11.h"\r
25 #include "Resource11.h"\r
26 \r
27 namespace SlimDX\r
28 {\r
29         namespace Direct3D11\r
30         {\r
31                 ref class Device;\r
32                 value class BufferDescription;\r
33                 \r
34                 /// <summary>\r
35                 /// Represents a sequential collection of typed data elements,\r
36                 /// typically used to contain vertices, indices, or shader constant data.\r
37                 /// </summary>\r
38                 /// <unmanaged>ID3D11Buffer</unmanaged>\r
39                 public ref class Buffer : public Resource\r
40                 {\r
41                         COMOBJECT(ID3D11Buffer, Buffer);\r
42                         \r
43                 private:\r
44                         static ID3D11Buffer* Build( SlimDX::Direct3D11::Device^ device, DataStream^ data, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceOptionFlags optionFlags, int structureByteStride );\r
45                 \r
46                 public:\r
47                         /// <summary>\r
48                         /// Gets the buffer's description.\r
49                         /// </summary>\r
50                         property BufferDescription Description\r
51                         {\r
52                                 BufferDescription get();\r
53                         }\r
54                         \r
55                         /// <summary>\r
56                         /// Initializes a new instance of the <see cref="Buffer"/> class.\r
57                         /// </summary>\r
58                         /// <param name="device">The device with which to associate the buffer.</param>\r
59                         /// <param name="description">The description of the buffer.</param>\r
60                         Buffer( SlimDX::Direct3D11::Device^ device, BufferDescription description );\r
61 \r
62                         /// <summary>\r
63                         /// Initializes a new instance of the <see cref="Buffer"/> class.\r
64                         /// </summary>\r
65                         /// <param name="device">The device with which to associate the buffer.</param>\r
66                         /// <param name="data">Initial data used to initialize the buffer.</param>\r
67                         /// <param name="description">The description of the buffer.</param>\r
68                         Buffer( SlimDX::Direct3D11::Device^ device, DataStream^ data, BufferDescription description );\r
69 \r
70                         /// <summary>\r
71                         /// Initializes a new instance of the <see cref="Buffer"/> class.\r
72                         /// </summary>\r
73                         /// <param name="device">The device with which to associate the buffer.</param>\r
74                         /// <param name="sizeInBytes">The size, in bytes, of the buffer.</param>\r
75                         /// <param name="usage">The usage pattern for the buffer.</param>\r
76                         /// <param name="bindFlags">Flags specifying how the buffer will be bound to the pipeline.</param>\r
77                         /// <param name="accessFlags">Flags specifying how the buffer will be accessible from the CPU.</param>\r
78                         /// <param name="optionFlags">Miscellaneous resource options.</param>\r
79                         /// <param name="structureByteStride">The size (in bytes) of the structure element for structured buffers.</param>\r
80                         Buffer( SlimDX::Direct3D11::Device^ device, int sizeInBytes, ResourceUsage usage, SlimDX::Direct3D11::BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceOptionFlags optionFlags, int structureByteStride );\r
81                         \r
82                         /// <summary>\r
83                         /// Initializes a new instance of the <see cref="Buffer"/> class.\r
84                         /// </summary>\r
85                         /// <param name="device">The device with which to associate the buffer.</param>\r
86                         /// <param name="data">Initial data used to initialize the buffer.</param>\r
87                         /// <param name="sizeInBytes">The size, in bytes, of the buffer.</param>\r
88                         /// <param name="usage">The usage pattern for the buffer.</param>\r
89                         /// <param name="bindFlags">Flags specifying how the buffer will be bound to the pipeline.</param>\r
90                         /// <param name="accessFlags">Flags specifying how the buffer will be accessible from the CPU.</param>\r
91                         /// <param name="optionFlags">Miscellaneous resource options.</param>\r
92                         /// <param name="structureByteStride">The size (in bytes) of the structure element for structured buffers.</param>\r
93                         Buffer( SlimDX::Direct3D11::Device^ device, DataStream^ data, int sizeInBytes, ResourceUsage usage, SlimDX::Direct3D11::BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceOptionFlags optionFlags, int structureByteStride );\r
94                 };\r
95         }\r
96 };