Explorar el Código

crashfix for (some) gui elements
looks like we did in fact need to reapply shaders at the tail end of GFXD3D11Device::endReset or it looses track and crashes out

AzaezelX hace 5 años
padre
commit
112ad70328
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      Engine/source/gfx/D3D11/gfxD3D11Device.cpp

+ 2 - 1
Engine/source/gfx/D3D11/gfxD3D11Device.cpp

@@ -665,7 +665,8 @@ void GFXD3D11Device::endReset(GFXD3D11WindowTarget* windowTarget)
 
 
    // Now reacquire all the resources we trashed earlier
    // Now reacquire all the resources we trashed earlier
    reacquireDefaultPoolResources();
    reacquireDefaultPoolResources();
-
+   mD3DDeviceContext->PSSetShader(mLastPixShader, NULL, 0);
+   mD3DDeviceContext->VSSetShader(mLastVertShader, NULL, 0);
    mInitialized = true;
    mInitialized = true;
    // Mark everything dirty and flush to card, for sanity.
    // Mark everything dirty and flush to card, for sanity.
    updateStates(true);
    updateStates(true);