mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
SP: Fix null indexbuffer issue when the validation layers are enabled
This commit is contained in:
parent
b709b4ee6b
commit
1e30b08363
2 changed files with 14 additions and 0 deletions
|
@ -178,7 +178,11 @@ void idRenderBackend::Init()
|
|||
prevMVP[1] = renderMatrix_identity;
|
||||
prevViewsValid = false;
|
||||
|
||||
currentVertexBuffer = nullptr;
|
||||
currentIndexBuffer = nullptr;
|
||||
currentJointBuffer = nullptr;
|
||||
currentVertexOffset = 0;
|
||||
currentIndexOffset = 0;
|
||||
currentJointOffset = 0;
|
||||
|
||||
// RB: prepare ImGui system
|
||||
|
|
|
@ -6738,6 +6738,16 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
}
|
||||
}
|
||||
|
||||
#if defined( USE_NVRHI )
|
||||
// SP: reset the graphics state for validation layers
|
||||
currentVertexBuffer = nullptr;
|
||||
currentIndexBuffer = nullptr;
|
||||
currentJointBuffer = nullptr;
|
||||
currentVertexOffset = 0;
|
||||
currentIndexOffset = 0;
|
||||
currentJointOffset = 0;
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------
|
||||
// RB_BeginDrawingView
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue