Difference between revisions of "Talk:Programming OpenGL in Linux: Programming Animations with GLX and Xlib"

From OpenGL Wiki
Jump to navigation Jump to search
(Created page with "Reguarding the section entitled: FIND A FONT<br> Everytime I use this eggcellent example, the font stuff is broken.<br> Rather than having code in a for loop just to hope for...")
 
 
Line 1: Line 1:
Reguarding the section entitled: FIND A FONT<br>
+
== Reguarding the section entitled: FIND A FONT ==
Everytime I use this eggcellent example, the font stuff is broken.<br>
+
 
 +
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:
 
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:
<br><br>
+
 
<code>
+
<source lang="cpp">
 
font_struct = XLoadQueryFont(dpy, "10x20");
 
font_struct = XLoadQueryFont(dpy, "10x20");
 
if(font_struct != NULL)
 
if(font_struct != NULL)
Line 9: Line 11:
 
glXUseXFont(font_struct->fid, 32, 192, 32);           
 
glXUseXFont(font_struct->fid, 32, 192, 32);           
 
}
 
}
</code>
+
</source>
<br><br>
+
 
 
Wiki made it a oneliner, whatever, if it works it should still work.
 
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. [[User:Alfonse|Alfonse]] ([[User talk:Alfonse|talk]]) 04:47, 28 December 2019 (UTC)

Latest revision as of 04:47, 28 December 2019

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)