add CacheBuilder.align_4x4 option
If your backend requires texture updates to be aligned to 4x4 texel boundaries (e.g. WebGL), this option should be set to true
.
Without this option, the gpu cache does not properly work on WebGL. The three major browser all give errors when trying to update the texture with texSubImage2D
:
- Firefox:
Error: WebGL warning: texSubImage2D: Desired upload requires more data than is available: (34 rows plus 9 pixels needed, 26 rows plus 3 pixels available)
- Chrome:
WebGL: INVALID_OPERATION: texSubImage2D: ArrayBufferView not big enough for request
- Safari:
WebGL: INVALID_OPERATION: texSubImage2D: ArrayBufferView not big enough for request