|
发表于 2011-8-4 15:01:57
|
显示全部楼层
Hi Robert,
I've encountered a strange problem that osgviewerMFC doesn't work well
with the StatsHandler. When the 's' key is pressed, the rendering
window will be halted. I tried solving the problem by commenting a
line in CMFC_OSG_MDIView::OnKeyDown() and it seems to work now.
Another improvement here is to use a thread class derived from
OpenThreads to replace the old _beginthread(). It helps a lot in
keeping a high frame rate when you open more than one MDI child
windows. And the application using OpenThreads in my opinion will be
more compatible and portable. So I'd like to submit my changes and see
if it could work for other Windows developers. :-)
参见wang rui的帖子,如上
我自己的理解,viewer在每帧会从消息队列取消息,由eventhandler处理,而事实上mfc也会取消息,路由到OnKeyDown(),也许原因就在这里,我是菜鸟,胡乱想的。
还有个osgviewermfc还有个问题,那就是内存泄露,那可是一串串的啊,很头疼 |
|