[sldev] force object redraw?

Anna Gulaev annagulaev at gmail.com
Mon Feb 4 04:25:56 PST 2008


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 :-)

Thanks,
Anna

On 2/4/08, Dave Parks <davep at lindenlab.com> wrote:
>
> In order for a drawable to be picked up by the render pipeline, it has
> to pass the occlusion and frustum culling checks (meaning it must exist
> in a spatial partition) and have valid geometry to draw.  The call to
> markRebuild merely adds it to a queue to be prepared to be drawn, but
> does not actually cause it to be drawn.  markRebuild should only be
> called if the base geometry of the object has changed (like on an LOD
> switch).  The functions in LLPipeline you are looking for are
> "updateCull" (figure out what's visible), "stateSort" (last minute
> preparation for rendering, optimization of render call ordering), and
> "renderGeom" (running through the various drawpools and issuing OpenGL
> drawing commands).
>
>
> Anna Gulaev wrote:
> > Is there a way to force an immediate object redraw? I had thought
> > something like this would work, and I've confirmed that it is being
> > put in the priority queue:
> >
> > gPipeline.markRebuild( object->mDrawable, LLDrawable::REBUILD_ALL,
> TRUE);
> >
> > but it doesn't redraw. The object will redraw if I select it, and
> > sometimes when the window is obscured and then exposed, and sometimes
> > with a LOD change, but I can't get it to redraw when I want it to.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20080204/bb579688/attachment-0001.htm


More information about the SLDev mailing list