Commit: 7f67a69ad55ed5c3d87e1ea1948e750736f17576
Author: Clément Foucault
Date:   Fri Feb 23 17:18:54 2018 +0100
Branches: temp-drawcontext
https://developer.blender.org/rB7f67a69ad55ed5c3d87e1ea1948e750736f17576

Revert "GWN: Fix immediate mode when closing a window."

This reverts commit 3d3d7f6d55c9f82a2317c178740302bc819fcddb.

===================================================================

M       intern/gawain/src/gwn_immediate.c

===================================================================

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;
        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to