mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-11 21:32:17 +00:00
Unbind VBO from model during mid-frame
This commit is contained in:
parent
3d90488d17
commit
79fed1e954
1 changed files with 9 additions and 0 deletions
|
@ -1632,6 +1632,10 @@ static void CreateModelVBO(mesh_t *mesh, mdlframe_t *frame)
|
|||
pglBindBuffer(GL_ARRAY_BUFFER, frame->vboID);
|
||||
pglBufferData(GL_ARRAY_BUFFER, bufferSize, buffer, GL_STATIC_DRAW);
|
||||
free(buffer);
|
||||
|
||||
// Don't leave the array buffer bound to the model,
|
||||
// since this is called mid-frame
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
static void CreateModelVBOTiny(mesh_t *mesh, tinyframe_t *frame)
|
||||
|
@ -1673,6 +1677,11 @@ static void CreateModelVBOTiny(mesh_t *mesh, tinyframe_t *frame)
|
|||
pglBindBuffer(GL_ARRAY_BUFFER, frame->vboID);
|
||||
pglBufferData(GL_ARRAY_BUFFER, bufferSize, buffer, GL_STATIC_DRAW);
|
||||
free(buffer);
|
||||
|
||||
// Don't leave the array buffer bound to the model,
|
||||
// since this is called mid-frame
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT void HWRAPI(CreateModelVBOs) (model_t *model)
|
||||
|
|
Loading…
Reference in a new issue