Commit Graph

1054 Commits

Author SHA1 Message Date
Robert Osfield
5ae95903b9 From Eric Wing, interface files 2007-06-08 16:47:18 +00:00
Robert Osfield
ce0f30cfcb From Martin Lavery and Robert Osfield, added fallbacks for when now command line args are provided. 2007-06-08 15:37:20 +00:00
Robert Osfield
c4b1c27a31 Added fallback for when no command line args are provied. 2007-06-08 15:29:04 +00:00
Robert Osfield
42043db0c9 Added default file when no command line options are supplied. 2007-06-08 15:11:04 +00:00
Robert Osfield
01f2114ddb Added fallback for when no command line args are passed in. 2007-06-08 15:06:08 +00:00
Robert Osfield
4b33409ce0 Added default command line arg 2007-06-08 12:15:16 +00:00
Robert Osfield
b3cec3d986 Added default file load to avoid the need for command line option. 2007-06-08 12:13:33 +00:00
Robert Osfield
c28aba4d4f From Eric Wing, build fix 2007-06-08 10:43:26 +00:00
Robert Osfield
6cb0cef26d From Eric Wing, build fix 2007-06-08 10:43:01 +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
0cd7dd12bc Added clean up of the view before destruction of the window 2007-06-08 09:45:11 +00:00
Robert Osfield
db86ea2d3f From Martin Lavery, StatsHandler added to the ViewerCocoa example 2007-06-07 20:22:45 +00:00
Robert Osfield
7470d80e4c From Martin Lavery, update of *.nib files 2007-06-07 13:49:30 +00:00
Robert Osfield
589e57446f From Martin Lavery, update of *.nib files 2007-06-07 13:48:15 +00:00
Robert Osfield
ee1f8856b8 From Martin Lavery, update of *.nib files 2007-06-07 13:44:35 +00:00
Robert Osfield
2f656780e1 From Martin Lavery, update of *.nib files 2007-06-07 13:31:50 +00:00
Robert Osfield
c386901efa From Martin Lavery, update of *.nib files 2007-06-07 13:25:34 +00:00
Robert Osfield
2073c842cf From Martin Lavery, port of ViewerCocoa and updates to Xcode projects 2007-06-07 12:55:19 +00:00
Robert Osfield
1504b54c1a Removed the old SimpleView version of the Cocoa example 2007-06-07 12:47:56 +00:00
Robert Osfield
b3a304866a Removed now not need SimpleViewer 2007-06-07 12:46:09 +00:00
Robert Osfield
0f132ab21e Added support for using quat_scaled sx sy sz for testing getting quats from scaled
matrices.  Removed broken Matrixd/quat test
2007-06-07 11:05:59 +00:00
Robert Osfield
8500995ffd Added #include<osg/Geometry> 2007-06-06 16:27:00 +00:00
Robert Osfield
00df23b781 Fixed includes 2007-06-06 16:23:20 +00:00
Robert Osfield
373088c358 From Martin Lavery, Updates to Xcode project 2007-06-06 13:45:50 +00:00
Robert Osfield
85c8797bc4 Moved HelpHandler and StatsHandler classes into ViewerEventHandlers header, removed HelpHandler and StatsHandler headers 2007-06-06 11:21:13 +00:00
Robert Osfield
6844ac0209 Moved SimpleViewer from osgViewer into the osgviewerCocoa example directory as this
is the only place in the OSG that now relies upon SimpleViewer.
2007-06-06 10:58:21 +00:00
Robert Osfield
4c2814945e Renamed osgmultiplecameras to osgcompositeviewer 2007-06-05 19:44:11 +00:00
Robert Osfield
18b305062a Renamed osgmultiplecamrea to osgcompositeviewer 2007-06-05 19:41:22 +00:00
Robert Osfield
04d1c77d92 Added CompositeViewer support into FLTK example 2007-06-05 19:40:07 +00:00
Robert Osfield
4f5a421c81 Added support for CompositeViewer 2007-06-05 19:10:18 +00:00
Robert Osfield
6576252211 Removed setting of font resolutions and added control of threading, with the default
theading set to SingleThreading to avoid crashes associated with non thread safe
sections of osgFX - the need to be fixed!!!
2007-06-04 19:33:59 +00:00
Robert Osfield
e25f04c4db Added control of threading model, setting default to SingleThreaded to avoid crash
associated with mixing useCursor(false) and multi-threading.
2007-06-04 17:11:40 +00:00
Robert Osfield
757c3c56b2 Fixed stray control character 2007-06-04 15:11:46 +00:00
Robert Osfield
8a38f80443 Cleaned up example 2007-06-04 14:47:16 +00:00
Robert Osfield
f3ec476d9f From Martin Lavery and Robert Osfield, ported fltk example to osgViewer::Viewer 2007-06-04 14:46:38 +00:00
Robert Osfield
ac739a2e6a Added local FindFLTK.cmake to avoid problems with FLTK no being found by standard
CMake FindFLTK.cmake.
2007-06-04 13:45:58 +00:00
Robert Osfield
a9d9d387df Fixed spelling of Receives 2007-06-04 08:38:11 +00:00
Robert Osfield
b5791629ea Added Viewer::setUpViewerAsEmbeddedInWindow convinience method 2007-06-03 09:34:28 +00:00
Robert Osfield
089b9dbd88 Removed osgsimple example 2007-06-03 09:11:41 +00:00
Robert Osfield
e9258849c3 Merged the osgviewerQT3 and QT4 examples into a single osgviewerQT example, and
ported across from SimpleViewer to using Viewer
2007-06-03 09:09:09 +00:00
Robert Osfield
14d1a325e5 Changed external library specication 2007-06-03 08:58:32 +00:00
Robert Osfield
b91bd278cc Ported across from SimpleViewer to using Viewer 2007-06-02 16:23:07 +00:00
Robert Osfield
ea990dddfa Ported QT3 example across to use osgViewer::Viewer, and made it possible to use the same source for both QT3 and QT4 2007-06-02 16:01:56 +00:00
Robert Osfield
179f903c90 Added osgViewer::GraphicsWindowEmbedded and ported GLUT, SDL and WX examples across from SimpleViewer to Viewer. 2007-06-02 15:31:21 +00:00
Robert Osfield
8edb2f7284 Ported GLUT example to using osgViewer::Viewer rather than SimpleViewer by using
a local GraphicsWindowEmbedded class to help the adaption.
2007-06-02 12:03:24 +00:00
Robert Osfield
0ab50f6100 Renamed all osgsimpleviewer* files to osgviewer* 2007-06-01 22:41:11 +00:00
Robert Osfield
33b6fdd6c6 Renamed osgsimpleviewer* examples to osgviewer* in prep for replacement of SimpleViewer by Viewer 2007-06-01 22:33:05 +00:00
Robert Osfield
9a0b39c34b From J.P Delport, "attached find an updated osgunittests.cpp that allows for the testing of
the matrix.getRotate() function when a matrix contains a scale as well
as a rotation.

The scale can optionally be switched off, see the top of
testQuatFromMatrix().

As expected, all the current methods for mat to quat conversion fail
these new tests. When the scale is omitted, mk2 of getRotate with sign
instead of signOrZero passes, as well as mk1.
"
2007-06-01 21:38:53 +00:00
Robert Osfield
c913f00d21 From Michael Hartman, "CMakeLists.txt:
Changed this back to setup_example since WIN32 flag is now supported.

 

MFC_OSG.h:

   Added flag to indicate when the rendering thread has exited.

 

MFC_OSG.cpp:

   Code modifications to support rendering flag thread exit.

 

MFC_OSG_MDIView.cpp:

   Change to OnDestroy function to wait until we get render thread exit flag is true before we close the window.

 

 

Main Exit Process:

   User presses escape button

   Viewer captures escape button and stops threading etc.

   Viewer sets Done when shutdown is complete

   MFC Render Thread monitors viewer->done for true

   MFC Render Thread exits while loop and sets MFC Done flag

   MFC View Window monitors MFC Done flag and then closes/destroys the window

"
2007-06-01 21:28:18 +00:00
Robert Osfield
604bd9b6d7 Removed setViewUpOnScreen settings 2007-06-01 19:21:41 +00:00