Integrated various fixes from users.

This commit is contained in:
Robert Osfield
2003-07-05 19:08:30 +00:00
parent 092c094752
commit 4c576770fb
4 changed files with 13 additions and 5 deletions

View File

@@ -263,7 +263,8 @@ void Drawable::setUseDisplayList(bool flag)
void Drawable::dirtyDisplayList()
{
for(unsigned int i=0;i<_globjList.size();++i)
unsigned int i;
for(i=0;i<_globjList.size();++i)
{
if (_globjList[i] != 0)
{
@@ -272,7 +273,7 @@ void Drawable::dirtyDisplayList()
}
}
for(unsigned int i=0;i<_vboList.size();++i)
for(i=0;i<_vboList.size();++i)
{
if (_vboList[i] != 0)
{

View File

@@ -125,7 +125,7 @@ DynamicLibrary::getLibraryHandle( const std::string& libraryName)
BIND_DEFERRED|BIND_FIRST|BIND_VERBOSE, 0);
return handle;
#else // other unix
handle = dlopen( libraryName.c_str(), RTLD_LAZY );
handle = dlopen( libraryName.c_str(), RTLD_LAZY | RTLD_GLOBAL);
#endif
return handle;
}

View File

@@ -41,5 +41,12 @@ void osgParticle::FluidFrictionOperator::operate(Particle *P, double dt)
Fr = current_program_->rotateLocalToWorld(Fr);
}
P->addVelocity(Fr * (P->getMassInv() * dt));
// correct unwanted velocity increments
osg::Vec3 dv = Fr * (P->getMassInv() * 0.01);
float dvl = dv.length();
if (dvl > vm) {
dv *= vm / dvl;
}
P->addVelocity(dv);
}