Hi John,<br><br>Renderers are rendered by vtkRendererCollection::Renderer(), it says:<br>...<br> // Only have the renderers render from back to front. This is necessary<br> // because transparent renderers clear the z-buffer before each render and<br>
// then overlay their image.<br> for (i = 0; i < numLayers; i++)<br> {<br> for (this->InitTraversal(rsit); (ren = this->GetNextRenderer(rsit)); )<br> {<br> if (ren->GetLayer() == i)<br> {<br>
ren->Render();<br> }<br> }<br> }<br>...<br><br>2 things: layers "order" the rendering. and layered renderers are considered as transparent ( they write on top of the previous renderers). By default, a renderer has a layer of 0. If you have different layers, make sure you update the RendererWindow number of layers (RenderWindow::SetNumberOfLayers(int) )<br>
<br>Hope it helps,<br>Julien.<br><br><div class="gmail_quote">On Thu, Jul 3, 2008 at 1:08 AM, John Eke <<a href="mailto:johne@annidis.com">johne@annidis.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><font size="2">Hi,<br>
<br>
Could someone please briefly explain the basic concept behind layered rendering? whats the relationship between setting layers on renderers(eg renderer.SetLayer(0)) and adding multiple renderers to render windows (eg renderWindow.AddRenderer(renderer))? I ask because I had assumed adding renderers to a render window would automatically set the layers, or that somehow when adding renderers to a render window, you can specify the layer there (sort of like renderWindow.AddRenderer(renderer, 0)). So I guess I just need to be demystified a little bit.<br>
<br>
Thanks<br><font color="#888888">
<br>
John</font></font>
</p>
</div>
<br>_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>