[Plib-cvs] plib/examples/src/pw pw_pui.cxx,NONE,1.1 Makefile.am,1.1,1.2
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-02-17 01:51:50
|
Update of /cvsroot/plib/plib/examples/src/pw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26747/plib/examples/src/pw Modified Files: Makefile.am Added Files: pw_pui.cxx Log Message: Added support for PW into PUI - and provided a demo of it working! --- NEW FILE: pw_pui.cxx --- #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <GL/gl.h> #include <plib/ul.h> #include <plib/pw.h> // This needs to be before <plib/pu.h> #include <plib/pu.h> void exFunc () { fprintf ( stderr, "Exiting.\n" ) ; pwCleanup () ; exit ( 0 ) ; } void rsFunc ( int w, int h ) { fprintf ( stderr, "Resized to %d x %d\n", w, h ) ; } void mpFunc ( int x, int y ) { puMouse ( x, y ) ; } void msFunc ( int button, int updn, int x, int y ) { puMouse ( button, updn, x, y ) ; } void kbFunc ( int key, int updn, int x, int y ) { puKeyboard ( key, updn, x, y ) ; } void button_cb ( puObject * ) { fprintf ( stderr, "Hello World.\n" ) ; } int main ( int, char ** ) { pwInit ( 100, 100, 640, 480, false, "PLIB Window Demo", true, 0, kbFunc, msFunc, mpFunc, rsFunc, exFunc ) ; puInit () ; puOneShot *b = new puOneShot ( 50, 50, 200, 80 ) ; b -> setLegend ( "Say Hello" ) ; b -> setCallback ( button_cb ) ; while ( 1 ) { glClearColor ( 0.5, 0.1, 0.1, 1.0 ) ; glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ; puDisplay () ; pwSwapBuffers () ; } } Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/examples/src/pw/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 16 Feb 2004 02:26:27 -0000 1.1 +++ Makefile.am 17 Feb 2004 01:43:21 -0000 1.2 @@ -1,10 +1,12 @@ if BUILD_PW -noinst_PROGRAMS = pw_demo +noinst_PROGRAMS = pw_demo pw_pui pw_demo_SOURCES = pw_demo.cxx +pw_pui_SOURCES = pw_pui.cxx pw_demo_LDADD = -lplibpw -lplibul $(OGL_LIBS) +pw_pui_LDADD = -lplibpw -lplibpu -lplibfnt -lplibsg -lplibul $(OGL_LIBS) endif |