[sldev] force object redraw?

Anna Gulaev annagulaev at gmail.com
Mon Feb 4 18:26:40 PST 2008


On 2/4/08, Dave Parks wrote:
>
> Check out the code for "hide selected."  It does what you want.  There
> is an implicit call to markRebuild on selection/deselection.  I believe


Setting "Hide Selected" causes three things to happen:
1) stateSort exits without doing anything for selected objects
2) the object loop in renderForSelect skips selected objects
3) registerFace exits without doing anything for selected objects

So I added my should-by-invisible condition to these three places, and an
explicit call to markRebuild at the time the object is flagged to be
invisible, and...no joy. It acts axactly as it did when I was using
invisibility. The object does not go invisible until it is selected.

I believe the selection code is setting some state that is picked up by the
render code to mean "re-render this". I just don't know what that state is.

the FORCE_INVISIBLE flag is totally ignored for prims in the render
> pipeline, but works for trees, avatars, terrain, and water.


I believe it's the other way around. My invisibility was working (after a
select) on prims but not on trees, ground or water.

Thanks,
Anna


Anna Gulaev wrote:
> > These are drawables that have already been rendered, and updateCull,
> > stateSort and renderGeom are being called after these objects are
> > modified. Still, changes to them are not rendered until they are
> > selected (by right-clicking them).
> >
> > For example,
> >
> > object->mDrawable->setState( LLDrawable::FORCE_INVISIBLE);
> >
> > has no immediate effect, though updateCull, stateSort and renderGeom
> > all happen repeatedly (with every frame, I believe) after this change.
> > I've made appropriate changes to llviewerobject, llviewerobjectlist
> > and pipeline to ensure my changes aren't being undone, and am pretty
> > certain they aren't given that the changes take effect when I select
> > the objects.
> >
> > Through markRebuild, setChanged and updateDrawable I've managed to get
> > the objects to re-render sooner-than-never (with some crashing), but I
> > haven't found a way to get them to render immediately, or even, say,
> > within 10 seconds.
> >
> > That is, I've set a lighthouse invisible but can still see it. I can
> > look at it as long as I like, turn so it's out of my field of view and
> > then back, zoom in on it, etc, and it will not update. Right click it
> > and *poof* it's gone. I can't figure out how to make it *poof*
> > immediately :-)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20080204/0448dd57/attachment.htm


More information about the SLDev mailing list