diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-02-22 18:36:16 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-02-22 21:49:59 +0300 |
commit | e7c4a9d1ef76f6edff95ca9f418a65fc42a453dc (patch) | |
tree | 2d20005b66ce353117f66cd80e5bd98e1638ff1d /intern | |
parent | 8115162e989f3c1d45f69de93849fb1d075417df (diff) |
GWN: Fix immediate mode when closing a window.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/gawain/src/gwn_immediate.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/intern/gawain/src/gwn_immediate.c b/intern/gawain/src/gwn_immediate.c index f063665b423..0fe8e7a3f7c 100644 --- a/intern/gawain/src/gwn_immediate.c +++ b/intern/gawain/src/gwn_immediate.c @@ -28,8 +28,6 @@ typedef struct { #if IMM_BATCH_COMBO Gwn_Batch* batch; #endif - Gwn_Context* context; - // current draw call GLubyte* buffer_data; unsigned buffer_offset; @@ -88,8 +86,7 @@ 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_alloc(); - imm.context = GWN_context_active_get(); + imm.vao_id = GWN_vao_default(); } void immDeactivate(void) @@ -99,7 +96,6 @@ 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; } |