Messages getting slower?
Posted: Sun Nov 24, 2002 9:10 am
A technical question on Windows messaging.
I can now move my virtual head in BoB with TrackIR.
It is nice at first, but after a small time it gets "delayed" and "rough". Realising this is a timing issue, I output the times at:
- receiving a WM_USER+5 with pitch info
- rendering a frame
- using the last pitch value for calculating the virtual head.
The frames come about every 50 milliseconds. That's fairly constant.
At first the messages arrive at about 60 Hertz, but sometimes there is a "phase" with very few messages arriving and then a batch of them arrives.
Does anyone know how I can debug that? I would like to know when the messages were send, but since I use a WindowProc, I do not know how to get the time the message has been send. It almost sounds to me like something is too busy and therefore windows does not allocate time to the naturalpoint exe or to the part of the BoB code that receives the messages.
Any other helpful ideas?
I can now move my virtual head in BoB with TrackIR.
It is nice at first, but after a small time it gets "delayed" and "rough". Realising this is a timing issue, I output the times at:
- receiving a WM_USER+5 with pitch info
- rendering a frame
- using the last pitch value for calculating the virtual head.
The frames come about every 50 milliseconds. That's fairly constant.
At first the messages arrive at about 60 Hertz, but sometimes there is a "phase" with very few messages arriving and then a batch of them arrives.
Does anyone know how I can debug that? I would like to know when the messages were send, but since I use a WindowProc, I do not know how to get the time the message has been send. It almost sounds to me like something is too busy and therefore windows does not allocate time to the naturalpoint exe or to the part of the BoB code that receives the messages.
Any other helpful ideas?