Wireframe Desc -> nothing to see

Started by
0 comments, last by MJP 12 years, 3 months ago
If i use the code to set the wireframe desc, i cant see anything on the screen:

D3D10_RASTERIZER_DESC rsd;
ID3D10RasterizerState *rs;
rsd.FillMode = D3D10_FILL_SOLID;
rsd.CullMode = D3D10_CULL_NONE;
if(FAILED(m_pd3dDevice->CreateRasterizerState(&rsd, &rs)))
{
MessageBox(NULL,TEXT("H"),TEXT("J"),MB_OK);
exit(1);
}

m_pd3dDevice->RSSetState(rs);


I only see my default(blue) background...
If i comment this code snippet out i can see everything.
What can cause this issue?
Advertisement
Well first of all, you have it set to SOLID fill mode so that won't give you wireframe. You want D3D10_FILL_WIREFRAME. Secondly, You need to fill out ALL of the parameters of the D3D10_RASTERIZER_DESC structure. It's a plain C structure, which means it does not have a constructor and does not set default values. Consequently, if you don't set the values it will have whatever junk is on the stack.

This topic is closed to new replies.

Advertisement