Best way to draw text with OpenGL and Cocoa?

Question :

Best way to draw text with OpenGL and Cocoa?,

Answer :

Does anyone know an easy way to draw arbitrary text in a Cocoa NSOpenGLView? I have a couple of constraints.

  • The text on screen may change from frame to frame (for example, a framerate display in the corner)
  • I would like to be able to select any font installed on the system at any size

,

Have you taken a look at the It includes “a texture class for strings, showing how to use an NSImage to write a string into and then texture from for high quality font rendering.”

Read More  Where is a good place to start programming GUIs for windows?

That’s the answer Best way to draw text with OpenGL and Cocoa?, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you