libobs-opengl: Bind index buffers to VAO

To be able to use index buffers, they must also be bound to a vertex
array object along with the vertex buffers.

Ideally, if there are multiple index buffers for a vertex buffer,
separate VAOs should be created for each combination.
This commit is contained in:
jp9000
2016-04-19 15:30:14 -07:00
parent 8e4fdbbc20
commit ad0ee4d2d8
4 changed files with 7 additions and 9 deletions

View File

@@ -979,7 +979,7 @@ void device_draw(gs_device_t *device, enum gs_draw_mode draw_mode,
if (!program)
goto fail;
load_vb_buffers(program, device->cur_vertex_buffer);
load_vb_buffers(program, device->cur_vertex_buffer, ib);
if (program != device->cur_program && device->cur_program) {
glUseProgram(0);