Removed D3D9. (#3191)

This commit is contained in:
Бранимир Караџић
2023-11-03 21:15:42 -07:00
committed by GitHub
parent 6a914f5b13
commit f14c14a485
333 changed files with 8957 additions and 23428 deletions

View File

@@ -256,16 +256,11 @@ public:
float view[16];
bx::mtxLookAt(view, eye, at);
float centering = 0.0f;
if (bgfx::getRendererType() == bgfx::RendererType::Direct3D9) {
centering = -0.5f;
}
// Setup a top-left ortho matrix for screen space drawing.
const bgfx::Caps* caps = bgfx::getCaps();
{
float ortho[16];
bx::mtxOrtho(ortho, centering, m_width + centering, m_height + centering, centering, -1.0f, 1.0f, 0.0f, caps->homogeneousDepth);
bx::mtxOrtho(ortho, 0.0f, float(m_width), float(m_height), 0.0f, -1.0f, 1.0f, 0.0f, caps->homogeneousDepth);
bgfx::setViewTransform(0, view, ortho);
bgfx::setViewRect(0, 0, 0, uint16_t(m_width), uint16_t(m_height) );
}