Skip to content

Commit

Permalink
R_DStreams: Rebind the buffer before unmapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Mar 24, 2016
1 parent 59a054e commit 76b9cfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Layers/xrRender/R_DStreams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ void _VertexStream::Unlock ( u32 Count, u32 Stride)
VERIFY (pVB);

#if defined(USE_OGL)
glBindBuffer(GL_ARRAY_BUFFER, pVB);
CHK_GL(glUnmapBuffer(GL_ARRAY_BUFFER));
#elif defined(USE_DX11)
HW.pContext->Unmap(pVB, 0);
Expand Down Expand Up @@ -280,6 +281,7 @@ void _IndexStream::Unlock(u32 RealCount)
mPosition += RealCount;
VERIFY (pIB);
#if defined(USE_OGL)
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, pIB);
CHK_GL(glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER));
#elif defined(USE_DX11)
HW.pContext->Unmap(pIB, 0);
Expand Down

0 comments on commit 76b9cfa

Please sign in to comment.