Hi,<br><br>I am writing a plugin to change window size, change camera to designated pose and hope to grab Z-buffer for a 3D model that I am rendering. What I found is that after I set a new window size, set a new camera position, viewup direction, focal point, and render the window, the 3D model disappeared. But after I drag with my mouse in the empty window, the 3D model shows up. Not sure what I did incorrectly...<br>
<br>Here are my code segment:<br><br><span style="font-family:courier new,monospace">if(proxy){</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> proxy->GetRenderWindow()->Render();</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> vtkCamera *camera = proxy->GetActiveCamera();</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> //proxy->GetRenderer()->ResetCamera();</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> camera->SetParallelProjection(false);</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> camera->SetFocalPoint(-4.63865, 1.56608, 51.092);</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> camera->SetViewUp(0.9435, 0.1077, 0.3134);</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> camera->SetPosition(-9.4128, 9.97, 62.5772);</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> int h = 480, w = 640;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> proxy->GetRenderWindow()->SetSize(w,h);</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> proxy->GetRenderWindow()->Render();</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">}</span><br><br>Hope anyone can explain a bit. Thanks,<br>
<br>Li<br>