Dirk Reiners wrote:
> I was just mentioning that because it's the reason for
> UpdateLowHighIndices, without the call I can't use that extension
> (sensibly).
>
> So, to make it work I could add a flag for using that extension. If you
> still want to use it but only want to call it once we could move the
> update into the rendering method, but in that case it could easily end
> up being called every frame, which is what I wanted to avoid.
>
> I need to think about that, we may need more explicit stages in the
> processing. IMHO the culling stage would be the right place to do it,
> but there is currently no easy way to get in there.
Hi Dirk,
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.
Best regards,
Moritz
-------------------------------------------------------------------------
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