We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The goal is to create a buffer pool to alleviate the stuttering caused by creating/destroying buffers.
The general idea is to first allocate a large buffer (using glBufferData), and then perform sub-allocation (using glMapBufferRange).
glBufferData
glMapBufferRange
In practice, we allocated an 8MB buffer using glBufferData, then performed sub-allocation via glMapBufferRange, with each sub-allocation being 8KB.
During the process, it was observed that this 8MB buffer suddenly shrank to less than 1MB at a certain stage, causing glMapBufferRangeto fail.
The buffer size is obtained using glGetBufferParameterivin conjunction with GL_BUFFER_SIZE.
glGetBufferParameteriv
GL_BUFFER_SIZE
We have self-checked the application and confirmed that no glBufferDatacalls have been made to modify the buffer size. Could you suggest any methods or tools to diagnose why the buffer suddenly shrank?
thanks