diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-08 05:12:12 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-08 05:15:50 +0300 |
commit | 48690d967a7731367cda01ab8dca64e7f4c3f6b5 (patch) | |
tree | 9295cc0ef083fd50eaab2c62785d54545eb004c6 /source/blender/gpu/opengl/gl_vertex_buffer.cc | |
parent | d2e9de93b8d1d6cd45abce8164d0f92af8f636d0 (diff) |
GPUContext: Move GPUContext to gpu::Context for more consistency
This makes the GPUContext follow the same naming convention as the rest
of the module.
Also add a static getter for extra bonus style (no need for casts):
- Context::get()
- GLContext::get()
Diffstat (limited to 'source/blender/gpu/opengl/gl_vertex_buffer.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_vertex_buffer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/opengl/gl_vertex_buffer.cc b/source/blender/gpu/opengl/gl_vertex_buffer.cc index d56f5d1aa52..a724c94775e 100644 --- a/source/blender/gpu/opengl/gl_vertex_buffer.cc +++ b/source/blender/gpu/opengl/gl_vertex_buffer.cc @@ -52,7 +52,7 @@ void GLVertBuf::release_data(void) void GLVertBuf::duplicate_data(VertBuf *dst_) { - BLI_assert(GPU_context_active_get() != NULL); + BLI_assert(GLContext::get() != NULL); GLVertBuf *src = this; GLVertBuf *dst = static_cast<GLVertBuf *>(dst_); @@ -82,7 +82,7 @@ void GLVertBuf::upload_data(void) void GLVertBuf::bind(void) { - BLI_assert(GPU_context_active_get() != NULL); + BLI_assert(GLContext::get() != NULL); if (vbo_id_ == 0) { glGenBuffers(1, &vbo_id_); |