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/intern/gpu_texture.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/intern/gpu_texture.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc index 05b97129f00..b22fd53f0f6 100644 --- a/source/blender/gpu/intern/gpu_texture.cc +++ b/source/blender/gpu/intern/gpu_texture.cc @@ -386,7 +386,7 @@ void GPU_texture_update(GPUTexture *tex, eGPUDataFormat data_format, const void * Skipping pixels correctly when changing rows when doing partial update.*/ void GPU_unpack_row_length_set(uint len) { - GPU_context_active_get()->state_manager->texture_unpack_row_length_set(len); + Context::get()->state_manager->texture_unpack_row_length_set(len); } /* ------ Binding ------ */ @@ -398,24 +398,24 @@ void GPU_texture_bind_ex(GPUTexture *tex_, { Texture *tex = reinterpret_cast<Texture *>(tex_); state = (state >= GPU_SAMPLER_MAX) ? tex->sampler_state : state; - GPU_context_active_get()->state_manager->texture_bind(tex, state, unit); + Context::get()->state_manager->texture_bind(tex, state, unit); } void GPU_texture_bind(GPUTexture *tex_, int unit) { Texture *tex = reinterpret_cast<Texture *>(tex_); - GPU_context_active_get()->state_manager->texture_bind(tex, tex->sampler_state, unit); + Context::get()->state_manager->texture_bind(tex, tex->sampler_state, unit); } void GPU_texture_unbind(GPUTexture *tex_) { Texture *tex = reinterpret_cast<Texture *>(tex_); - GPU_context_active_get()->state_manager->texture_unbind(tex); + Context::get()->state_manager->texture_unbind(tex); } void GPU_texture_unbind_all(void) { - GPU_context_active_get()->state_manager->texture_unbind_all(); + Context::get()->state_manager->texture_unbind_all(); } void GPU_texture_generate_mipmap(GPUTexture *tex) |