Aron Bierbaum wrote:
> Any hints on what these may be.
TypesFieldMask |
LengthsFieldMask |
PropertiesFieldMask |
PropIndicesFieldMask |
DlistCacheFieldMask
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 ());
> }
> }
personally I find a sequence of
if(A)
{
}
else
{
}
if(A)
{
}
confusing, but that may just be me ;)
> I don't know if I need to check for ClassicGLIdFieldMask |
> AttGLIdFieldMask here for sure though.
These should only be changed by the Geoemtry itself, so they should not
be in there; it smells like this could actually introduce a loop if they
are.
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