Skip to content

Instantly share code, notes, and snippets.

@baobao
Created December 3, 2018 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baobao/7c68bbb6e84c63095be24df048856d43 to your computer and use it in GitHub Desktop.
Save baobao/7c68bbb6e84c63095be24df048856d43 to your computer and use it in GitHub Desktop.
SlimDXでIndexBuffer作成部分コード
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