mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
e5da24f490
When a lot of lines are being drawn, this can overflow the vertex buffer, causing a crash in `nvgRenderFlush`. While the underlying code handles this case in an okay manner (truncating the vertex buffer instead of crashing), the `nvgRenderFlush` code is missing a check for this case, causing it to think it has more space than was allocated. I tried to fix it with multiple buffers as mentioned in #160, however it seems more complex than it appears. This fix just makes it truncate the output according to the actual allocated amount of bytes in the vertex buffer, so it doesn't crash at least. |
||
---|---|---|
.. | ||
fontstash.h | ||
fs_nanovg_fill.bin.h | ||
fs_nanovg_fill.sc | ||
makefile | ||
nanovg.cpp | ||
nanovg.h | ||
nanovg_bgfx.cpp | ||
varying.def.sc | ||
vs_nanovg_fill.bin.h | ||
vs_nanovg_fill.sc |