New answers tagged

0

The Wavefront OBJ you are using has quads which presumably you need to convert to triangles. It's likely related to that code in your reader in terms of the exact winding you are using. // Convert polygons to triangles uint32_t i0 = faceIndex[0]; uint32_t i1 = faceIndex[1]; for (size_t j = 2; j < iFace; ++j) { uint32_t index = faceIndex[j]; ...


1

A unit in DirectX is whatever you want it to be. Meters, feet, microns, screen-pixels, light-years... whatever makes sense in the context of the scene you are rendering. Just make sure you scale any assets you import so that they are the correct scale for your preferred unit-length. If you then add real-world physics, you have to make sure that you also use ...


0

There was one mistake in my code and one issue. The mistake was what DMGregory mentioned in the comments, each vertex in my vertex buffer had four copies of itself, which was causing me issues to calculate normals. So after fixing it to just use one copy of each vertex, I could calculate the normals more clearly. The issue was that the light wasn't having a ...


1

The problem was that i specified the scaling mode to be DXGI_MODE_SCALING_STRECHED, not DXGI_MODE_SCALING_UNSPECIFIED. As per the MSDN doc ( https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb173066(v=vs.85) ) this will change the resolution, even if the requested resolution is the entire screen.


0

One thing that's worth trying is enumerating the supported modes and picking one of those that matches the resolution you need, instead of creating your own DXGI_MODE_DESC. See https://docs.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-get-adapter-info Another option is to use IDXGIOutput::FindClosestMatchingMode() which will ...


Top 50 recent answers are included