For some reason, only back-faces are rendering, even if I set the rasterizer and stencil buffer and state to any values. Setting
D3D11_CULL_BACK in the rasterizer structure has the same result.
This is how rendering is supposed to look (The code somehow works in the side project that was made using the
Direct3D Win32 Game Visual Studio template):
The model I'm rendering is loaded using DirectX::Model::CreateFromCMO(). I'm using left hand projection and view matrices.
This is how it looks inside my project:
I'm using the DirectXTK library to draw the sup model itself in both projects. I'm pretty sure that the graphics device, context and swap chain are properly created. I tried copying code from the second project to the first project but I somehow still managed not to fix it.
I'm also sure that the DirectX::CommonStates does contain it's own rasterizer and stencil state, but I don't understand how rendering doesn't work on my own project.
The debug layer is not displaying any errors or warnings at run-time related to the creating of the rendertargets, device, texture buffers, etc.
My only idea remaining is that the stencil buffer is wrongly configured, but I can't find what I did wrong here. The stencil state description is taken from MSDN (this link): https://docs.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-depth-stencil
The main project source is here (I won't post pieces of the code because that would take a lot of time and space, there are like 300+ lines of code related to the rendering pipeline) : https://github.com/NicusorN5/3D_Rad_Space/tree/master/3DRadSpace
To mention that you can't compile the project by your own because
Resources.rc is set to load files from a non-local (i.e some folder on my secondary HDD) path, and because of some dependencies that are also located in non-local paths. Sorry for that.