Tech ENABLE_LEGACY_OPENGL_REMOVAL - Fix into GLModel::send_to_gpu()

This commit is contained in:
enricoturri1966 2022-03-23 13:16:51 +01:00
parent 3cecd07011
commit 4b4ed423ef

View File

@ -1130,6 +1130,7 @@ bool GLModel::send_to_gpu()
glsafe(::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0));
}
else {
data.index_type = Geometry::EIndexType::UINT;
glsafe(::glBufferData(GL_ELEMENT_ARRAY_BUFFER, data.indices_size_bytes(), data.indices.data(), GL_STATIC_DRAW));
glsafe(::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0));
}