Follow-up of d0d89a4d5b - Fixed warnings

This commit is contained in:
enricoturri1966 2022-03-14 09:50:25 +01:00
parent 2922710cc4
commit 5586fd92f2

View File

@ -1551,13 +1551,13 @@ void ImGuiWrapper::render_draw_data(ImDrawData *draw_data)
glsafe(::glGenBuffers(1, &vbo_id)); glsafe(::glGenBuffers(1, &vbo_id));
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, vbo_id)); glsafe(::glBindBuffer(GL_ARRAY_BUFFER, vbo_id));
glsafe(::glBufferData(GL_ARRAY_BUFFER, vtx_buffer_size, nullptr, GL_STREAM_DRAW)); glsafe(::glBufferData(GL_ARRAY_BUFFER, vtx_buffer_size, nullptr, GL_STREAM_DRAW));
glsafe(::glBufferSubData(GL_ARRAY_BUFFER, 0, vtx_buffer_size, (const GLvoid*)cmd_list->VtxBuffer.Data)); glsafe(::glBufferSubData(GL_ARRAY_BUFFER, 0, vtx_buffer_size, (const GLvoid*)vtx_buffer));
GLuint ibo_id; GLuint ibo_id;
glsafe(::glGenBuffers(1, &ibo_id)); glsafe(::glGenBuffers(1, &ibo_id));
glsafe(::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo_id)); glsafe(::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo_id));
glsafe(::glBufferData(GL_ELEMENT_ARRAY_BUFFER, idx_buffer_size, nullptr, GL_STREAM_DRAW)); glsafe(::glBufferData(GL_ELEMENT_ARRAY_BUFFER, idx_buffer_size, nullptr, GL_STREAM_DRAW));
glsafe(::glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, idx_buffer_size, (const GLvoid*)cmd_list->IdxBuffer.Data)); glsafe(::glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, idx_buffer_size, (const GLvoid*)idx_buffer));
const int position_id = shader->get_attrib_location("Position"); const int position_id = shader->get_attrib_location("Position");
if (position_id != -1) { if (position_id != -1) {