The Index and Vertex Buffer Window allows you to see information about the geometry being passed into the graphics pipeline.
- Input Topology - Indicates the way the index buffer is interpreted by the pipeline and how the primitives are assembled.
- Index Buffer - Shows the values contained within the index buffer. Offsets and counts that are specified by the draw calls will be reflected in the starting index of the table and the number of elements it contains. As shown in the image above with vertex 2, selecting a value in the Index Buffer table will cause other uses of that index value to be highlighted, helping to identify index buffer reuse; the corresponding vertex will also be selected in the Vertex Buffer table.
- Vertex Buffer - Shows the values of each component of the input elements. Note that these may not be ordered exactly as they are in the underlying vertex buffer. Input elements which are related to the first vertex buffer will be shown first, followed by elements from the second vertex buffer, etc. Vertex offsets and counts that are specified by the draw calls will be reflected in the starting index of the table and the number of elements in the table. If one of the vertex buffers is being used for per-instance data, it will also be shown in this table and those columns may have more or less rows than the per-vertex data. There will be one row for each instance that is being drawn, as specified by the draw call. Selecting a row in the vertex buffer will cause all corresponding index values to be highlighted in the Index Buffer table. The column that was selected is also associated with the Input Elements list and the corresponding Input Element will be selected.
- Input Elements - Contains a list of input elements that are specified by the application. Selecting an item in this list will cause its description to be shown in the textbox to the right.
- Warnings - The Index and Vertex Buffer Window also provides some feedback if it recognizes that the input elements are not tightly packed (there are "gaps" between the elements) or if they are overlapping. Also, if the index or vertex buffer is not large enough for the parameters supplied to the draw call, a warning will be generated. If any warnings with any input elements are identified, they will appear as red text in the input element description textbox. The following warnings may be reported:
- Index buffer does not contain enough elements for this draw operation.
- There is a NULL input layout bound.
- No vertex buffer is bound to input slot X.
- Vertex buffer at input slot X has stride of 0.
- Vertex buffer X has an offset + stride that is greater than the ByteWidth.
- Vertex buffer X does not contain enough elements for this draw operation.
- Detected overlapping input elements: YYYY and ZZZZ.
- Detected a gap before input element: YYYY.
- Saving Index/Vertex Buffer
- The index/vertex buffer can be saved by using the File->Save As option in the main File menu.
- It can be saved as indexBuffer.txt/vertexBuffer.txt in user specified directory
- The data cannot be loaded back into the indexBuffer/vertexBuffer window.
- Large Vertex Buffer
- The vertex buffer which has more than 100,000 vertices will be saved as vb"drawcall".txt in the app's launching directory.
- The first 100,000 vertices are displayed in the Client window.
- A warning with above messages is indicated in the warnings window.