Fix T45654 fast navigate artifacts.

Was overdrawing the buffer, in case of fast drawing just use one
draw call. Should also make performance quite smoother.

Note:
Just discovered we are doing one draw call - per grid - in multires
apparently to keep reusing the same element buffer.
This is horribly, dreadfully slow and will check about fixing it later.
This commit is contained in:
2015-08-03 17:47:03 +02:00
parent e5f7b0f330
commit e90fea72c1

View File

@@ -2012,7 +2012,7 @@ void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial,
if (buffers->tot_quad) {
const char *offset = base;
int i, last = buffers->has_hidden ? 1 : buffers->totgrid;
int i, last = (buffers->has_hidden || do_fast) ? 1 : buffers->totgrid;
for (i = 0; i < last; i++) {
glVertexPointer(3, GL_FLOAT, sizeof(VertexBufferFormat),
offset + offsetof(VertexBufferFormat, co));