[Plib-cvs] plib/src/pw pwWindows.cxx,1.13,1.14
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2005-02-01 01:14:43
|
Update of /cvsroot/plib/plib/src/pw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28083/plib/src/pw Modified Files: pwWindows.cxx Log Message: pwWindows.cxx had an error that cause the window position to be interpreted as the position of the rendered area - not the position of the window decorations. ssgaFire had a dependancy on the scale of the model. If you treat an OpenGL unit as 1meter, you got good results - but if you treat an OpenGL unit as an inch or a mile, the fire looks crap. Minor tweaks to exposer and the mod-player demo. Index: pwWindows.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pw/pwWindows.cxx,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- pwWindows.cxx 5 Aug 2004 00:55:32 -0000 1.13 +++ pwWindows.cxx 1 Feb 2005 01:14:13 -0000 1.14 @@ -288,6 +288,19 @@ AdjustWindowRect( &rect, style, false ) ; + // The origin is really where the upper left of the window should be. + // rect is the setting for the window if the origin is for the client area. + // Adjust the window rect so that it will be located at the origin (x,y). + + int deltaX = x - rect.left ; + int deltaY = y - rect.top ; + + rect.left += deltaX ; + rect.right += deltaX ; + rect.top += deltaY ; + rect.bottom += deltaY ; + + /* Create the window */ currWnd = CreateWindow( "PlibAppClass", title, style, |