Commit Graph

76 Commits

Author SHA1 Message Date
Robert Osfield
ddf8c68d26 Added support for multiple --login url username password entries to osgviewer 2017-10-05 15:37:03 +01:00
Robert Osfield
dd996a3289 Introduced CMake option OSG_PROVIDE_READFILE option that defaults to ON, but when switched to OFF disables the building of the osgDB::read*File() methods,
forcing users to use osgDB::readRef*File() methods.  The later is preferable as it closes a potential threading bug when using paging databases in conjunction
with the osgDB::Registry Object Cache.  This threading bug occurs when one thread gets an object from the Cache via an osgDB::read*File() call where only
a pointer to the object is passed back, so taking a reference to the object is delayed till it gets reassigned to a ref_ptr<>, but at the same time another
thread calls a flush of the Object Cache deleting this object as it's referenceCount is now zero.  Using osgDB::readREf*File() makes sure the a ref_ptr<> is
passed back and the referenceCount never goes to zero.

To ensure the OSG builds when OSG_PROVIDE_READFILE is to OFF the many cases of osgDB::read*File() usage had to be replaced with a ref_ptr<> osgDB::readRef*File()
usage.  The avoid this change causing lots of other client code to be rewritten to handle the use of ref_ptr<> in place of C pointer I introduced a serious of
templte methods in various class to adapt ref_ptr<> to the underly C pointer to be passed to old OSG API's, example of this is found in include/osg/Group:

    bool addChild(Node* child); // old method which can only be used with a Node*

    tempalte<class T> bool addChild(const osg::ref_ptr<T>& child) { return addChild(child.get()); } // adapter template method

These changes together cover 149 modified files, so it's a large submission. This extent of changes are warrent to make use of the Object Cache
and multi-threaded loaded more robust.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15164 16af8721-9629-0410-8352-f15c8da7e697
2015-10-22 13:42:19 +00:00
Robert Osfield
174c161daa Removed --sync related code as it's now integrated into osg::DisplaySettings and osgViewer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14457 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 14:47:43 +00:00
Robert Osfield
3b23b474dc Centralized the calling of #include <stdint.h> and VS fallback into include/osg/Types header
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14376 16af8721-9629-0410-8352-f15c8da7e697
2014-07-21 16:36:47 +00:00
Robert Osfield
48c9816c38 Added #include <stdint.h> to address compile issue on some Linux distro's.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14341 16af8721-9629-0410-8352-f15c8da7e697
2014-07-01 07:31:46 +00:00
Robert Osfield
4994b806d2 From Pjotr Svetachov, "For me osgviewer.cpp and Renderer.cpp were not compiling (visual studio 2013 with profile GL2) because they were still using GLuintEXT. So I changed that, see the attached files.
I also noticed that the generated OpenGL header were not copied to the installation directory so my own application could not find it."
2014-04-25 08:57:27 +00:00
Robert Osfield
5597248895 Introduced new scheme for setting up which version of OpenGL/OpenGL ES the OSG is compiled for.
To select standard OpenGL 1/2 build with full backwards and forwards comtability use:

  ./configure
  make

OR

  ./configure -DOPENGL_PROFILE=GL2

To select OpenGL 3 core profile build using GL3/gl3.h header:

  ./configure -DOPENGL_PROFILE=GL3

To select OpenGL Arb core profile build using GL/glcorearb.h header:

  ./configure -DOPENGL_PROFILE=GLCORE

To select OpenGL ES 1.1 profile use:

  ./configure -DOPENGL_PROFILE=GLES1

To select OpenGL ES 2 profile use:

  ./configure -DOPENGL_PROFILE=GLES2


Using OPENGL_PROFILE will select all the appropriate features required so no other settings in cmake will need to be adjusted.
The new configuration options are stored in the include/osg/OpenGL header that deprecates the old include/osg/GL header.
2014-04-23 09:08:26 +00:00
Robert Osfield
de428146b9 Fixed build 2013-08-23 16:47:27 +00:00
Robert Osfield
9eba9df292 From Alberto Luaces, "Documentation for -p and --speed options in osgviewer" 2013-06-28 14:47:02 +00:00
Robert Osfield
fa2fb07609 From Stephan Huber, RestHttpDevice plugin for support of remote application control via Rest http. 2012-10-30 12:31:27 +00:00
Robert Osfield
9282a367e9 Added typdef for Win32 2012-05-31 14:45:24 +00:00
Robert Osfield
a28907a67f From Jaap Gas, added missing break, and missing removeDraggerCallback. 2012-05-24 18:15:44 +00:00
Robert Osfield
348870d7ba Added --speed <ratio> command line parameter to osgviewer to enable control of the speed that animation paths are played back at. 2010-12-17 11:19:29 +00:00
Robert Osfield
9b70348ced Fixed typo of commercial 2010-11-22 11:22:03 +00:00
Robert Osfield
2cf3224dd3 From Jan Pecvia, improvements to manipulators and added new manipulator to osgviewer 2010-05-27 13:59:34 +00:00
Robert Osfield
b0db1a6171 Removed redundent spaces 2009-10-21 16:41:41 +00:00
Robert Osfield
554a6da56d Reverted erronous check-in (which was r10454) 2009-07-12 15:44:57 +00:00
Robert Osfield
6e6a7c960e Added Dragger::s/getActivationModKeyMask(..) and Dragger::s/getActivationKeyEvent(...) methods to make it possible to have draggers that only respond when you press a specified modified key or standard key.
Changed the optional dragger in osgvolume to require the shift key to be pressed for the dragger to become active.
2009-07-03 19:16:53 +00:00
Robert Osfield
4d9d02e880 Changed the default home position so that it's consistent with other OSG manipulators. Added setter of properties of the SphericalManipualtor, moved across to using doubles internally 2009-05-19 12:21:42 +00:00
Robert Osfield
de8089653b From Philip Lowman, "Mainly removing comments like "This file is automatically generated" (glad that never happened!)" 2009-03-23 16:05:42 +00:00
Robert Osfield
4324e9a915 Reverted previous check-in to osgviewer.cpp as this was an accididental check-in with the code only in testing state, not appropriate to be checked-in. 2008-12-19 12:50:33 +00:00
Robert Osfield
75bd8e9a1e Updated wrappers 2008-12-19 11:36:26 +00:00
Robert Osfield
cad2f6d4fc From Jean-Sebastien Guay, "Changes attached so that the CaptureOperation is passed in the constructor of the ScreenCaptureHandler (default 0 = default CaptureOperation). This way, you can do:
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler(
   new osgViewer::WriteToFileCaptureOperation("filename", "jpg")));

and the filename will be what you want. The WriteToFileCaptureOperation will add the context ID and the file number (if in SEQUENTIAL_NUMBER mode) to the file name.

(The attached also clarifies some notify messages, and corrects the comment when adding the handler in osgviewer.cpp)

I also remembered, the current architecture could allow a different CaptureOperation for each context, but currently the API only allows setting one CaptureOperation for all contexts. This could be improved if need be.

"
2008-07-21 21:28:48 +00:00
Robert Osfield
7ec7b8d9cb Added --login url username password http authentication option 2008-07-21 15:04:19 +00:00
Robert Osfield
46796978fd From Jean-Sebastien Guay and Robert Osfiled, osgViewer::ScreenCaptureHandler for
taking screenshots
2008-07-17 16:12:39 +00:00
Robert Osfield
965c72f5bd From Eric Sokolowski and Robert Osfield, moved command line option usage setup
from osgviewer example into osg::ArgumentParser and osgViewer::Viewer to make
them more universally available.
2008-05-12 10:55:55 +00:00
Robert Osfield
ca513efc1d Added LODScaleHandler 2008-02-28 20:02:43 +00:00
Robert Osfield
8abeaa1272 Added return 2007-12-21 13:31:25 +00:00
Robert Osfield
d57a16e023 Added DisplaySetting::s/getCompileContextHint() and use of this hint in osgViewer::Viewer/CompositeViewer.
Removed the CustomViewer in osgterrain example as the above now removes the need for it.
2007-08-11 14:49:14 +00:00
Robert Osfield
04c1dee7a2 Fixed GraphcicsContext::getMaxContextID so it properly returns the current max contextID.
Fixed the osgviewer's compile context code to account for the above fix.

Added compile context support into osgterrain example.
2007-07-17 10:54:17 +00:00
Robert Osfield
6931ae4878 Added include/osg/GLObjects + .cpp which provide osg::flush*DeletedGLObjects() methods.
Added and cleaned up DeleteHandler calls in osgViewer to help avoid crashes on exit.

Changed DatabasePager across to dynamically checcking osg::getCompileContext(..)

Updated wrappers.
2007-07-06 13:08:51 +00:00
Robert Osfield
d1fa520349 Added support for managing a CompileContext. Rearranged the DeleteHandler::flushAll call. 2007-07-05 18:33:20 +00:00
Robert Osfield
4a315e47fe Added optional set up of pbuffers for background compilation of the OpenGL objects
when database paging.
2007-06-22 14:48:43 +00:00
Robert Osfield
a9a55de053 Added osgViewer::View::setUpViewInWindow(...) method and command line option into
osgViewer::Viewer to allow you to specify the window dimentions and screen for
the window on startup.
2007-06-13 10:38:40 +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
6e3c9ad3d3 Added support for passing in ArgumentParser in Viewer and CompositeViewer constructor 2007-06-06 10:57:02 +00:00
Robert Osfield
78c831f850 Changed name of AnimationPathHandler to RecordCameraPathHandler 2007-06-01 10:42:24 +00:00
Robert Osfield
5a80e4bfdc From Jeremy Moles, new event handler to record the camera path. A few small tweaks by Robert Osfield to make it more consistent with the old osgProducer::Viewer behavior. 2007-06-01 10:39:27 +00:00
Robert Osfield
52b2548d31 Renamed ViewerEventHandler to ViewerEventHandlers 2007-05-14 15:16:26 +00:00
Robert Osfield
701ea582e5 Renamed the ScreenHandler to WindowSizeHandler, fixed the code style to be conform more
to the rest of the OSG, and moved the osgviewer across to using the event handlers
in osgViewer.
2007-05-14 15:07:04 +00:00
Robert Osfield
6a67b66e8e Added delay between sequential threading model changes to prevent the system from locking up
with 'm' is held down, which previous would cause the threading model to be thrashed.
2007-04-20 16:15:41 +00:00
Robert Osfield
ea071d3f1e Added fullscreen toggle event handler 2007-04-13 14:54:41 +00:00
Robert Osfield
2e6ee4bb39 Removed old gmake and VisualStudio build files 2007-04-10 13:10:25 +00:00
Robert Osfield
d9a94f7890 Moved the TARGET_NAME setting into the SETUP_APPLICATION/EXAMPLE macro 2007-03-19 17:18:59 +00:00
Robert Osfield
da64127539 Ran dos2unix on CMakeLists.txt files. 2007-03-19 13:26:34 +00:00
Robert Osfield
be3f61c49f From Luigi Calori, move to using local CMakeLists.txt files and explicit file lists.
From Robert Osfield, small ammendments of the above to seperate example and application installs, and fix the osgPlugins install directory.
2007-03-19 12:30:26 +00:00
Robert Osfield
e1fc31f256 Renenabled the toggling on the CullPerCameraDrawPerContext threading model in the thread event handler. 2007-02-14 16:29:07 +00:00
Robert Osfield
fe177e42d5 Added osgViewer::HelpHandler 2007-02-12 13:39:18 +00:00
Robert Osfield
12dfddea68 Added threading model option to command line parameters 2007-02-08 12:24:33 +00:00
Robert Osfield
e2d4581443 Disabled the toggling to ThreadModel CullThreadPerCameraDrawThreadPerContext 2007-02-07 21:16:22 +00:00