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>2019-05-29 01:08:10 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-30 14:42:21 +0300
commit77f5210f22332b3594fabe08bee5809fc8333dba (patch)
tree82f8fbba7d762d30363a40eb9d41f0df828d7586 /source/blender/draw/intern/draw_cache.c
parentdc0c490b7601b4dced13be6a9877f68ee9712736 (diff)
GPU: Remove GPU_INDEX_U8
This type of indices is not natively supported on modern GPU and gives warning on some implementation. The memory savings it provides is also quite minimal and unlikely to be visible on nowadays hardware. This remove some uneeded struct members and makes primitive restart always enabled by default. This can be broken by addons if they are not careful enough but many other states have this problem. Also leverage GL_PRIMITIVE_RESTART_FIXED_INDEX if ARB_ES3_compatibility is supported. This removes all API calls to change restart index depending on indices length.
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r--source/blender/draw/intern/draw_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index c40e9772340..88125e884d5 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -2707,7 +2707,7 @@ GPUBatch *DRW_cache_bone_stick_get(void)
GPU_vertbuf_data_alloc(vbo, vcount);
GPUIndexBufBuilder elb;
- GPU_indexbuf_init_ex(&elb, GPU_PRIM_TRI_FAN, (CIRCLE_RESOL + 2) * 2 + 6 + 2, vcount, true);
+ GPU_indexbuf_init_ex(&elb, GPU_PRIM_TRI_FAN, (CIRCLE_RESOL + 2) * 2 + 6 + 2, vcount);
/* head/tail points */
for (int i = 0; i < 2; ++i) {
@@ -3931,7 +3931,7 @@ GPUBatch *DRW_cache_cursor_get(bool crosshair_lines)
}
GPUIndexBufBuilder elb;
- GPU_indexbuf_init_ex(&elb, GPU_PRIM_LINE_STRIP, index_len, vert_len, true);
+ GPU_indexbuf_init_ex(&elb, GPU_PRIM_LINE_STRIP, index_len, vert_len);
GPUVertBuf *vbo = GPU_vertbuf_create_with_format(&format);
GPU_vertbuf_data_alloc(vbo, vert_len);