Fixed a regression issue where excessive memory was allocated

for the GLVolumes before sending to the GPU driver. The following commits
were partially reverted:

4269c8b23c Removed GLVolume non-VBO rendering
d15698e21e GLVolume and GLIndexedVertexArray refactored to send data to gpu at the first render call

Namely, the GLVolume buffers are "shrink to size"'d before sending their
content to the OpenGL driver, and the vertex buffers are populated
as quickly as possible from the GLVolume, so that the same buffer is not
kept twice in RAM on systems, where the RAM is shared with the graphics
card.

Also the memory allocation reporting was improved for the GLVolumes.
This commit is contained in:
bubnikv 2019-08-05 14:30:32 +02:00
parent 28cc595350
commit 731e5abd88
5 changed files with 208 additions and 110 deletions

View file

@ -100,6 +100,7 @@ void Selection::set_volumes(GLVolumePtrs* volumes)
update_valid();
}
// Init shall be called from the OpenGL render function, so that the OpenGL context is initialized!
bool Selection::init()
{
if (!m_arrow.init())