Steven A
02-12-2010, 11:35 AM
My program is a Windows MFC Application with multiple dialogs, where 2 of them are OpenGL windows, the first is just a picture that updates a few times a second the second plays video streamed from a few cameras in an angled view.
Both are inherited from CDialog, which another CDialog is their parent which has a timer that calls a tick function that invalidates each dialog
when i start my program up everything runs fine, i can see that both GL Dialogs are running at around 30fps,if i click on the first, everything is fine, they are updating fine. When i click on the second GL Dialog the first one stops updating, then i click on the first one again and it begins updating both fine. I'm pretty sure its not a CPU problem because the CPU stays at around 20-40% during this test.
Im thinking its something to do with the focus and invalidate(0) i call on the tick maybe the paint messages for the unfocused window gets thrown out because the second windows are more important? should i not be calling invalidate and just directly call my paint functions on tick?
Both are inherited from CDialog, which another CDialog is their parent which has a timer that calls a tick function that invalidates each dialog
when i start my program up everything runs fine, i can see that both GL Dialogs are running at around 30fps,if i click on the first, everything is fine, they are updating fine. When i click on the second GL Dialog the first one stops updating, then i click on the first one again and it begins updating both fine. I'm pretty sure its not a CPU problem because the CPU stays at around 20-40% during this test.
Im thinking its something to do with the focus and invalidate(0) i call on the tick maybe the paint messages for the unfocused window gets thrown out because the second windows are more important? should i not be calling invalidate and just directly call my paint functions on tick?