Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] Re: two frame lag?


Chronological Thread 
  • From: Carson Brownlee < >
  • To:
  • Subject: [Manta] Re: two frame lag?
  • Date: Thu, 4 Feb 2010 15:19:08 -0700

I'm using something similar but only have a one frame lag I believe since I render between swap buffer calls, which works fine when the user is rotating. transactions fire before rendering, so if your syncing threads in 10 after a rendering is finished and releasing them at 60 then they should be completed before 70, something must obviously be wrong with the additional sync. What do your transactions look like?

Another thing you could try is just launch beginRendering(true) and then put some code in a custom implementation of RTRT to set workers wanted to 0 after one frame is rendered. This has the overhead of launching threads and won't render between your calls 90 and 10 but eliminates what looks like 3 render calls below.
Carson


On Feb 4, 2010, at 1:05 PM, David E DeMarle wrote:

I think I am missing something important.

In vtkManta, the VTK thread sends transaction requests to the manta threads and uses SyncDisplay::waitOnFrameReady to wait for them to take effect before it shows the pixels to the user. My problem is that there is a two frame lag.

This is how works now, written from the vtk thread's perspective (in BASIC)

10 waitOnFrameReady() REM now the manta threads should be "stopped" because thread 0 is,
... REM process changes in vtk state by issuing transactions to let manta threads know about it.
60 displayDone() REM release the manta threads, I expect callbacks to be received now
70 waitOnFrameReady() REM this frame doesn't show the changes yet
80 displayDone() REM let manta render the frame that has the changes
90 waitOnFrameReady() REM now the image I get has the changes in it

The effect is to halve the framerate, since I always have to ask manta to render twice to see what I ask it to draw.

Is there some good way to obviate the need for lines 80 and 90?

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109




Archive powered by MHonArc 2.6.16.

Top of page