Hi Moritz,
On Wed, 2006-07-12 at 10:18 +0200, Carlo Moritz Goellner wrote:
> what about the following patch? (haven't tried it, though)
>
> We could introduce a new field to Geometry, type bool
>
> _sfMinMaxHighLowIndicesValidity
>
> and set that in Geometry::changed():
>
> if (whichField & (IndicesFieldMask | LengthsFieldMask | TypesFieldMask |
> IndexMappingFieldMask))
> {
> GeomtryPtr self(this);
> beginEditCP(self, MinMaxHighLowIndicesValidityField);
> _sfMinMaxHighLowIndicesValidity.setValue(false);
> endEditCP(self, MinMaxHighLowIndicesValidityField);
> }
>
> And just before rendering, we check that field and the
> extension settings in Geometry::drawPrimitives() and
> Geometry::handleGL(). Like this:
>
> //-- at a suitable location before invoking the geo pump
> //
> if (NOT this->_sfMinMaxHighLowIndicesValidity.getValue() AND
> (window->hasExtension(GeoPumpFactory::_extCompiledVertexArray)
> OR
> window->hasExtension(GeoPumpFactory::_extDrawRangeElements)))
> {
> this->updateLowHighIndices(); // computes minmaxhighlowx indices + sets
> _sfMinMaxHighLowIndicesValidity = true
> }
>
> Thus, if the user does not want the updateLowHighIndices()
> overhead, she/he has to disable/ignore the extensions.
That would work, if the user everything right. If he doesn't use masks
everywhere the false setting could be synced in from another thread over
and over again, forcing the low/high indices to be computed over and
over again, too. Probably not too common a case, though.
I'll try to make some time to add it.
Dirk
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users