[osg-users] how to suspend rendering context thread

forest forest37 at 163.com
Wed Nov 25 05:59:05 PST 2009

hi all,
        When I use osgMFCViewer, I create multiple rendering context,that's to say there are many HWND, each HWND is related to one Render thread ,so much CPU resource is taken up.  This is what I want to do: When one viewport is maximazed, the others will be hidden ,so these hidden context do not need continue the rendering. I want to suspend and resume some rendering thread depends on message CWnd::OnSize(UINT nType,   int cx, int cy ). I checked the MSDN and find that the parameter nType can be one of the following values
SIZE_MAXIMIZED   Window has been maximized.
 SIZE_MINIMIZED   Window has been minimized.
 SIZE_RESTORED   Window has been resized, but neither SIZE_MINIMIZED nor SIZE_MAXIMIZED applies.
 SIZE_MAXHIDE   Message is sent to all pop-up windows when some other window is maximized.
 SIZE_MAXSHOW   Message is sent to all pop-up windows when some other window has been restored to its former size. 
 My problem is that I never get SIZE_MAXHIDE or SIZE_MAXSHOW message.
 Is there anyone who has used SIZE_MAXHIDE or SIZE_MAXSHOW message? Or is there any other way to reduce the CPU resource usage?
 thanks in advance
 best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091125/733d501a/attachment.htm>

More information about the osg-users mailing list