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-09 01:52:45 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-13 15:20:23 +0300
commit854c999d827cfb78938c3b4605707b891092d001 (patch)
tree6d066bbaa52689ddb6c5b4bcd692ab3e4da03dcb /source/blender/gpu/intern/gpu_immediate.cc
parent186abf7d3bab9ed8b905c6914de02427bb2547cf (diff)
GPUShader: Change shader state tracking to be part of the GPUContext
This remove the use of batch->program and replace it with batch->shader. This will allow GL abstraction latter.
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate.cc')
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc
index 9cededa54f7..08adefc9f12 100644
--- a/source/blender/gpu/intern/gpu_immediate.cc
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -171,12 +171,8 @@ void immBindBuiltinProgram(eGPUBuiltinShader shader_id)
void immUnbindProgram(void)
{
-#if TRUST_NO_ONE
- assert(imm.bound_program != NULL);
-#endif
-#if PROGRAM_NO_OPTI
- glUseProgram(0);
-#endif
+ BLI_assert(imm.bound_program != NULL);
+ GPU_shader_unbind();
imm.bound_program = NULL;
}