Commit Graph

328 Commits

Author SHA1 Message Date
scrawl
295742c0d7 Fix typo in processor affinity API 2016-10-10 18:02:38 +02:00
Robert Osfield
7ba7b13aa0 Fixed VisualStudio warning
Added local implementation of asEventHandler()
2016-10-07 14:51:39 +01:00
Robert Osfield
91538d90f8 Added ViewerBase::s/getUseConfigureAffinity(bool flag) to allow users to toggle whether they want the ViewerBase::setUpThreads() method to call ViewerBase::configureAffinity() or not. 2016-10-07 12:17:03 +01:00
Robert Osfield
ee97db3488 Introduced OpenThreads::Affinity support into osg::Camera, osg::GraphicsContext::Traitse, osgDB::DatabasePager and osgViewer::ViewerBase/Viewer/CompositeViewer.
Added ViewerBase::configureAffinity() to help with the setting of the affinity of camera, graphics context and pager threads
2016-10-07 12:17:03 +01:00
Robert Osfield
dce1473a53 Seperated out the scene->requiresRedraw() method into a osgViewer::Viewer::requiresRedraw() method to make the functionality clearer and easier to override. 2016-07-05 11:54:31 +01:00
Philippe Renon
22d53357d3 split requiresUpdateSceneGraph() into requires update and requires redraw (wip) 2016-07-04 23:19:20 +02:00
Björn Blissing
ed7d49c5d2 CleanUpOperation added to Viewer
Sometimes there is need to do cleanup with valid graphic contexts
before closing these contexts. The added operation runs a graphics
operation on each context before closing them.
2016-06-30 22:09:22 +02:00
Robert Osfield
990c04d4b9 Moved the scene related requiresUpdateSceneGraph() implementation details from View into Scene.
Added check against the ImagePager.
2016-06-29 15:34:11 +01:00
OpenSceneGraph git repository
48c1d0e8da Merge pull request #81 from filnet/checkneedtodoframe
refactor common code from CompositeViewer::checkNeedToDoFrame() and Viewer::checkNeedToDoFrame() into View
2016-06-29 15:15:31 +01:00
Robert Osfield
eb4dcba21a Removed unused variable 2016-06-23 16:32:45 +01:00
Robert Osfield
97acecdf66 Added initializer 2016-06-22 11:41:58 +01:00
Philippe Renon
dfc9eec3c3 make osgViewer::View::requiresUpdateSceneGraph() virtual 2016-06-11 17:05:00 +02:00
Philippe Renon
37ef07ce7e refactor common code from CompositeViewer::checkNeedToDoFrame() and Viewer::checkNeedToDoFrame() into View 2016-06-11 16:58:51 +02:00
Robert Osfield
d3c6dc6f34 Fixed doxygen warnings 2016-06-01 14:20:14 +01:00
Robert Osfield
68430ee8e5 Added a local implementation of SlideEventHandler::checkNeedToDoFrame() so that Present3D can toggle on/off the need for continuous rendering to only slides that require it,
enabling slides with no animation to sit iddle rather keeping rendering, reducing CPU/GPU overhead and saving power.
2016-03-10 16:35:08 +00:00
Robert Osfield
d055216740 From Wee See and Robert Osfield, Introduced StatsHandler::collectWhichCamerasToRenderStatsFor(osgViewer::ViewerBase* viewer, osgViewer::ViewerBase::Cameras& cameras) method to make it
possible to customize which Cameras the handler renders stats for.
2016-03-01 11:06:39 +00:00
Robert Osfield
98ca24ff4e From Laurens Voerman, "a few additions in the repository (asDrawableEventCallback / asDrawableCullCallback) made this version a bit outdated,
so I get so new warnings. This update can fix those warnings."
2016-02-17 15:09:14 +00:00
Robert Osfield
937ef73521 From Laurens Loerman, Fix for "Visual Studio 2013 gives me a large amount (2778) of warnings about inheritance via dominace (C4250)." 2016-02-15 12:37:05 +00:00
Robert Osfield
55a8f4abbc Renamed DrawableUpdate/Event/Cull callbacks to use new include/osg/Callback versions 2016-01-19 11:39:28 +00:00
Robert Osfield
ead6924a78 Fixed typo 2015-11-23 08:54:09 +00: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
583801179e Added #ifdef guards around SGIX specific parts to avoid build problems with GLES
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15069 16af8721-9629-0410-8352-f15c8da7e697
2015-08-09 09:07:05 +00:00
Robert Osfield
687e77ddc9 From Andy Skinner, "Someone was using our code on a system that does not seem to have the SGIX symbols used in osgViewer.cpp.
I used osgSetGLExtensionsFuncPtr to remove the symbols.  I don't know how to test this path, but it did remove the symbols from libosgViewer.so.  I have also not been able yet to see if that was sufficient for our customer.

 

I did this by looking at other cases, and I tried to follow some of the same practices in PixelBufferX11, like using _useSGIX in a similar way to the previous _useGLX1_3."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15041 16af8721-9629-0410-8352-f15c8da7e697
2015-08-03 19:14:09 +00:00
Robert Osfield
435a81a905 From Pjotr Svetachov, buid fixes for VS2015.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15021 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 14:37:17 +00:00
Robert Osfield
ff42ff2a11 From Jannik Heller, Removed unused StatsHandler::_keyEventToggleVsync
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14893 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:05:24 +00:00
Robert Osfield
d14a602a59 From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14882 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:11:49 +00:00
Robert Osfield
70b5297575 From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14826 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 18:01:12 +00:00
Robert Osfield
53198f2e9b Cleaned up warning generated when compiling osgocculusviewer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14695 16af8721-9629-0410-8352-f15c8da7e697
2015-02-17 10:36:41 +00:00
Robert Osfield
485709f708 Moved GL2Extensions functionality into the include/osg/GLExtensions header and new GLExtensions object.
Moved the #defines into new include/osg/GLDefines
Converted all GL2Extensions usage to GLExtensions usage


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14593 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 10:38:12 +00:00
Robert Osfield
f634152de0 Moved osg::Drawable::Extensions into osg::GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14575 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 17:26:42 +00:00
Robert Osfield
d4c4bee020 From Laurens Voerman, "just like ClusterCullingCallback (fixed in r14322) visual studio likes an explicit implementation of run() for InteractiveImageHandler.
The warning is (14 times):
include\osgViewer/ViewerEventHandlers(542): warning C4250: 'osgViewer::InteractiveImageHandler' : inherits 'osgGA::EventHandler::osgGA::EventHandler::run' via dominance (src\osgViewer\StatsHandler.cpp)
          include\osgGA/EventHandler(45) : see declaration of 'osgGA::EventHandler::run'


attached a zipped version of include\osgViewer\ViewerEventHandlers"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14343 16af8721-9629-0410-8352-f15c8da7e697
2014-07-02 10:25:29 +00:00
Robert Osfield
a316c30b4a Removed redudent NodeVisitor::s/getUserData() as osg::Object provide this.
Added using run entry to InteractiveImageHandler to quieten warning




git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14247 16af8721-9629-0410-8352-f15c8da7e697
2014-06-06 15:05:31 +00:00
Robert Osfield
977ec20751 Refactored Callback system in osg::Node, osg::Drawable, osg::StateSet and osg::StateAttribute to use a new osg::Callback base class.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14244 16af8721-9629-0410-8352-f15c8da7e697
2014-06-05 16:26:13 +00:00
Robert Osfield
4f19237467 Removed unimplemented method 2014-01-27 15:43:36 +00:00
Robert Osfield
405cb0d828 Made protected methods virtual to allow subclassing to customize more aspects of the window setup. 2014-01-22 17:29:44 +00:00
Robert Osfield
d3a7115c45 Removed trailing spaces, added missing return to last lines 2013-11-22 09:38:50 +00:00
Robert Osfield
4a660f6266 Introduce new osgGA::Event and osgGA::EventHandler base classes that the old GUIEventAdapter and GUIEventHandler now subclass from.
The new osgGA::Event is written to support more generic events than the original GUIEventAdapter which are written for keyboard and mouse events.
2013-10-25 14:54:15 +00:00
Robert Osfield
0175c820af From Mathieu Marache, "we found that events where not caught when running in ON_DEMAND frame scheme : GraphicsWindow::checkEvents() always return false and GraphicsWindowQt doesn't overload it.
here is a simple fix that will return if the list is empty or not and will match the comment in checkEvents()
2013-07-19 06:20:46 +00:00
Robert Osfield
d82768417d From David Callu, "in osgViewer::WoWVxDisplay::WoWVxDisplay(unsigned int type=20, unsigned int screenNum=0)
screenNum is unused.

fix attached.
"
2013-06-28 10:59:01 +00:00
Robert Osfield
fb3178106a Fixed panning bug, when using RUN_ON_DEMAND, that resulted in the camera being thrown off towards infinity.
The solution for to refactor the way that events are checked so I add a bool return type to checkEvents() method across osgViewer::GraphcisWindow, osgGA::Devive and osgViewer::Viewer/CompositeViewer classes
2013-05-24 09:35:58 +00:00
Robert Osfield
455ebbc5f1 Refactored the support for stereo and keystone RTT setup so that it can be applied to an existing Camera. 2013-05-20 19:24:34 +00:00
Robert Osfield
acb4ba8554 Added support for controlling border and override redirect to the SingleWindow View::Config 2013-05-20 14:17:43 +00:00
Robert Osfield
3b6c2b636a Renamed osgViewer::Config osgViewer::ViewConfig and moved it's declaration into include/osgViewer. 2013-05-16 10:11:06 +00:00
Robert Osfield
e3ed763c15 Added WoWVxDisplay view config 2013-05-16 09:08:27 +00:00
Robert Osfield
625821a91a Created a dedicated include/osgViewer/config and src/osgViewer/config directories to place all the Config classes. 2013-05-15 16:15:38 +00:00
Robert Osfield
bcbaaefa02 Introduced osgViewer::Config base class and beginnigs of various Config implementations.
Introduced osgViewer serializers plugin for serialization support for osgViewer::Config implementations and Keystone
2013-05-15 11:31:49 +00:00
Robert Osfield
4e34cadee2 Added to Viewer::realize() automatic setup using Keystone when available and enabled, and when no other window setup has been selected. 2013-05-13 09:18:37 +00:00
Robert Osfield
5dd07e4d1c Added keystone file handling 2013-05-10 16:06:10 +00:00
Robert Osfield
9c1c34d765 Moved Keystone support from osgkeystone example into osgViewer::View 2013-05-10 10:00:38 +00:00
Robert Osfield
e545627571 Moved Keystone class into osgViewer library. 2013-05-09 15:18:14 +00:00