diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-31 16:14:47 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-31 16:14:47 +0300 |
commit | 1804eb57fd27fceb0ed113e3ef2f4a55db0d03c8 (patch) | |
tree | 003ceca6cdb280e5f6fc408b6833dea8b36f2bd6 /source/blender/gpu/opengl/gl_vertex_array.cc | |
parent | 1b3a0ae2316063d9817210a8fe5fd4588cee47cf (diff) |
GPUImmediate: GL backend isolation
This is part of the Vulkan backend task T68990.
This is mostly a cleanup, however, there is a small change:
We don't use a special Vertex Array binding function for Immediate
anymore and just reuse the one for batches.
This might create a bit more state changes but this could be fixed
easily if it causes perf regression.
# Conflicts:
# source/blender/gpu/intern/gpu_context.cc
Diffstat (limited to 'source/blender/gpu/opengl/gl_vertex_array.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_vertex_array.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_vertex_array.cc b/source/blender/gpu/opengl/gl_vertex_array.cc index b2d2445f113..64d44c39587 100644 --- a/source/blender/gpu/opengl/gl_vertex_array.cc +++ b/source/blender/gpu/opengl/gl_vertex_array.cc @@ -155,6 +155,17 @@ void GLVertArray::update_bindings(const GLuint vao, } } +/* Another version of update_bindings for Immediate mode. */ +void GLVertArray::update_bindings(const GLuint vao, + const uint v_first, + const GPUVertFormat *format, + const ShaderInterface *interface) +{ + glBindVertexArray(vao); + + vbo_bind(interface, format, v_first, 0, false); +} + /** \} */ } // namespace blender::gpu
\ No newline at end of file |