[vtkusers] [Offscreen problem] previous frames mess up the following frames

Xiong Guanglei xgl99 at mails.tsinghua.edu.cn
Thu Apr 8 00:01:34 EDT 2004


hi,

I have finished installing Offscreen support for VTK
and test OffScreenCone.tcl . It works well
but When I want to rotate camera to get a series frames
Previous frames mess up the following frames a lot(Maybe I need something
clear my renderWindow, but how?)
That is my program:

package require vtk
package require vtkinteraction

vtkXMesaRenderWindow renWin
renWin OffScreenRenderingOn

vtkMesaRenderer ren
renWin AddRenderer ren

vtkConeSource cone

vtkMesaPolyDataMapper mp
mp SetInput [cone GetOutput]

vtkMesaActor actor
actor SetMapper mp

ren AddActor actor
ren AddObserver StartEvent myCallback

vtkWindowToImageFilter w2if
w2if SetInput renWin

vtkJPEGWriter wr
wr SetInput [w2if GetOutput]

for {set i 0} {$i < 360} {incr i} {
    renWin Render
    [ren GetActiveCamera] Azimuth 1
    wr SetFileName [format "a%03d.jpg" $i]
    w2if Modified
    wr Write
}
vtkCommand DeleteAllObjects
exit

Thanks a lot!

-- 
Guanglei Xiong
Department of Automation
Tsinghua University
Beijing,P.R.China
100084



More information about the vtkusers mailing list