I do have a second device (an standard analog monitor) connected to the video card, which has two independent DVI-I ports. After much exploration, it seems, however, that the video card bandwidth is narrower than I had expected. So turning down the resolution on the projector helped solved the problem, as did putting both devices at the same refresh rate (there must be some savings at the GPU).
So now viz.go(viz.QUAD_BUFFER) runs fine at 120 Hz. But I started to do some frame time logging with the following code:
Code:
import viz
import viztask
def onFrameUpdate(event):
global frameTime
global frameInterval
frameTime += [event.time]
frameInterval += [event.elapsed]
def collectFrames():
print 'Collecting frame times ...'
viz.callback(viz.UPDATE_EVENT,onFrameUpdate)
yield viztask.waitTime(60)
print 'Finished collection.'
viz.callback(viz.UPDATE_EVENT,None)
yield writeFile()
def writeFile():
file = open('frametime.txt','wt')
file.write('frameTime = (')
for i in frameTime:
file.write(str(i)+',')
file.write(')\n')
file.write('frameInterval = (')
for i in frameInterval:
file.write(str(i)+',')
file.write(')\n')
yield file.flush()
file.close()
viz.quit()
frameTime =[]
frameInterval = []
viz.go(viz.QUAD_BUFFER)
viztask.schedule(collectFrames())
and I found that the time stamps were not very precise. I had expected them to be nearly rock-solid, since the frames should be locked to the refresh rate. It this, possibly, due to Windows processes interrupting the Vizard execution, or can I not expect Vizard to run completely real-time?