My question is basically why VS2012 tells me that there is no mesh available for the Input Assembler stage because if I click on the DeviceContext next to the Draw call in the Grahics Event List the Input layout is set correctly, the vertex buffers, too, the index buffer is NULL
as I do not call DrawIndexed and the primitive topology is set correctly. My background color is drawn using g_pImmediateContext->ClearRenderTargetView( g_pRenderTargetView, Colors::MidnightBlue );
. Only the mesh does not appear. What did I miss?
If anything maybe this file which can be opened using VS2012 may help, it is the Graphics Experiment.vsglog file (link no longer available).
Here is my InputLayout struct:
struct VERTEXPOSITIONCOLOR
{
DirectX::XMFLOAT3 position;
DirectX::XMFLOAT4 color;
static D3D11_INPUT_ELEMENT_DESC* GetVertexLayout()
{
static D3D11_INPUT_ELEMENT_DESC layout[] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT,
0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT,
0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
};
return layout;
}
static UINT GetNumElements(){ return 2; }
};
IASetVertexBuffers
on your vertex buffer prior to the draw call. \$\endgroup\$ – Syntac_ Jan 12 '14 at 0:19NULL
like the IndexBuffer if I had not calledIASetVertexBuffers
. \$\endgroup\$ – NOhs Jan 12 '14 at 0:24