Limit UBO size in WebGL;

Currently glBindBufferRange does not seem to work properly if the
offset is bigger than the maximum size of a uniform buffer.  The
size of the draw data buffer is being limited as a workaround.
This commit is contained in:
bjorn 2019-03-14 13:40:19 -07:00
parent 1d7e8519d6
commit 25fe88b493
1 changed files with 4 additions and 0 deletions

View File

@ -34,7 +34,11 @@ static const size_t BUFFER_COUNTS[] = {
[STREAM_VERTEX] = (1 << 16) - 1,
[STREAM_INDEX] = 1 << 16,
[STREAM_DRAW_ID] = (1 << 16) - 1,
#ifdef LOVR_WEBGL // Temporarily work around bug where big UBOs don't work
[STREAM_DRAW_DATA] = 768
#else
[STREAM_DRAW_DATA] = 256 * MAX_BATCHES * 2
#endif
};
static const size_t BUFFER_STRIDES[] = {