[Plib-cvs] plib/examples/src/fnt hello_world.cxx,NONE,1.1 Makefile.am,1.5,1.6
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-12-29 07:19:54
|
Update of /cvsroot/plib/plib/examples/src/fnt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10737/plib/examples/src/fnt Modified Files: Makefile.am Added Files: hello_world.cxx Log Message: Fixed some bugs in tweening. Added functions to dump Z buffer into ssgaScreenDump. --- NEW FILE: hello_world.cxx --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 2001 Steve Baker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net $Id: hello_world.cxx,v 1.1 2004/12/29 07:19:39 sjbaker Exp $ */ #include <plib/pw.h> #include <plib/fnt.h> int main ( int argc, char **argv ) { int w, h ; pwInit ( 100, 100, 230, 50, false, "FNT Hello World Demo", true, 0 ) ; pwSetCallbacks ( NULL, NULL, NULL, NULL, NULL ) ; pwGetSize ( &w, &h ) ; fntRenderer *text = new fntRenderer () ; text -> setFont ( new fntTexFont ( "data/Helvetica.txf" ) ) ; text -> setPointSize ( 30.0f ) ; glEnable ( GL_ALPHA_TEST ) ; glEnable ( GL_BLEND ) ; glAlphaFunc ( GL_GREATER, 0.1f ) ; glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ; glMatrixMode ( GL_PROJECTION ) ; glLoadIdentity () ; glOrtho ( 0, w, 0, h, -1, 1 ) ; while ( 1 ) { glClearColor ( 0.1f, 0.4f, 0.1f, 1.0f ) ; glClear ( GL_COLOR_BUFFER_BIT ) ; text -> begin () ; glColor3f ( 1.0f, 1.0f, 0.0f ) ; text -> start2f ( 10.0f, 10.0f ) ; text -> puts ( "Hello World." ) ; text -> end () ; pwSwapBuffers () ; } return 0 ; } Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/examples/src/fnt/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 1 Sep 2002 05:22:24 -0000 1.5 +++ Makefile.am 29 Dec 2004 07:19:39 -0000 1.6 @@ -1,13 +1,16 @@ if BUILD_FNT -noinst_PROGRAMS = fnt_test slideshow +noinst_PROGRAMS = fnt_test slideshow hello_world + +hello_world_SOURCES = hello_world.cxx fnt_test_SOURCES = fnt_test.cxx slideshow_SOURCES = slideshow.cxx -fnt_test_LDADD = -lplibfnt -lplibsg -lplibul $(GLUT_LIBS) $(OGL_LIBS) -slideshow_LDADD = -lplibfnt -lplibsg -lplibul $(GLUT_LIBS) $(OGL_LIBS) +hello_world_LDADD = -lplibpw -lplibfnt -lplibsg -lplibul $(OGL_LIBS) +fnt_test_LDADD = -lplibfnt -lplibsg -lplibul $(GLUT_LIBS) $(OGL_LIBS) +slideshow_LDADD = -lplibfnt -lplibsg -lplibul $(GLUT_LIBS) $(OGL_LIBS) endif |