glText icon indicating copy to clipboard operation
glText copied to clipboard

how to change the text background color?

Open zhl8223 opened this issue 4 years ago • 1 comments

zhl8223 avatar Aug 24 '20 05:08 zhl8223

Do you mean as in drawing a colored rectangle behind the text? If so, then the library itself does not support that (yet?).

Instead you'd have to "manually", issue the needed draw calls to draw a rectangle behind the text beforehand. You can use the functions gltGetTextWidth and gltGetTextHeight to query the bounds of the text, for the rectangle.

vallentin avatar Aug 24 '20 09:08 vallentin