D3D11 not drawing

Started by
11 comments, last by alexisgreene 12 years, 2 months ago
I just uploaded some screenshots of my PIX frame. I have been going at this problem all night and can not see what I am doing wrong. The vertex order was in the code in the original post but here it is again


// create the console's vertex buffer
CVector3D verts[] = {
CVector3D(-1.0f, 0.0f, 0.0f), // bottom left
CVector3D(-1.0f, 1.0f, 0.0f), // top left
CVector3D(1.0f, 0.0f, 0.0f), // bottom right
CVector3D(1.0f, 1.0f, 0.0f), // top right
};


I have also tried changing the z number to 1.0f, -1.0f, and 0.5f but still got the same results.
Advertisement
Everything seems right... Check the pixel history of a pixel that should be covered by the triangles... And post a screenshot smile.png

To which value are you clearing the depth buffer?
I thought it would be a depth buffer issue so I began clearing it every frame and got the same result. I thought I set up the depth buffer wrong so I was going over it line by line when I noticed a C style cast that I wanted to change to a C++ style cast.


vp.Width = (FLOAT)m_cvarResolutionWidth.GetValue();
vp.Height = (FLOAT)m_cvarResolutionHeight.GetValue();


I store console variable values in a union inside of the console variable class, so I changed these lines to this:


vp.Width = static_cast<FLOAT>(m_cvarResolutionWidth.GetValue().lVal);
vp.Height = static_cast<FLOAT>(m_cvarResolutionHeight.GetValue().lVal);


Now everything is working fine!

This topic is closed to new replies.

Advertisement