Hey there! I'm using a port of nanovg on the Nintendo Switch, and I encountered a weird problem today. I'm dynamically generating a bitmap (right now only a red box), and I want to feed that into nvgCreateImageMem.
Below you can find my code to generate the bitmap file:
Now, this works pretty good (both with bitmaps with clean resolutions like 256x256 and odd resolutions like 170x170). Also, you can see I got a test file written to see whether the bitmap is valid, and it is. Windows can view it without problems. However, trying to display it on the Switch using nanovg prints out
Failed to load outofmem
to the console - which is weird, because it succeeds with loading the exact same bitmap from file and not from memory. Any idea whats happening?
Hey there! I'm using a port of nanovg on the Nintendo Switch, and I encountered a weird problem today. I'm dynamically generating a bitmap (right now only a red box), and I want to feed that into
nvgCreateImageMem
.Below you can find my code to generate the bitmap file:
Actually generating the image (right now only red pixels):
Then, the data is loaded using
nvgCreateImageMem
.Now, this works pretty good (both with bitmaps with clean resolutions like 256x256 and odd resolutions like 170x170). Also, you can see I got a test file written to see whether the bitmap is valid, and it is. Windows can view it without problems. However, trying to display it on the Switch using nanovg prints out
to the console - which is weird, because it succeeds with loading the exact same bitmap from file and not from memory. Any idea whats happening?