vtkViewport's purpose

Hello, what is the purpose of using SetViewport on a vtkRenderer object. What does it do?

Thank you.

It tells the renderer to use only part of the render window. So instead of using two render windows, it becomes possible to use one render window with two renderers.

When VTK was first developed in the 1990s, this was necessary because many graphics cards could only provide a single OpenGL context, while applications often needed more than one rendering pane. Even today, multiple renderers per OpenGL context can be useful.

Renderers can also be stacked on top of each other (i.e. can share a viewport). So you can have one renderer showing the scene in the background, and another renderer showing a heads-up display in the foreground. Each renderer has its own camera, lights, etc. Or, instead of having the renders overlap completely, you can have them overlap partially. Endless possibilities.