[vtkusers] vtkRenderWindow - size change in off screen rendering

rjmurphy ryan.murphy at jhuapl.edu
Tue Aug 30 14:51:19 EDT 2016


Hello,

I am trying to create an off-screen renderer with a specific size to
transmit to an external monitor. I have code working in VTK 6.3, but am
having trouble on VTK 7.0 (Windows 10, 64-bit). I tracked down the problem,
but do not know how to avoid this issue and maintain a constant size for an
offscreen render window. During the first call to Render(), the function
vtkWin32OpenGLRenderWindow::GetSize() forcibly sets the size to "the current
window size" rather than using the values previously assigned to force.
Immediately upon entering the function, the "Size" variable correctly
identifies the window size; however, since the "Mapped" variable is turned
on by the call to OffScreenRenderingOn(), it forces the size to that
identified by GetClientRect() --> why is this the case for an offscreen
renderer?

Thanks in advance,
Ryan

  renderWindow->SetSize(width, height);
  renderWindow->StereoCapableWindowOn();
  renderWindow->StereoRenderOn();
  renderWindow->SetStereoTypeToSplitViewportHorizontal();
  renderWindow->OffScreenRenderingOn();
  renderWindow->AddRenderer(renderer.GetPointer());
  renderWindow->Start();

  // add actors

  renderWindow->Render();





--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindow-size-change-in-off-screen-rendering-tp5740068.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list