Any hints on what these may be. Do you also think we should split the
check for DlistCacheField changing into a separate block. Something
like:
// Handle changes to display list caching flag.
if (whichField & DlistCacheFieldMask)
{
if (getDlistCache())
{
if(getClassicGLId() == 0)
{
setClassicGLId(
Window::registerGLObject(
boost::bind(&Geometry::handleClassicGL,
GeometryMTPtr(this),
_1, _2, _3, _4),
&Geometry::handleClassicDestroyGL));
}
if(getAttGLId() == 0)
{
setAttGLId(
Window::registerGLObject(
boost::bind(&Geometry::handleAttGL, GeometryMTPtr(this),
_1, _2, _3, _4),
&Geometry::handleAttDestroyGL));
}
}
else
{
if(getClassicGLId() != 0)
{
Window::destroyGLObject(getClassicGLId(), 1);
setClassicGLId(0);
}
if(getAttGLId() != 0)
{
Window::destroyGLObject(getAttGLId(), 1);
setAttGLId(0);
}
}
if(getDlistCache())
{
if(whichField & (TypesFieldMask | LengthsFieldMask |
PropertiesFieldMask |
PropIndicesFieldMask |
ClassicGLIdFieldMask | AttGLIdFieldMask))
{
Window::refreshGLObject(getClassicGLId());
Window::refreshGLObject(getAttGLId ());
}
}
I don't know if I need to check for ClassicGLIdFieldMask |
AttGLIdFieldMask here for sure though.
Thanks,
Aron
On Wed, Mar 4, 2009 at 3:22 PM, Carsten Neumann <[email protected]> wrote:
> Hello Aron,
>
> Aron Bierbaum wrote:
>> I have been doing some performance testing on OpenSG and I think I
>> have noticed a bug in Geometry::changed(). I believe that there needs
>> to be a check against the field mask before calling refreshGLObject.
>> Otherwise if you change a field like MaterialField or AttachmentsField
>> I believe it will cause the display list to be regenerated and the
>> geometry loaded onto the graphics board again.
>
> I think you are right, there should be a test to only regenerate the DL
> when a field it depends on has changed.
>
> Cheers,
> Carsten
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users