fix depth buffer range

This commit is contained in:
David Rose 2009-01-13 23:37:40 +00:00
parent 65cba1e762
commit 06c855c7d2

View File

@ -4425,6 +4425,8 @@ set_scissor(float left, float right, float bottom, float top) {
vp.X = _current_viewport.X + _current_viewport.Width * left; vp.X = _current_viewport.X + _current_viewport.Width * left;
vp.Height = _current_viewport.Height * (top - bottom); vp.Height = _current_viewport.Height * (top - bottom);
vp.Y = _current_viewport.Y + _current_viewport.Height * (1.0f - top); vp.Y = _current_viewport.Y + _current_viewport.Height * (1.0f - top);
vp.MinZ = 0.0f;
vp.MaxZ = 1.0f;
HRESULT hr = _d3d_device->SetViewport(&vp); HRESULT hr = _d3d_device->SetViewport(&vp);
if (FAILED(hr)) { if (FAILED(hr)) {