mirror of https://github.com/bjornbytes/lovr.git
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:
parent
1d7e8519d6
commit
25fe88b493
|
@ -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[] = {
|
||||
|
|
Loading…
Reference in New Issue