Last active
December 7, 2018 02:39
-
-
Save baobao/b51843f871b522529c1c07d27ae19162 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
// InputLaoutをセット | |
device.ImmediateContext.InputAssembler.InputLayout = vertexLayout; | |
// 頂点バッファをセット | |
device.ImmediateContext.InputAssembler.SetVertexBuffers( | |
0, new VertexBufferBinding( | |
// セットするバッファ | |
vertexBuffer, | |
// 1頂点あたりのバイト数(この場合24バイト) | |
sizeof(float) * 3, | |
// オフセット値(基本0) | |
0) | |
); | |
// 三角形の描画方法をセット | |
device.ImmediateContext.InputAssembler.PrimitiveTopology | |
= PrimitiveTopology.TriangleList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment