Revision: 6522
http://playerstage.svn.sourceforge.net/playerstage/?rev=6522&view=rev
Author: alexcb
Date: 2008-06-10 10:57:01 -0700 (Tue, 10 Jun 2008)
Log Message:
-----------
fixed clock which went missing after change to glOrtho zooming
Modified Paths:
--------------
code/stage/trunk/libstage/canvas.cc
Modified: code/stage/trunk/libstage/canvas.cc
===================================================================
--- code/stage/trunk/libstage/canvas.cc 2008-06-10 17:43:46 UTC (rev 6521)
+++ code/stage/trunk/libstage/canvas.cc 2008-06-10 17:57:01 UTC (rev 6522)
@@ -483,6 +483,13 @@
if( showflags & STG_SHOW_CLOCK )
{
+ //use orthogonal projeciton without any zoom
+ glMatrixMode (GL_PROJECTION);
+ glPushMatrix(); //save old projection
+ glLoadIdentity ();
+ glOrtho( -w()/2.0, w()/2.0, -h()/2.0, h()/2.0, -100, 100 );
+ glMatrixMode (GL_MODELVIEW);
+
glPushMatrix();
glLoadIdentity();
glDisable( GL_DEPTH_TEST );
@@ -504,6 +511,11 @@
glEnable( GL_DEPTH_TEST );
glPopMatrix();
+
+ //restore camera projection
+ glMatrixMode (GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode (GL_MODELVIEW);
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit