Talk:Programming OpenGL in Linux: Programming Animations with GLX and Xlib

From OpenGL Wiki
Jump to navigation Jump to search

Reguarding the section entitled: FIND A FONT

Everytime I use this eggcellent example, the font stuff is broken.

Rather than having code in a for loop just to hope for fonts, which, in my case are not there, I have to substitute in the SIMPLEST of code below:

font_struct = XLoadQueryFont(dpy, "10x20");
if(font_struct != NULL)
{
		glXUseXFont(font_struct->fid, 32, 192, 32);          
}

Wiki made it a oneliner, whatever, if it works it should still work.

If you feel you have an improvement for a page, you can go ahead and make the change. You don't have to ask permission if you know your code would work. Also, don't forget to sign your posts on talk pages. Alfonse (talk) 04:47, 28 December 2019 (UTC)