Blender Git Loki

Git Commits -> Revision 87d8858

Revision 87d8858 by Clément Foucault (master)
March 17, 2018, 15:59 (GMT)
GWN: Vertex Buffer refactor.

We now alloc a vbo id on creation and let OpenGL manage its memory directly.
We use glMapBuffer to get this memory location.

This enables us to reuse and modify any vertex buffer directly without
destroying it with its associated Batches.

This commit does not really improve performance but will let us implement
more optimizations in the future.

We can also resize the buffer even if this can be slow if we need to keep
the existing data.

The addition of the usage hint makes dynamic buffers not a special case
anymore, simplifying things a bit.

Commit Details:

Full Hash: 87d88581aaec4abc4fc326a213dfc0d68c39cb3a
Parent Commit: dd44248
Lines Changed: +125, -129

3 Modified Paths:

/intern/gawain/gawain/gwn_vertex_buffer.h (+24, -16) (Diff)
/intern/gawain/src/gwn_vertex_buffer.c (+99, -111) (Diff)
/source/blender/draw/intern/draw_instance_data.c (+2, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021