GPUImmediate: GL backend isolation

This is part of the Vulkan backend task T68990.

This is mostly a cleanup, however, there is a small change:
We don't use a special Vertex Array binding function for Immediate
anymore and just reuse the one for batches.
This might create a bit more state changes but this could be fixed
easily if it causes perf regression.

# Conflicts:
#	source/blender/gpu/intern/gpu_context.cc
This commit is contained in:
2020-08-31 15:14:47 +02:00
parent 1b3a0ae231
commit 1804eb57fd
11 changed files with 558 additions and 352 deletions

View File

@@ -155,6 +155,17 @@ void GLVertArray::update_bindings(const GLuint vao,
}
}
/* Another version of update_bindings for Immediate mode. */
void GLVertArray::update_bindings(const GLuint vao,
const uint v_first,
const GPUVertFormat *format,
const ShaderInterface *interface)
{
glBindVertexArray(vao);
vbo_bind(interface, format, v_first, 0, false);
}
/** \} */
} // namespace blender::gpu