[sldev] force object redraw?

Dave Parks davep at lindenlab.com
Mon Feb 4 17:12:31 PST 2008


Check out the code for "hide selected."  It does what you want.  There 
is an implicit call to markRebuild on selection/deselection.  I believe 
the FORCE_INVISIBLE flag is totally ignored for prims in the render 
pipeline, but works for trees, avatars, terrain, and water.


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 :-)
>
> Thanks,
> Anna
>
> On 2/4/08, *Dave Parks* <davep at lindenlab.com 
> <mailto: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.
>
>



More information about the SLDev mailing list