[vtkusers] vtkActor and RenderTranslucentGeometry() and backward compatibility
Francois Bertel
francois.bertel at kitware.com
Mon Mar 5 17:33:34 EST 2007
In my previous post, please replace each RenderVolumetricPolygonalGeometry() by RenderVolumetricGeometry().
Francois Bertel wrote:
> Hi Anka,
>
> RenderTranslucentGeometry() was used for rendering both translucent polygonal geometry and volumetric geometry. There was no way to distinguish those two cases. In order to make depth peeling work (a technique to render translucent
> polygonal geometry correctly), we need this distinction.
>
> Hence, RenderTranslucentGeometry() was splitted into RenderTranslucentPolygonalGeometry() and RenderVolumetricPolygonalGeometry().
> So RenderTranslucentPolygonalGeometry is not just a replacement of RenderTranslucentGeometry. It is not a name change.
> Therefore RenderTranslucentGeometry cannot be left for backward compatibility because the all logic changed, even if for *some* props the code looks exactly the same.
>
> Also, depth peeling requires some costly initialization. Before doing this initialization, the algorithm traverses all the props first to see if any of them has some translucent polygonal geometry by calling a new method called HasTranslucentPolygonalGeometry()
> If none of them have some translucent polygonal geometry, depth peeling is just skipped.
>
> Removing the old method forces to implement HasTranslucentPolygonalGeometry() which is now required and force to split the old RenderTranslucentGeometry() into RenderTranslucentPolygonalGeometry() and RenderVolumetricPolygonalGeometry().
> RenderTranslucentPolygonalGeometry() and RenderVolumetricPolygonalGeometry() are called at different stages of the rendering process.
>
>
> The nightly doc still refers to the old RenderTranslucentGeometry because the change was committed today...
> So it will be gone tomorrow morning.
>
> Anka Kochanowska wrote:
>> Hi!
>> This function is not available anymore (must be few days only), but the
>> nightly documentation still mentions it.
>> I see that it is repalced with RenderTranslucentPolygonalGeometry(), the
>> code is exactly the same
>>
>> Why don't you leave the RenderTranslucentGeometry() for the backward
>> compatibility?
>>
>> It could be just
>>
>> RenderTranslucentGeometry(...)
>> {
>> return RenderTranslucentPolygonalGeometry(...);
>> }
>>
>> The way it is done is highly inconvenient for people who are using 5.0
>> release, but sometimes build with the nightly release just to check if
>> the application still works.
>> And it happens quite often that it won't compile, because a function or
>> constant name was changed.
>>
>> Anka
>
>
--
François Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA
More information about the vtkusers
mailing list