I've spent the past couple of days just desperately trying to get stb_truetype to render anything using the simple example provided https://github.com/nothings/stb/blob/master/stb_truetype.h#L242-L281, however, no matter what I tried, the texture being loaded always ends up being completely black.
I've tried writing the generated texture data back to a .png file as
lodepng::encode("foopng", temp_bitmap, 512, 512, LCT_GREY);
and the font actually gets rendered properly
However, when I inspect the loaded texture in Nsight (or CodeXL), it looks completely black, and upon inspection of the actual data in the texture in CodeXL, it shows zeros basically everywhere, except for one small blob of a few non-zero numbers (which is nothing like the saved PNG).
I also tried changing to a different font and the generated quad geometry does change, as do the generated texture coordintes by
stbtt_GetBakedQuad(...) (I even tried to manually set the texture coordinates all the way from
1 on the edges of the quad).
I'm not sure if it's CodeXL and Nsight both mis-interpreting the contents of the texture, even though the data view in the screenshot shows each byte, but when rendering I also get everything rendered with this texture completely black.
Is the texture being loaded incorrectly, or am I doing something else wrong? I'm using OpenGL 4.4.