f57875ad02
files got messed up, most notiably the Nib and also the Localized strings file. I didn't notice the latter until now so Martin is missing this file. Anyway, the attached tar contains all new versions of all the necessary files. There are cleanups and fixes to a lot of things. Martin did a good job porting the thing to osg::Viewer so most of the code changes I made address other areas. Two things I noticed in the new port you might want to consider as feedback. First, there might be a bug with osgViewer when the view size goes to 0. If you play with the splitviews in this program and shrink the view until it is closed, and then re-expand it, the model doesn't come back, not even after a home() call. SimpleViewer didn't have this problem. Second, a more minor thing, this program has a take-screenshot--and-copy-to-clipboard feature via Cmd-C (or Menu item). I achieve this by using osg::Camera to render to an FBO and then copy the contents to Cocoa. To insert the camera, I manipulate the scenegraph so I can get the camera node in and out. I end up calling setSceneData at the end of eveything to restore everything to the original state before I started mucking with the scenegraph. This unfortunately, triggers a home() reset. So in this particular case, it make Copy look like it's changing the scene. The old SimpleViewer had the same problem, but I was able to work around it by directly invoking the underlying SceneView's setSceneData so the home() mechanism was bypassed. The viewer design seems to protect this data more carefully so the bypass trick won't work. My feedback is that maybe a flag or extra parameter can be introduced so a reset is not triggered if not desired. I have checked in a ton of Xcode fixes for the entire build process in general so once this piece gets checked in, hopefully everything will build cleanly." |
||
---|---|---|
.. | ||
Info.plist | ||
main.m | ||
ViewerCocoa.h | ||
ViewerCocoa.mm |