0
votes

I'm using a geometry shader with the stream output stage to create geometry from a list of points. The data from the geometry shader is streamed into a buffer, to be used as a vertex buffer in another shader. However, the ID3D11::Draw() call requires that you know exactly how many vertices you will be drawing, and I don't know this ahead of time. Simply calling sizeof() on the buffer will only give you the size of the pointer to the buffer. Is there a method for determining the size of buffers in DirectX 11?

1

1 Answers

2
votes

You can call ID3D11DeviceContext::DrawAuto method to draw geometry of unknown size that was processed by the input assembler, vertex shader, and stream-output stages.