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>2018-02-26 22:09:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-02-26 22:09:54 +0300
commite94276d4033c72000942a49100e552e800d09e58 (patch)
treee690f20954dd094911bbf512bbafa50de617095a /intern/gawain
parentc17042bc6d43de4b71973ea7dcc9ca434363162f (diff)
GWN: Fix glitches when closing a window.
Diffstat (limited to 'intern/gawain')
-rw-r--r--intern/gawain/src/gwn_immediate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/gawain/src/gwn_immediate.c b/intern/gawain/src/gwn_immediate.c
index 0fe8e7a3f7c..f063665b423 100644
--- a/intern/gawain/src/gwn_immediate.c
+++ b/intern/gawain/src/gwn_immediate.c
@@ -28,6 +28,8 @@ typedef struct {
#if IMM_BATCH_COMBO
Gwn_Batch* batch;
#endif
+ Gwn_Context* context;
+
// current draw call
GLubyte* buffer_data;
unsigned buffer_offset;
@@ -86,7 +88,8 @@ void immActivate(void)
assert(imm.prim_type == GWN_PRIM_NONE); // make sure we're not between a Begin/End pair
assert(imm.vao_id == 0);
#endif
- imm.vao_id = GWN_vao_default();
+ imm.vao_id = GWN_vao_alloc();
+ imm.context = GWN_context_active_get();
}
void immDeactivate(void)
@@ -96,6 +99,7 @@ void immDeactivate(void)
assert(imm.prim_type == GWN_PRIM_NONE); // make sure we're not between a Begin/End pair
assert(imm.vao_id != 0);
#endif
+ GWN_vao_free(imm.vao_id, imm.context);
imm.vao_id = 0;
imm.prev_enabled_attrib_bits = 0;
}