Hi,
> ok, some additionally background information. my application is a deformation
> simulator. i calculate the deformation and update the geometry.
>
> GeoPositions3fPtr pos = GeoPositions3fPtr::dcast(geo->getPositions());
> GeoPositions3f::StoredFieldType *posfield = pos->getFieldPtr();
> ...
> beginEditCP(pos, GeoPositions3f::GeoPropDataFieldMask);
> for(in_iter = in.begin(); in_iter != in.end(); ++in_iter) {
> ...
> posfield->setValue(Pnt3f(x[0], x[1], x[2]), in_iter->first);
> }
> endEditCP(pos, GeoPositions3f::GeoPropDataFieldMask);
> ...
>
> after the updating i recalculate the normals (maximum 15 times per second).
>
> if(run_time < clock()) {
> run_time = clock() + CLOCKS_PER_SEC/15;
> calcVertexNormals(geo);
> }
>
> this routine runs is a separate osg thread.
>
> is it possible that the paintGL method is call while the update of the
> geometry is not complete (or the calculation of the normals)?
>
highly, if you run inside the same aspect as your drawer. Do you have
any exclusion/synchronization mechanism in place not to draw while
the normals are updated ?
kind regards,
gerrit
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users