Revision: 7588
http://playerstage.svn.sourceforge.net/playerstage/?rev=7588&view=rev
Author: rtv
Date: 2009-04-09 17:12:41 +0000 (Thu, 09 Apr 2009)
Log Message:
-----------
fixed threadpool bug
Modified Paths:
--------------
code/stage/trunk/libstage/block.cc
code/stage/trunk/libstage/model.cc
Modified: code/stage/trunk/libstage/block.cc
===================================================================
--- code/stage/trunk/libstage/block.cc 2009-04-08 08:35:18 UTC (rev 7587)
+++ code/stage/trunk/libstage/block.cc 2009-04-09 17:12:41 UTC (rev 7588)
@@ -477,12 +477,12 @@
// draw filled color polygons
stg_color_t col = inherit_color ? mod->color : color;
- mod->PushColor( col );
- glEnable(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(1.0, 1.0);
- DrawSides();
- DrawTop();
- glDisable(GL_POLYGON_OFFSET_FILL);
+ mod->PushColor( col );
+ glEnable(GL_POLYGON_OFFSET_FILL);
+ glPolygonOffset(1.0, 1.0);
+ DrawSides();
+ DrawTop();
+ glDisable(GL_POLYGON_OFFSET_FILL);
// // draw the block outline in a darker version of the same color
double r,g,b,a;
Modified: code/stage/trunk/libstage/model.cc
===================================================================
--- code/stage/trunk/libstage/model.cc 2009-04-08 08:35:18 UTC (rev 7587)
+++ code/stage/trunk/libstage/model.cc 2009-04-09 17:12:41 UTC (rev 7588)
@@ -684,7 +684,7 @@
bool Model::UpdateDue( void )
{
- return( world->sim_time >= (last_update + interval) );
+ return( (last_update == 0) || (world->sim_time >= (last_update + interval))
);
}
void Model::Update( void )
@@ -705,12 +705,14 @@
stg_joules_t consumed = watts * (world->interval_sim * 1e-6);
pp->Dissipate( consumed, GetGlobalPose() );
}
+
+ last_update = world->sim_time;
}
void Model::CallUpdateCallbacks( void )
{
- CallCallbacks( &hooks.update );
- last_update = world->sim_time;
+ if( last_update == world->sim_time )
+ CallCallbacks( &hooks.update );
}
stg_meters_t Model::ModelHeight() const
@@ -1135,7 +1137,7 @@
if( this->data )
delete[] this->data;
size_t len = sizeof(uint8_t) * width * height;
- printf( "allocating %lu bytes\n", len );
+ //printf( "allocating %lu bytes\n", len );
this->data = new uint8_t[len];
memcpy( this->data, data, len );
this->width = width;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit