Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show text on the screen using OpenGL and C#

Tags:

c#

opengl

Situation: Simple 3D game project - OpenGL + C# I read that OpenGL functions doesn't support easily print the text on the screen. Have anyone clue how to do it? I don't need any too much sophisticated solution. I just need show for example FPS rate in one corner or show the number of picked up objects in anohter corner. thx.

like image 511
user1097772 Avatar asked Nov 21 '25 22:11

user1097772


1 Answers

One good method for text rendering is to use a texture with the font characters and draw one quad for each character with the good texturing coordinates. This usually gives good results and is platform independant. However this is quite heavy to implement.

like image 54
neodelphi Avatar answered Nov 24 '25 15:11

neodelphi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!