Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-08 05:12:12 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-08 05:15:50 +0300
commit48690d967a7731367cda01ab8dca64e7f4c3f6b5 (patch)
tree9295cc0ef083fd50eaab2c62785d54545eb004c6 /source/blender/gpu/intern/gpu_shader.cc
parentd2e9de93b8d1d6cd45abce8164d0f92af8f636d0 (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_shader.cc')
-rw-r--r--source/blender/gpu/intern/gpu_shader.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index eb0f7935b63..1bd076f96f8 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -457,7 +457,7 @@ void GPU_shader_bind(GPUShader *gpu_shader)
{
Shader *shader = unwrap(gpu_shader);
- GPUContext *ctx = GPU_context_active_get();
+ Context *ctx = Context::get();
if (ctx->shader != shader) {
ctx->shader = shader;
@@ -474,7 +474,7 @@ void GPU_shader_bind(GPUShader *gpu_shader)
void GPU_shader_unbind(void)
{
#ifndef NDEBUG
- GPUContext *ctx = GPU_context_active_get();
+ Context *ctx = Context::get();
if (ctx->shader) {
ctx->shader->unbind();
}