khdani's picture

Font Help

Hello,
How can I draw text in 3D coordinates?
Does OpenTK has bindings for wglUseFontOutlines and GLYPHMETRICSFLOAT ?
Thank You!


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
objarni's picture

Simple answer: The OpenTK Font API does not support that. It's top-of-screen-only.

But there might be some tricks to access the font-APIs glyph (vertice) data for fonts anyway, someone know howto?

That way you could possibly draw text yourself wherever you want it.

khdani's picture

OK, I used Tao Framework to access the wglUseFontOutlines and GLYPHMETRICSFLOAT. It draws the text in 3D coordinates, though with some performance hit. However the text doesn't seems to be affected by any colors, it just drawn in grey color for some reason and I can't change it, I tried disabling any lighting and tried any colors variation it just doesn't affect the text. Is there a particular reason for that or is it something with my code?

khdani's picture

Found the problem, I had to disable Texturing.

Thanks Objarni.

objarni's picture

You're welcome but I think you found the solution without my help :)