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:
authorMike Erwin <significant.bit@gmail.com>2016-11-29 08:08:07 +0300
committerMike Erwin <significant.bit@gmail.com>2016-11-29 08:08:07 +0300
commit4af42f06c34f3c3dd74df10b83fc59dea9a9cfb8 (patch)
treef84986f16964a28be076458f5d0ad983b48060df /source/blender/gpu/gawain/immediate.c
parent328a47fa2cc6f8e76ac83d6cba14b9bd24c0dd52 (diff)
Gawain: immediate mode uses buffer ID funcs
These functions are called very infrequently.
Diffstat (limited to 'source/blender/gpu/gawain/immediate.c')
-rw-r--r--source/blender/gpu/gawain/immediate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/gpu/gawain/immediate.c b/source/blender/gpu/gawain/immediate.c
index 72b1014061d..03e16ca248e 100644
--- a/source/blender/gpu/gawain/immediate.c
+++ b/source/blender/gpu/gawain/immediate.c
@@ -11,6 +11,7 @@
#include "immediate.h"
#include "attrib_binding.h"
+#include "buffer_id.h"
#include <string.h>
// necessary functions from matrix API
@@ -61,7 +62,7 @@ void immInit()
memset(&imm, 0, sizeof(Immediate));
- glGenBuffers(1, &imm.vbo_id);
+ imm.vbo_id = buffer_id_alloc();
glBindBuffer(GL_ARRAY_BUFFER, imm.vbo_id);
glBufferData(GL_ARRAY_BUFFER, IMM_BUFFER_SIZE, NULL, GL_DYNAMIC_DRAW);
@@ -87,7 +88,7 @@ void immActivate()
assert(imm.vao_id == 0);
#endif
- glGenVertexArrays(1, &imm.vao_id);
+ imm.vao_id = vao_id_alloc();
}
void immDeactivate()
@@ -98,7 +99,7 @@ void immDeactivate()
assert(imm.vao_id != 0);
#endif
- glDeleteVertexArrays(1, &imm.vao_id);
+ vao_id_free(imm.vao_id);
imm.vao_id = 0;
imm.prev_enabled_attrib_bits = 0;
}
@@ -106,7 +107,7 @@ void immDeactivate()
void immDestroy()
{
immDeactivate();
- glDeleteBuffers(1, &imm.vbo_id);
+ buffer_id_free(imm.vbo_id);
initialized = false;
}