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-12-08 20:15:57 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-10 21:02:17 +0300
commit33cc3344a26d674c1283c5fd8c007a63f0d8a5fc (patch)
tree0aaa98b8d88a68c7b4186e8df507d6d25cdd3d06 /source/blender/gpu/GPU_element.h
parenta99eb0ca689c8116964032faf8425cfba16759bc (diff)
GPU: Make changes to GPUIndexBuf and GPUVertBuf to allow multithreading
This is a small change. We delay all gl calls at the first use of the GPUIndexBuf / GPUVertBuf in order to be able to create multiple buffers from different threads without having many gl contexts.
Diffstat (limited to 'source/blender/gpu/GPU_element.h')
-rw-r--r--source/blender/gpu/GPU_element.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_element.h b/source/blender/gpu/GPU_element.h
index c16a3d8b4a1..b8a42b7c880 100644
--- a/source/blender/gpu/GPU_element.h
+++ b/source/blender/gpu/GPU_element.h
@@ -54,6 +54,7 @@ typedef struct GPUIndexBuf {
uint base_index;
#endif
uint32_t ibo_id; /* 0 indicates not yet sent to VRAM */
+ void *data; /* non-NULL indicates not yet sent to VRAM */
bool use_prim_restart;
} GPUIndexBuf;