See this example program: https://github.com/djcsdy/gfx-dx11-empty-vertex-buffer/blob/master/src/main.rs
factory.create_vertex_buffer::<Vertex>(&[Vertex { pos: [0.0, 0.0] }]); is ok, but factory.create_vertex_buffer::<Vertex>(&[]); panics with CreationError::Other.
I believe this is because ID3D11Device::CreateBuffer fails when attempting to create an empty buffer, but that behaviour is not documented by Microsoft and I haven鈥檛 double checked.
This is preventing me from using conrod in conjunction with gfx-rs and DX11, because one of the first things conrod does on startup is to create an empty vertex buffer.
FWIW, the OpenGL backend has a specific workaround for the same problem.
Thanks for the issue! Sounds like we need a similar workaround for DX11.
FWIW it looks like conrod doesn鈥檛 work with gfx-rs and DX11 anyway, because its shaders are written in GLSL and AIUI gfx-rs 0.17 doesn鈥檛 translate shaders like the newer LL builds do.
I used this hack to get past the immediate problem. It is similar in principle to the workaround used for OpenGL. I haven鈥檛 tested this except to show that it allows conrod to get a bit further along the startup process, and then panic when creating shaders. I don鈥檛 know enough about Direct3D to know if this workaround should work in practice, but feel free to borrow it if it鈥檚 of any use to you.
Fixed, I used your OpenGL "hack" djcsdy, and it went successful through all the tests.
We'd need to back-port the PR on v0.17 branch and bump the patch version of DX11 backend in order to publish an update.