Commit Graph

4 Commits

Author SHA1 Message Date
Robert Osfield
5162fcc108 From Wang Rui, "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."
2011-09-12 10:47:59 +00:00
Robert Osfield
07e94c8ce0 From Almalric Alexandre, "I've noticed that all osgViewerMFC example from osg 2.x.x are flickering when resizing 3D view, to avoid this only add OnEraseBkgnd callback in CMFC_OSG_MDIView class and do nothing in it. Just like the WxWidget example.
Attached the modified version of MFC_OSG_MDIView.cpp and MFC_OSG_MDIView.h."

Note from Robert Osfield, submission came with wrong header file, so have had
to guess at what it should be, fingers crossed it worn't break windows build... :-)
2007-09-03 10:04:34 +00:00
Robert Osfield
fee5bc9f8c From Michael Hartman, "Here is an update for the closing issue with the example osgviewerMFC where the MFC rendering thread would not exit before the application and the thread would be left running in the background and the user would have to use TaskManager to kill the process.
Changes:

MFC_OSG.cpp:

            Removed pixelformatdesciptor from the class initialization.

            Used setInheritedWindowPixelFormat to true so it will setup the pixelformat for the window.

            Added class destructor code.

MFC_OSG.h:

            Removed the ref_ptr on osgViewer::Viewer

MFC_OSG_MDIViewer.cpp:

            Changed the OnDestroy function code.

            Added WaitforSingleObject with thread handle for the MFC render handle.

MFC_OSG_MDIView.h:

            Added class variable for MFC Render Thread Handle for use with the WaitforSingleObject.
"
2007-07-23 20:37:49 +00:00
Robert Osfield
4eb8427327 From Michael Hartman, " Here is the MFC_OSG example. It is very basic and the community is welcome to enhance/improve this example. There is one bug documented in the Readme.txt file that I just have not had time to solve. Also, the code is built outside of the OSG environment and uses environment variables to get to the OSG distribution headers and examples. That should be the only change a user needs to make to get the code to compile." 2007-05-11 08:19:46 +00:00