Now I have removed the d3d11.lib from we get the compile errors above, not too informative are they, in fact, there is nothing in there to make you think that this is an issue with a missing link library, well unless you are already a C++ programmer.
In the last post I also omitted a view port, so, lets fix that now. In our InitDevice method we can add this code after we have create the depth stencil view
// Setup the viewport
D3D11_VIEWPORT vp;
vp.Width = (FLOAT)width;
vp.Height = (FLOAT)height;
vp.MinDepth = 0.0f;
vp.MaxDepth = 1.0f;
vp.TopLeftX = 0;
vp.TopLeftY = 0;
pImmediateContext->RSSetViewports( 1, &vp );
D3D11_VIEWPORT vp;
vp.Width = (FLOAT)width;
vp.Height = (FLOAT)height;
vp.MinDepth = 0.0f;
vp.MaxDepth = 1.0f;
vp.TopLeftX = 0;
vp.TopLeftY = 0;
pImmediateContext->RSSetViewports( 1, &vp );
No comments:
Post a Comment