Dirk Reiners wrote:
Hi Marcus,
On Wed, 2005-05-04 at 14:03 +0200, Marcus Lindblom wrote:
Problem solved, and of course it was the simplest thing.. again.. sigh..
I was neglecting to do CPEdit(chunkmaterial, chunksfieldmask), although
I'm currently running single-threaded and all. (It worked without that
in many other places, so I didn't think of that until now.)
Gah! That's the first thing I though of, but it was too trivial to
mention... :(
Murphy's law. :-/
Luckily, I got some other stuff done at the same time as I was battling
this, so I wasn't completely stalled.
Perhaps forcing (or at least providing a method that allows) access to
the object to happen between a begin/end-pair via a function on a FCPtr
that returned some smart-pointer/lock object which allowed access to the
non-const member functions of a field container.
...
Perphaps you've already thought about something like this?
Indeed. That's going to be the major change for 2.0. Given that the
access to all variables is filtered via accessor methods anyway they
will keep track of changed fields. The only place where this is
performance-critical is for large multi-fields like vertices and
normals. For those the difference will be const or non-const iterators.
So if you're iterating over MultiFields it's a good idea to think about
const-ness of your iterators and start using const interators where
possible.
Neat! That means that I have to be careful whether I use a const pointer
or not. Couldn't that be tricky given that I sometimes read and
sometimes write using a non-const pointer? Or maybe this isn't a
problem? (I'm mostly curious as how this is resolved.)
Best regards,
/Marcus
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users