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-08-11 02:31:40 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-13 15:20:24 +0300
commitefc97b3919ea4fd46b9d2e931ca3fea27e7ea31c (patch)
tree125e4239c90902a967487f44d5aca1696d49be68 /source/blender/gpu/intern/gpu_shader.cc
parent47bfb0f7ad2f70017585fe55a68e49ae09f1150c (diff)
GPUBatch: GL backend isolation
This changes the drawing paradigm a bit. The VAO configuration is done JIT-style and depends on context active shader. This is to allow more flexibility for implementations to do optimization at lower level. The vao cache is now its own class to isolate the concept. It is this class that is reference by the GLContext for ownership of the containing VAO ids.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader.cc')
-rw-r--r--source/blender/gpu/intern/gpu_shader.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index 508d9112fc0..e4af25500af 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -575,6 +575,10 @@ void GPU_shader_bind(GPUShader *shader)
GPU_matrix_bind(shader->interface);
GPU_shader_set_srgb_uniform(shader->interface);
}
+
+ if (GPU_matrix_dirty_get()) {
+ GPU_matrix_bind(shader->interface);
+ }
}
void GPU_shader_unbind(void)