[Plib-cvs] plib/src/pui pu.cxx,1.64,1.65 pu.h,1.141,1.142
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-02-16 02:34:15
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20530/plib/src/pui Modified Files: pu.cxx pu.h Log Message: Added the 'PW' library. Added some functionality to the ssgAux screen dump facility so you can dump to an array in memory as an alternative to dumping it straight to disk. Index: pu.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.cxx,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- pu.cxx 7 Feb 2003 15:02:49 -0000 1.64 +++ pu.cxx 16 Feb 2004 02:26:28 -0000 1.65 @@ -37,55 +37,21 @@ static int puWindowWidth = 400 ; static int puWindowHeight = 400 ; +static int openGLSize = 0 ; -static int openGLSize = 0 ; +void puSetResizeMode ( int mode ) { openGLSize = mode ; } -#ifdef PU_NOT_USING_GLUT -int puGetWindow ( void ) { return 0 ; } [...139 lines suppressed...] + +int puGetWindowHeight ( void ) +{ + if ( openGLSize ) + return puWindowHeight ; + + return glutGet ( (GLenum) GLUT_WINDOW_HEIGHT ) ; +} + + +int puGetWindowWidth ( void ) +{ + if ( openGLSize ) + return puWindowWidth ; + + return glutGet ( (GLenum) GLUT_WINDOW_WIDTH ) ; +} + +#endif + Index: pu.h =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.h,v retrieving revision 1.141 retrieving revision 1.142 diff -u -d -r1.141 -r1.142 --- pu.h 12 Jul 2003 00:45:58 -0000 1.141 +++ pu.h 16 Feb 2004 02:26:28 -0000 1.142 @@ -108,6 +108,11 @@ #define PU_DRAG 255 #define PU_CONTINUAL PU_DRAG +/* + WARNING: These have to be the same as PW_KEY_whatever and also + the same as (GLUT_KEY_whatever+256) +*/ + #define PU_KEY_GLUT_SPECIAL_OFFSET 256 #define PU_KEY_F1 (1 + PU_KEY_GLUT_SPECIAL_OFFSET) @@ -349,6 +354,7 @@ void puDisplay ( int window_number ) ; /* Deprecated */ int puMouse ( int button, int updown, int x, int y ) ; int puMouse ( int x, int y ) ; +int puKeyboard ( int key, int updown, int x, int y ) ; /* For PW */ int puKeyboard ( int key, int updown ) ; void puHideCursor ( void ) ; void puShowCursor ( void ) ; |