Closed pezcode closed 5 years ago
I'm setting a texture handle for font rendering, and the texture ID carried through cmd->TextureId never makes it. The bug is here:
cmd->TextureId
https://github.com/JoshuaBrookover/bigg/blob/8bad04fedb6a0a52da483087cf1a051e5cc5007f/src/bigg_imgui.hpp#L112
If cmd->TextureId is 2, then flags wrongly ends up being 2 and handle 0. This looks like an issue with endianness. Not sure why that flags bit is there, it should be enough to simply cast cmd->TextureId to a uint16_t for bgfx.
flags
handle
uint16_t
I'd be happy to send a PR with a fix.
Ah yeah, it looks like maybe this code was copied from elsewhere. I would merge a PR with the fix.
Thanks
I'm setting a texture handle for font rendering, and the texture ID carried through
cmd->TextureId
never makes it. The bug is here:https://github.com/JoshuaBrookover/bigg/blob/8bad04fedb6a0a52da483087cf1a051e5cc5007f/src/bigg_imgui.hpp#L112
If
cmd->TextureId
is 2, thenflags
wrongly ends up being 2 andhandle
0. This looks like an issue with endianness. Not sure why that flags bit is there, it should be enough to simply castcmd->TextureId
to auint16_t
for bgfx.I'd be happy to send a PR with a fix.