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>2017-10-02 23:16:50 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-10-02 23:16:50 +0300
commit2bd36338d3ff809c104fe4a30e9332a2929f10c2 (patch)
treef9ccdba117b94c5f71654386fa61c9d58cee70f8 /intern/gawain/src/gwn_batch.c
parentc548c76804e49d8c708aa42dacb87c5df1321d00 (diff)
Gawain : Add workaround to fix bad sync of the program_in_use flag.
Diffstat (limited to 'intern/gawain/src/gwn_batch.c')
-rw-r--r--intern/gawain/src/gwn_batch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/gawain/src/gwn_batch.c b/intern/gawain/src/gwn_batch.c
index 359ca956495..c651fb3a26f 100644
--- a/intern/gawain/src/gwn_batch.c
+++ b/intern/gawain/src/gwn_batch.c
@@ -110,6 +110,14 @@ void GWN_batch_program_set(Gwn_Batch* batch, GLuint program, const Gwn_ShaderInt
GWN_batch_program_use_begin(batch); // hack! to make Batch_Uniform* simpler
}
+// fclem : hack !
+// we need this because we don't want to unbind the shader between drawcalls
+// but we still want the correct shader to be bound outside the draw manager
+void GWN_batch_program_unset(Gwn_Batch* batch)
+ {
+ batch->program_in_use = false;
+ }
+
static void Batch_update_program_bindings(Gwn_Batch* batch)
{
// disable all as a precaution