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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user