libobs: Add vertex/index buffer "direct" flush functions

(Note: This commit also modifies libobs-d3d11 and libobs-opengl)

Allows the ability to flush data directly without having to use the
buffer's internal data.

Allows the caller to manage his/her own vertex/index buffer data if
desired, working around the design flaw of having to rely on a
vertex/index buffer's internal data.
This commit is contained in:
jp9000
2017-11-27 02:19:48 -08:00
parent a46f0b4808
commit c111fa68b8
7 changed files with 118 additions and 34 deletions

View File

@@ -141,10 +141,12 @@ bool load_graphics_imports(struct gs_exports *exports, void *module,
GRAPHICS_IMPORT(gs_vertexbuffer_destroy);
GRAPHICS_IMPORT(gs_vertexbuffer_flush);
GRAPHICS_IMPORT(gs_vertexbuffer_flush_direct);
GRAPHICS_IMPORT(gs_vertexbuffer_get_data);
GRAPHICS_IMPORT(gs_indexbuffer_destroy);
GRAPHICS_IMPORT(gs_indexbuffer_flush);
GRAPHICS_IMPORT(gs_indexbuffer_flush_direct);
GRAPHICS_IMPORT(gs_indexbuffer_get_data);
GRAPHICS_IMPORT(gs_indexbuffer_get_num_indices);
GRAPHICS_IMPORT(gs_indexbuffer_get_type);