Commit Graph

5 Commits

Author SHA1 Message Date
Robert Osfield
b668a54e17 From Eric Wing, "For osgviewerCocoa, a very simple change to allow toggling between
fullscreen mode and back between views. (To activate, double click on
the view to toggle.) It demonstrates/uses the new one-liner fullscreen
method introduced in Leopard. Code will still compile and run in
pre-Leopard (thanks to Obj-C dynamic/late binding), but code path is
treated as a no-op in those cases."
2007-12-10 20:36:34 +00:00
Robert Osfield
cc0f1cb0fe From Martin Lavery and Robert Osfield, Updated examples to use a variation of the MIT License 2007-06-12 14:20:16 +00:00
Robert Osfield
f57875ad02 From Eric Wing, "So, something strange happened to the repo and some of this project's
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."
2007-06-08 10:16:33 +00:00
Robert Osfield
db86ea2d3f From Martin Lavery, StatsHandler added to the ViewerCocoa example 2007-06-07 20:22:45 +00:00
Robert Osfield
2073c842cf From Martin Lavery, port of ViewerCocoa and updates to Xcode projects 2007-06-07 12:55:19 +00:00