From: <z-...@us...> - 2007-05-07 22:15:47
|
Revision: 7223 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=7223&view=rev Author: z-man Date: 2007-05-07 15:15:41 -0700 (Mon, 07 May 2007) Log Message: ----------- Fixed matrix and viewport settings for motion blur. Modified Paths: -------------- armagetronad/trunk/armagetronad/src/render/rSysdep.cpp Modified: armagetronad/trunk/armagetronad/src/render/rSysdep.cpp =================================================================== --- armagetronad/trunk/armagetronad/src/render/rSysdep.cpp 2007-05-07 22:15:16 UTC (rev 7222) +++ armagetronad/trunk/armagetronad/src/render/rSysdep.cpp 2007-05-07 22:15:41 UTC (rev 7223) @@ -20,7 +20,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - + *************************************************************************** */ @@ -89,7 +89,7 @@ Display *dpy=NULL; Window win; -#endif +#endif #ifdef DIRTY #include <SDL_syswm.h> @@ -116,15 +116,15 @@ std::cerr << "No 3Dfx hardware available.\n" << x << '\n'; return(false); } - + GLint attribs[]={FXMESA_DOUBLEBUFFER,FXMESA_DEPTH_SIZE,16,FXMESA_NONE}; ctx=fxMesaCreateBestContext(0,sr_screenWidth,sr_screenHeight,attribs); - + if (!ctx){ std::cerr << "Could not create FX rendering context!\n"; return(false); } - + fxMesaMakeCurrent(ctx); } */ @@ -203,7 +203,7 @@ } } -#endif +#endif return true; } @@ -244,7 +244,7 @@ glXDestroyContext(dpy, cx ); dpy=NULL; } -#endif +#endif } #endif // DIRTY @@ -486,14 +486,14 @@ double thisFrame = tRealSysTimeFloat(); int uSecsPassed = static_cast<int>( MILLION * ( thisFrame - lastFrame ) ); - + // con << uSecsPassed << "\n"; // wait int uSecsToWait = uSecsPerFrame - uSecsPassed; if ( uSecsToWait > 0 ) tDelay( uSecsToWait ); - + // call glFinish to wait for GPU glFinish(); } @@ -503,7 +503,7 @@ //rSysDep::rSwapMode rSysDep::swapMode_ = rSysDep::rSwap_60Hz; // buffer swap: -#ifndef DEDICATED +#ifndef DEDICATED // for setting breakpoints in optimized mode, too static void breakpoint(){} @@ -643,6 +643,12 @@ glDisable( GL_DEPTH_TEST ); glDepthMask(0); + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + glViewport(0,0,sr_screenWidth, sr_screenHeight); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |