How to draw text using only OpenGL methods?

后端 未结 6 1367
暗喜
暗喜 2020-11-28 02:05

I don\'t have the option to use but OpenGL methods (that is glxxx() methods). I need to draw text using gl methods only. After reading the red book, I understan

6条回答
  •  自闭症患者
    2020-11-28 02:44

    Load an image with characters as texture and draw the part of that texture depending on what character you want. You can create that texture using a paint program, hardcode it or use a window component to draw to an image and retrieve that image for an exact copy of system fonts.

    No need to use Glut or any other extension, just basic OpenGL operability. It gets the job done, not to mention that its been done like this for decades by professional programmers in very succesfull games and other applications.

提交回复
热议问题