Commit Graph

2089 Commits

Author SHA1 Message Date
Robert Osfield
0223fff99c Fixed unused parameter warning. 2016-06-08 12:09:00 +01:00
Robert Osfield
832fc29fc1 Fixed -Wextra warnings 2016-06-08 12:07:14 +01:00
Robert Osfield
744421631e Fixed unused parameter warning. 2016-06-08 11:50:18 +01:00
Robert Osfield
c8d14a1745 Fixed unused parameter warning. 2016-06-08 11:48:02 +01:00
Robert Osfield
8a3b56cc59 Fixed unused parameter warning. 2016-06-08 11:41:54 +01:00
Robert Osfield
82cd2d4515 Fixed unused parameter warning. 2016-06-08 11:40:51 +01:00
Robert Osfield
34ef8e5f46 Fixed unused parameter warning. 2016-06-08 11:39:47 +01:00
Robert Osfield
5f34cddc31 Fixed unused parameter warning. 2016-06-08 11:38:40 +01:00
Robert Osfield
34dc153ff2 Fixed unused parameter warning. 2016-06-08 11:35:21 +01:00
Robert Osfield
77289a1396 Fixed -Wextra warnings 2016-06-08 11:34:06 +01:00
Robert Osfield
fe2b4f92a1 Fixed unused parameter warning. 2016-06-08 11:31:11 +01:00
Robert Osfield
93a8b916cc Fixed -Wextra warnings 2016-06-08 11:30:35 +01:00
Robert Osfield
772368ed1f Fixed unused parameter warning. 2016-06-08 11:18:20 +01:00
Robert Osfield
54aa65f496 Fixed ignored qualifiers warning 2016-06-08 11:07:56 +01:00
Robert Osfield
43f8a13d03 Fixed ignored qualifiers warning 2016-06-08 11:06:52 +01:00
Robert Osfield
20148c5b8d Fixed unused parameter warning. 2016-06-08 11:05:29 +01:00
Robert Osfield
2052b2741e Fixed unused parameter warning. 2016-06-08 11:04:24 +01:00
Robert Osfield
b1b7d17633 Fixed build issues when OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION is set to OFF 2016-06-02 12:22:51 +01:00
Alberto Luaces
68baf15806 defines for building on Hurd and BSD kernels 2016-05-31 12:58:57 +01:00
Alberto Luaces
260cbab518 Typo fixes 2016-05-30 12:30:05 +01:00
Robert Osfield
7d816362e6 Fixed shadows warning 2016-05-26 15:07:02 +01:00
Robert Osfield
dbce12842e Fixed shadows warnings 2016-05-26 11:13:56 +01:00
Robert Osfield
80e318ce15 Fixed shadows warnigns 2016-05-26 10:35:33 +01:00
Robert Osfield
304c048d84 Fixed shadows warnings 2016-05-26 10:24:44 +01:00
Robert Osfield
40f4cdb1ce Fixed shadows warnings 2016-05-26 10:24:31 +01:00
Robert Osfield
3db6aa255f Removed redundent #if OSG_USE_BOUND block 2016-05-19 17:38:50 +01:00
Christian Buchner
2ef6909d9b I am hereby submitting a deferred rendering code sample, originally written by Michael Kapelko in 2013. I am submitting this code with his approval.
Deferred rendering is now the de-facto standard rendering technique in many modern game engines, hence I think it is important to have this technique demonstrated in an osg code example.

This particular sample adds soft shadows as well as bump mapping into the rendering pipeline. The image files whitemetal_diffuse.jpg and whitemetal_normal.jpg from OpenSceneGraph-Data images folder are required (The OSG_FILE_PATH environment variable must be set correctly)

Two additional osgt models are included with the demo (best to also put them into OpenSceneGraph-Data, I think.

The shaders are currently defined in separate .frag and .vert files.
2016-05-19 17:20:29 +01:00
Robert Osfield
fe6238d126 Added osg::GraphicsContext::WindowingSystemInterfaces singleton for managing multiple WIndowinSystemInterface
implementations being registered at the same time.

One usage case for this functionality to support usage of Wayland and X11 in the same version of the osgViewer.

As part of the new functionality there is now a osg::GraphicsContext::Traits::windowingSystemPreferrence string
that default to empty, but if defined will ensure that a specific WindowingSystemInterface is utilized when
you do a generic call like osg::createGraphicsContext().

Also implemented is standard proxy object for registering the new contexts and removing them automatically, and
declaration of standard graphicswindow_name() C entry point to help with static build linking.
2016-05-16 13:45:31 +01:00
Robert Osfield
cb2af961db From Jannik Heller, Wrong function call in setTextureAttributeAndModes
"From I think that this piece of code in StateSet::setTextureAttributeAndModes is a copy&paste mistake:

            OSG_NOTICE<<"Warning: non texture attribute '"<<attribute->className()<<"' passed to setTextureAttributeAndModes(unit,attr,value), "<<std::endl;
            OSG_NOTICE<<"         assuming setAttributeAndModes(attr,value) instead."<<std::endl;
            OSG_NOTICE<<"         please change calling code to use appropriate call."<<std::endl;
            setAttribute(attribute,value);

As per the warning message it should be calling setAttributeAndModes(attribute,value); ."
2016-03-11 15:35:07 +00:00
Robert Osfield
67202b2662 From Romain Ouabdelkader, "This is a fix for osgText to calculate kerning and to load glyph3D with the text's font resolution.
Font::getKerning(...), Font::getGlyph3D(...) doesn't ask for a font resolution so it uses the last font resolution requested by Font:: getGlyph(...).
This can leads to different results depending of the precedent call to Font::getGlyph(...).
See http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2016-January/271952.html for more infos.

This fix adds a font resolution parameter to Font::getKerning(...), Font::getGlyph3D(...) and to the font implementations.
This was made under the base revision r15182."
2016-02-15 13:30:39 +00:00
Robert Osfield
2e7cfe7efa From Ravi Mathur, OSX/Clang 7.0.0 build fix 2016-01-19 15:39:46 +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
e8fd414661 Fixed line endings 2016-01-19 11:35:13 +00:00
Robert Osfield
30dc6a9428 Fixed line endings 2016-01-19 11:25:30 +00:00
Robert Osfield
e9179aaa4b Added window size, state and stats event handlers to viewer to help with QA'ing simplification results. 2016-01-18 11:49:18 +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
161246d864 Refactored the GL object deletion management to use new osg::GraphicsObjectManager/GLObjectManager base classes, and osg::ContextData container.
This approach unifies much of the code handling the clean up of OpenGL graphics data, avoids lots of local mutexes and static variables that were previously required,
and enables the clean up scheme to be easily extended by users providing their own GraphicsObjectManager subclasses.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15130 16af8721-9629-0410-8352-f15c8da7e697
2015-09-23 09:47:34 +00:00
Robert Osfield
0dd625f17e Added explicit initialization of osg::Referenced(true) to osg::Operation subclasses as it uses virtual inhertiance from osg::Referenced.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15025 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 15:46:47 +00:00
Robert Osfield
2208303496 Warning fixes for Clang-3.6
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15016 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 11:11:58 +00:00
Robert Osfield
37d051af5e Added output of HUD scene graph to hud.osgt and hud.osgb for testing purposes.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14901 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 09:44:37 +00:00
Robert Osfield
fd806293be From KOS, build fix for osg::Uniform::Callback to osg::UniformCallback change
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14889 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 09:07:41 +00:00
Robert Osfield
80791c6972 Changed name of UniformCallback to UniformBufferCallback to avoid conflict with changes to come to the osg::Uniform::Callback -> osg::UniformCallback.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14884 16af8721-9629-0410-8352-f15c8da7e697
2015-06-02 09:18:19 +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
820166b49d Rewrote the Text3D bevel implementation to automatically adjust bevel thickness to avoid overalapping and erronous tesselation.
Added osgText::Bevel::s/getRoundedConcaveJunctions(bool) to control how the bevel should be tessellated around concave junctions on the glyph boundary.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14871 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 10:05:47 +00:00
Robert Osfield
f66b430476 Comment out debug notification
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14857 16af8721-9629-0410-8352-f15c8da7e697
2015-04-23 12:58:27 +00:00
Robert Osfield
e08fd168f6 Build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14850 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 10:36:42 +00:00
Robert Osfield
a583b306c5 Added --test-NodeMask option to test crash when a parent of osgmanipulator::AntiSquish node has a NodeMask set to 0x0.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14842 16af8721-9629-0410-8352-f15c8da7e697
2015-04-17 13:22:07 +00:00
Robert Osfield
87122ca369 Fixed typo of SEPARATE enums
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14833 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 11:48:28 +00:00
Robert Osfield
0a1db3d6fc From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14832 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 10:43:56 +00:00
Robert Osfield
0335ea3760 Added passing of command line arguments to viewer construction to allow one to specify extra controls for the viewer such as window size etc.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14829 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 08:55:08 +00:00