Skip to content

Commit 76b9cfa

Browse files
committed
R_DStreams: Rebind the buffer before unmapping.
1 parent 59a054e commit 76b9cfa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Layers/xrRender/R_DStreams.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ void _VertexStream::Unlock ( u32 Count, u32 Stride)
142142
VERIFY (pVB);
143143

144144
#if defined(USE_OGL)
145+
glBindBuffer(GL_ARRAY_BUFFER, pVB);
145146
CHK_GL(glUnmapBuffer(GL_ARRAY_BUFFER));
146147
#elif defined(USE_DX11)
147148
HW.pContext->Unmap(pVB, 0);
@@ -280,6 +281,7 @@ void _IndexStream::Unlock(u32 RealCount)
280281
mPosition += RealCount;
281282
VERIFY (pIB);
282283
#if defined(USE_OGL)
284+
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, pIB);
283285
CHK_GL(glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER));
284286
#elif defined(USE_DX11)
285287
HW.pContext->Unmap(pIB, 0);

0 commit comments

Comments
 (0)