-
- Downloads
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.
Showing
- intern/gawain/gawain/gwn_vertex_buffer.h 24 additions, 16 deletionsintern/gawain/gawain/gwn_vertex_buffer.h
- intern/gawain/src/gwn_vertex_buffer.c 99 additions, 111 deletionsintern/gawain/src/gwn_vertex_buffer.c
- source/blender/draw/intern/draw_instance_data.c 2 additions, 2 deletionssource/blender/draw/intern/draw_instance_data.c
Please register or sign in to comment