[Plib-cvs] plib/examples/src/fnt fnt_test.cxx,1.5,1.6
Brought to you by:
sjbaker
From: Sebastian U. <ud...@us...> - 2002-08-15 00:38:08
|
Update of /cvsroot/plib/plib/examples/src/fnt In directory usw-pr-cvs1:/tmp/cvs-serv30340 Modified Files: fnt_test.cxx Log Message: Updated to use the new fonts Index: fnt_test.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/fnt/fnt_test.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- fnt_test.cxx 8 Jan 2002 08:53:09 -0000 1.5 +++ fnt_test.cxx 15 Aug 2002 00:38:06 -0000 1.6 @@ -13,33 +13,68 @@ fntRenderer *text ; -#define MAX_FONTS 20 - -const char *font_names [ MAX_FONTS ] = +const char *font_names [] = { - "sorority.txf", /* This is the default */ - "charter.txf", - "courier-bold.txf", [...69 lines suppressed...] +/* "old/times_bold.txf", + "old/times_medium.txf", + "old/typewriter.txf", */ NULL } ; -fntTexFont *font_list [ MAX_FONTS ] ; +fntTexFont **font_list ; int cur_font = 0 ; int max_font = 0 ; @@ -171,6 +206,8 @@ int main ( int argc, char **argv ) { + font_list = new fntTexFont* [ sizeof(font_names) / sizeof(font_names[0]) ] ; + glutInitWindowPosition ( 0, 0 ) ; glutInitWindowSize ( 640, 480 ) ; glutInit ( &argc, argv ) ; |