Created
November 14, 2018 03:31
-
-
Save baobao/e84dbb32190aca0c17b13569595135f8 to your computer and use it in GitHub Desktop.
頂点バッファ生成部分コード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Buffer CreateVertexBuffer(Device device, System.Array vertices) | |
{ | |
using (DataStream vertexStream | |
= new DataStream(vertices, true, true)) | |
{ | |
return new Buffer( | |
device, | |
vertexStream, | |
new BufferDescription() | |
{ | |
// バッファのサイズ | |
SizeInBytes = (int)vertexStream.Length, | |
// バッファの種類 | |
BindFlags = BindFlags.VertexBuffer | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment