Hi Per,

I've just done a quick review of your changes and it does feel balanced to me.

Is CullVisitor checking the current setting of
SmallFeatureCullingPixelSize() from the current CullingSet or
CullStack? If so then you own callback should be setting current
CullingSet rather than the CullStack.  CullStack probably would be
best without inheriting from CullingSettings to avoid this confusion,
but I suspect I wrote it this may for backwards compatibility.  I'll
need to dig into CullVisitor to double check all this.

Robert.

On Mon, Dec 15, 2008 at 2:23 PM, Per Fahlberg <[email protected]> wrote:
> Hi Robert,
>
> I've found a way to get it working by slightly modifying CullStack.cpp and
> by also changing my cull callback. When pushing the CullingSet in CullStack
> I have added updating the cull mask in the new CullingSet. I needed to
> change both the cull visitors culling mode and the current CullingSets mask
> in the callback, because I didn't find a way to propagate the changed mode
> from the CullVisitor to the current CullingSet.
>
> I'm cross posting to osg-submissions and have attached the modified
> CullStack.cpp, I've also attached a modified osgscribe.cpp that shows the
> problem. When zooming out one model should always be visible but the other
> shall disappear when it gets less than 200 pixels in size.
>
> Regards,
> Per
>
> Robert Osfield wrote:
>>
>> Hi Per,
>>
>> It sounds like you'll need to directly manipulator or push new
>> settings on the stack in CullVisitor.
>>
>> Robert.
>>
>> On Mon, Dec 15, 2008 at 10:12 AM, Per Fahlberg <[email protected]>
>> wrote:
>>
>>>
>>> Hi Robert,
>>>
>>> I've traced the problem down now and it seems the culling mode that the
>>> CullVisitor uses is correct but the one in the CullingSet is incorrect.
>>> This
>>> is due to the CullingSet being updated in CullStack::pushProjectionMatrix
>>> which is called early on in culling, and when I change the culling mode
>>> in
>>> my callback it only changes the mode in the CullVisitor and not the mode
>>> in
>>> the CullingSet.
>>>
>>> Since I'm not very familiar with the internals in the culling code I
>>> would
>>> like to ask for some guidance before I dive in and try to code up a fix
>>> for
>>> the problem. Do you know of a place in the code where the culling set
>>> might
>>> be updated to reflect the changes in the CullVisitor/CullStack or should
>>> I
>>> try to directly propagate the changes from the
>>> CullSettings::setCullingMode
>>> down via CullStack to the CullingSet?
>>>
>>> Regards,
>>> Per
>>>
>>> Robert Osfield wrote:
>>>
>>>>
>>>> Hi Per,
>>>>
>>>> On Tue, Dec 2, 2008 at 11:34 AM, Per Fahlberg <[email protected]>
>>>> wrote:
>>>>
>>>>
>>>>>
>>>>> Perhaps I wasn't clear in my question so I will try once more, is there
>>>>> a
>>>>> way to disable small feature culling for just a subgraph not the entire
>>>>> scene?
>>>>>
>>>>>
>>>>
>>>> The only way is is use a cull callback to cache the previous setting,
>>>> set the new setting do the traverse and the restore the original
>>>> value.  Your original callback does this, but I don't know why it
>>>> doesn't work.   Note, I haven't tried it myself so I can't provide any
>>>> further direction, you'll just have to dig into the source code.
>>>>
>>>> Robert.
>>>> _______________________________________________
>>>> osg-users mailing list
>>>> [email protected]
>>>>
>>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to