Albe
2008-05-19 07:12:21 UTC
Hi all,
I'm writing a software that receive data to USB port and draw same
graphics in same Windows TAB ( I'm using Visual Studio 2003 with
MFC ).
I have to draw the new scene only when the new data on USB port is
available and this data changing is not very fast (400 Hz - 400 sample
per second), on this I have an issue with the extra work to CPU, is
always upper than 90% probably because the WM_PAINT is so fast and the
software draws continuosly the same scene between two sample to USB
port.
To solve this issue I tried to eliminate the WM_PAINT in OpenGL and
call the OpenGL::OnPaint only when the new data occours but the
window's device context is 0 and I don't understand why.
Cau yuo help me?
Thank you
Alberto
I'm writing a software that receive data to USB port and draw same
graphics in same Windows TAB ( I'm using Visual Studio 2003 with
MFC ).
I have to draw the new scene only when the new data on USB port is
available and this data changing is not very fast (400 Hz - 400 sample
per second), on this I have an issue with the extra work to CPU, is
always upper than 90% probably because the WM_PAINT is so fast and the
software draws continuosly the same scene between two sample to USB
port.
To solve this issue I tried to eliminate the WM_PAINT in OpenGL and
call the OpenGL::OnPaint only when the new data occours but the
window's device context is 0 and I don't understand why.
Cau yuo help me?
Thank you
Alberto