2011-04-05 68 views

回答

2

使用鄰下稱爲GLFont工具查看您可以像

glFontBegin(&font); 
    glScalef(8.0, 8.0, 8.0); 
    glTranslatef(30, 30, 0); 
    glFontTextOut("Test", 5, 5, 0); 
    glFontEnd(); 
    glFlush(); 

,你可以在這裏找到它http://students.cs.byu.edu/~bfish/glfontdl.php

我記得有下的OpenGL可以把文字在屏幕上太多的功能輸出文本。 檢查: http://www.opengl.org/resources/features/fontsurvey/

編輯:檢查此鏈接了太多http://mycodelog.com/2010/03/23/printw/

用法是調用printf的那樣簡單:

printf("char: %c, decimal: %d, float: %f, string: %s", 'X', 1618, 1.618, "text"); 
    printw(x, y, z, "char: %c, decimal: %d, float: %f, string: %s", 'X', 1618, 1.618, "text"); 
相關問題