diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 02:20:55 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 14:59:51 +0300 |
commit | c38debd39fac1e3d44b84e8092419da34f0b613d (patch) | |
tree | bba08fc983f7e18025f4e09fa346737053ba4ed0 /source/blender/gpu/opengl/gl_vertex_array.cc | |
parent | bb2aeb4504907cab1cf8c4afc4dd1d6495c940e4 (diff) |
GPUVertBuf: GL Backend Isolation
Part of the Vulkan port T68990
This makes a few changes in how the data is being handled by the
backend to allow more flexibility in the future.
The overall code logic is left unchanged.
Diffstat (limited to 'source/blender/gpu/opengl/gl_vertex_array.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_vertex_array.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/opengl/gl_vertex_array.cc b/source/blender/gpu/opengl/gl_vertex_array.cc index 463dc18cc60..4e49828d39d 100644 --- a/source/blender/gpu/opengl/gl_vertex_array.cc +++ b/source/blender/gpu/opengl/gl_vertex_array.cc @@ -122,7 +122,7 @@ void GLVertArray::update_bindings(const GLuint vao, for (int v = GPU_BATCH_VBO_MAX_LEN - 1; v > -1; v--) { GLVertBuf *vbo = batch->verts_(v); if (vbo) { - GPU_vertbuf_use(batch->verts[v]); + vbo->bind(); attr_mask &= ~vbo_bind(interface, &vbo->format, 0, vbo->vertex_len, false); } } @@ -130,7 +130,7 @@ void GLVertArray::update_bindings(const GLuint vao, for (int v = GPU_BATCH_INST_VBO_MAX_LEN - 1; v > -1; v--) { GLVertBuf *vbo = batch->inst_(v); if (vbo) { - GPU_vertbuf_use(batch->inst[v]); + vbo->bind(); attr_mask &= ~vbo_bind(interface, &vbo->format, base_instance, vbo->vertex_len, true); } } |