Created
December 3, 2018 03:26
-
-
Save baobao/7c68bbb6e84c63095be24df048856d43 to your computer and use it in GitHub Desktop.
SlimDXでIndexBuffer作成部分コード
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
public static SlimDX.Direct3D11.Buffer CreateIndexBuffer(System.Array indexes) | |
{ | |
using (SlimDX.DataStream indexStream | |
= new SlimDX.DataStream(indexes, true, true)) | |
{ | |
return new SlimDX.Direct3D11.Buffer( | |
Instance._device, | |
indexStream, | |
new BufferDescription | |
{ | |
SizeInBytes = (int)indexStream.Length, | |
BindFlags = BindFlags.IndexBuffer, | |
} | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment