VR application: get more precise calls to process function ?
Posted: Wed May 18, 2011 9:02 am
Hello,
I'm trying to precisely control flashings in an openvibe P300 VR application.
In "COgreVRApplication::frameStarted", I removed tests on frequency and sleeps, so that "this->process" is called each time "frameStarted" is.
In my process function, I measured elapsed time using Ogre timers.
All this is compiled in release mode, run on Imac/Intel Duo 2,6G/windows XP/NVIDIA GeForce 9400 - 60Hz. An openvibe designer is running a P300 replay scenario in the background.
The measured refresh rate looks like this :
x: elapsed time since last call in µs.
y: number of frame for each time window
I expect to have at most 16ms (1/60) between each frame, and we see several calls at 20ms and more. Is there a way to avoid this in Ogre ? Or am I missing something ?
Thanks.
Nicolas.
I'm trying to precisely control flashings in an openvibe P300 VR application.
In "COgreVRApplication::frameStarted", I removed tests on frequency and sleeps, so that "this->process" is called each time "frameStarted" is.
In my process function, I measured elapsed time using Ogre timers.
Code: Select all
std::vector<double> m_vRepetitionPerformance;
Timer perfTimer;
[...]
m_vRepetitionPerformance.push_back(perfTimer.getMicroseconds());
perfTimer.reset();
The measured refresh rate looks like this :
x: elapsed time since last call in µs.
y: number of frame for each time window
I expect to have at most 16ms (1/60) between each frame, and we see several calls at 20ms and more. Is there a way to avoid this in Ogre ? Or am I missing something ?
Thanks.
Nicolas.