mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-09 14:10:33 +01:00
vbo: create the immediate mode buffer only in vbo_exec_vtx_map
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
This commit is contained in:
parent
f89ee44ab0
commit
10cf7a5113
1 changed files with 0 additions and 10 deletions
|
|
@ -973,9 +973,6 @@ vbo_use_buffer_objects(struct gl_context *ctx)
|
|||
* go into the bufferobj hashtable.
|
||||
*/
|
||||
GLuint bufName = IMM_BUFFER_NAME;
|
||||
GLenum target = GL_ARRAY_BUFFER_ARB;
|
||||
GLenum usage = GL_STREAM_DRAW_ARB;
|
||||
GLsizei size = VBO_VERT_BUFFER_SIZE;
|
||||
|
||||
/* Make sure this func is only used once */
|
||||
assert(exec->vtx.bufferobj == ctx->Shared->NullBufferObj);
|
||||
|
|
@ -987,13 +984,6 @@ vbo_use_buffer_objects(struct gl_context *ctx)
|
|||
/* Allocate a real buffer object now */
|
||||
_mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL);
|
||||
exec->vtx.bufferobj = ctx->Driver.NewBufferObject(ctx, bufName);
|
||||
if (!ctx->Driver.BufferData(ctx, target, size, NULL, usage,
|
||||
GL_MAP_WRITE_BIT |
|
||||
GL_DYNAMIC_STORAGE_BIT |
|
||||
GL_CLIENT_STORAGE_BIT,
|
||||
exec->vtx.bufferobj)) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "VBO allocation");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue