Commit Graph

3252 Commits

Author SHA1 Message Date
Robert Osfield
73f321c472 Fixed potential memory leak by introducing ref counting. 2016-06-10 14:58:42 +01:00
Robert Osfield
38d91ca3fe Introduced use of local std::string to work around issue of the read header.text not being null terminated and causing a problem with the strstr call. 2016-06-10 14:36:50 +01:00
Robert Osfield
9206d2a962 Restructed variable ordering and added missing va_end(). 2016-06-10 14:09:43 +01:00
Robert Osfield
9e5817c387 Fixed line endings 2016-06-10 14:09:03 +01:00
Robert Osfield
bdf3600011 Restructed fgetc usage. 2016-06-10 14:02:55 +01:00
Robert Osfield
fc1b963107 Fixing some of the more glaring coding errors in DW plugin. 2016-06-10 13:42:13 +01:00
Sebastian Messerschmidt
7ccf16b83d OpenFlight-plugin with extended attributes.
Added the addtional properties (terrain, roofline and footprint) alongside with the SMC/FID attributes. Also I added the newly added IRMaterial to the per-geode properties.
Added the Texture-EffectId and the mapping index as a user-value to the texture object.
Naming scheme is the same as for the per-vertex/geode attributes.
2016-06-09 10:15:38 +01:00
Laurens Voerman
09badeb19c Merge remote-tracking branch 'upstream/master' 2016-06-08 16:16:48 +02:00
Laurens Voerman
075de21af1 visual studio 2015 warning fixes:
OpenSceneGraph\src\osgPlugins\dae\daeRAnimations.cpp(470): warning C4456: declaration of 'kfCntr' hides previous local declaration
  OpenSceneGraph\src\osgPlugins\dae\daeRAnimations.cpp(452): note: see declaration of 'kfCntr'
OpenSceneGraph\src\osgPlugins\dae\daeReader.cpp(202): warning C4456: declaration of 'i' hides previous local declaration
  OpenSceneGraph\src\osgPlugins\dae\daeReader.cpp(188): note: see declaration of 'i'
OpenSceneGraph\src\osgPlugins\dae\daeReader.cpp(226): warning C4456: declaration of 'i' hides previous local declaration
  OpenSceneGraph\src\osgPlugins\dae\daeReader.cpp(188): note: see declaration of 'i'
OpenSceneGraph\src\osgPlugins\dae\daeReader.cpp(243): warning C4456: declaration of 'i' hides previous local declaration
  OpenSceneGraph\src\osgPlugins\dae\daeReader.cpp(188): note: see declaration of 'i'
OpenSceneGraph\src\osgPlugins\dae\daeReader.cpp(253): warning C4456: declaration of 'i' hides previous local declaration
  OpenSceneGraph\src\osgPlugins\dae\daeReader.cpp(188): note: see declaration of 'i'
2016-06-08 14:22:14 +02:00
Robert Osfield
ae98593403 Fixed unused parameter warning. 2016-06-08 10:59:55 +01:00
Robert Osfield
7b7899154c Fixed unused parameter warning. 2016-06-08 10:58:14 +01:00
Robert Osfield
801d41c47a Fixed unused parameter warning. 2016-06-08 10:55:22 +01:00
Robert Osfield
f774a38cf2 Fixed unused parameter warning. 2016-06-08 10:52:40 +01:00
Robert Osfield
19ec9bbef6 Fixed unused parameter warning. 2016-06-08 10:51:45 +01:00
Robert Osfield
4e442f483f Fixed unused parameter warning. 2016-06-08 10:46:45 +01:00
Robert Osfield
bc866c51de Fixed unused parameter warning. 2016-06-08 10:45:32 +01:00
Robert Osfield
e23798d630 Fixed unused parameter warning. 2016-06-08 10:43:57 +01:00
Robert Osfield
1d37501262 Fixed unused parameter warning. 2016-06-08 10:42:00 +01:00
Robert Osfield
883e195bba Fixed unused parameter warning. 2016-06-08 10:16:20 +01:00
Robert Osfield
eae28e4d91 Fixed unused parameter warning. 2016-06-08 10:15:51 +01:00
Robert Osfield
4dfd655b0c Fixed unused parameter warning. 2016-06-08 10:14:56 +01:00
Robert Osfield
b4900811a7 Fixed -Wextra warning 2016-06-08 10:00:18 +01:00
Robert Osfield
37e83f7c62 Disabled -Wextra for dae build as warnings in COLLADA_DOM headers can't be fixed 2016-06-08 09:59:33 +01:00
Robert Osfield
39a2d755db Fixed -Wextra warning 2016-06-08 09:57:57 +01:00
Robert Osfield
8d4a976477 Fixed unused parameter warning. 2016-06-08 09:57:30 +01:00
Robert Osfield
3783061c2a Fixed -Wextra warnings 2016-06-08 09:57:02 +01:00
Robert Osfield
f4078251be Fixed -Wextra warning 2016-06-08 09:56:35 +01:00
Robert Osfield
4d3a549727 Fixed unused parameter warning. 2016-06-08 09:55:33 +01:00
Robert Osfield
1778b15a4d Fixed unused parameter warning. 2016-06-08 09:55:15 +01:00
Robert Osfield
322cf0c39e Fixed unused parameter warning. 2016-06-08 09:54:10 +01:00
Robert Osfield
e9b8069204 Fixed unused parameter warning. 2016-06-08 09:52:09 +01:00
Robert Osfield
bc7156cd26 Fixed unused parameter warning. 2016-06-08 09:51:50 +01:00
Robert Osfield
85a77f42a4 Fixed -Wextra warnings 2016-06-08 09:50:38 +01:00
Robert Osfield
bfd1d7c55b Fixed unused parameter warning. 2016-06-08 09:49:58 +01:00
Robert Osfield
118411ba23 Fixed unused parameter warning. 2016-06-08 09:49:29 +01:00
Robert Osfield
1a093ca98d Fixed unused parameter warning. 2016-06-08 09:49:10 +01:00
Robert Osfield
2acca80be8 Fixed unused parameter warning. 2016-06-08 09:48:39 +01:00
Robert Osfield
c7b64cb9a7 Fixed -Wextra warnings 2016-06-08 09:48:14 +01:00
Robert Osfield
0be6502711 Fixed unused parameter warning. 2016-06-08 09:47:30 +01:00
Robert Osfield
7bb0f437c1 Fixed unused parameter warning. 2016-06-08 09:44:39 +01:00
Robert Osfield
4201191e44 Fixed -Wextra warnings 2016-06-08 08:54:43 +01:00
Robert Osfield
ef4de11cdb Fixed unused parameter warning. 2016-06-08 08:52:30 +01:00
Robert Osfield
fa45b3774b Fixed shadows warnings 2016-06-07 09:43:36 +01:00
Laurens Voerman
15e9484ff2 Build and warning fixes 2016-06-06 17:54:29 +01:00
Robert Osfield
357f76ba5a Removed shadowing declaration 2016-06-06 14:38:15 +01:00
Robert Osfield
ca633e8a5e Fixed line endings 2016-06-06 14:37:33 +01:00
Robert Osfield
b85358b38a Added disabling of the C4702 as changing the code would introduce it's own warning. 2016-06-06 14:28:41 +01:00
Robert Osfield
c0efaae364 Fixed shadowing warning 2016-06-06 14:28:12 +01:00
Robert Osfield
431749bd78 Fixed VS2015 warning 2016-06-06 14:18:43 +01:00
Björn Blissing
ff0ae07bb7 Quitened down VS warnings 2016-06-06 13:12:43 +01:00
Robert Osfield
c3f55ad1d8 Added "" around the CMAKE_CXX_FLAGS setting to fix build error 2016-06-04 18:36:36 +01:00
Robert Osfield
017ec902e2 Added -Wno-deprecated-register for Clang build to quieten warnings related to lex/yacc generated files 2016-06-03 17:38:32 +01:00
Robert Osfield
728c439e35 Fixed Clang warnings related to external dependencies 2016-06-03 10:18:41 +01:00
Robert Osfield
41ce857c93 Fixed clang warnings 2016-06-03 09:33:47 +01:00
Robert Osfield
853fad71ae Changed freetype plugin to utilize CMake's FindFreetype.cmake rather than use a local one. 2016-06-01 15:51:49 +01:00
Robert Osfield
1c78996a09 Added in extra search paths for FBX 2016-06-01 11:26:18 +01:00
OpenSceneGraph git repository
51e3b61555 Merge pull request #74 from susnux/fix-61
Added missing stdexcept header, fixes #61
2016-06-01 10:55:19 +01:00
Andreas Cadhalpun
e85d574334 Replace deprecated FFmpeg API to fix build with ffmpeg-3.0.x 2016-06-01 10:32:35 +01:00
Marcin Hajder
37258df59c Fix for nvtt plugin to support RGTC1/RGTC2 pixel format.
Thanks to this simple fix it's possible to compress red/red-green channel of RGB/RGBA image to GL_COMPRESSED_RED_RGTC1_EXT/GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT pixel format.
2016-05-31 12:45:28 +01:00
Robert Osfield
3bb8b73b8c Fixed warning message 2016-05-31 10:32:43 +01:00
Robert Osfield
01f1277203 Removed the redudent ive::ReadWrite base class 2016-05-31 10:28:08 +01:00
Robert Osfield
1b4aa2ce51 Removed virtual methods from base class as this was breaking the casting. Ironically this fix was required as the original "fix" for issue raised by Coverity introduced
a crash!
2016-05-31 09:46:03 +01:00
Tony Vasile
759b537250 OpenFlight-plugin with Surface Material Codes. There is one additional field that may be required by an existing application in addition to the IR Code is the IR Material. I have a small fix to include the IR Material as the User Value <UA:IRM> 2016-05-30 12:41:25 +01:00
Alberto Luaces
260cbab518 Typo fixes 2016-05-30 12:30:05 +01:00
Ralf Habacker
307001391f Fix 'unterminated_case: The case for value 7U is not terminated by a 'break' statement' in jpeg plugin.
Reported by Coverity: CID 86499: Missing break in switch (MISSING_BREAK)
2016-05-27 10:34:15 +01:00
Ralf Habacker
8851d548f9 Fix 'bad_override: Method ive::DirectionalSector::read hides
but does not override ive::ReadWrite::read because some type qualifiers do
 not match'.

Reported by Coverity: CID 86119 and 269 others
2016-05-27 10:28:26 +01:00
Robert Osfield
110cf56a17 From Wee See, "attached a small submission, which makes the option "readObjectRecordData" of OpenFlight-plugin working like documented in the Knowledge Base of OSG (52-using-the-openflight-plugin).
Actually, if the option "readObjectRecordData" is set, ObjectRecordData will not be read and set.
With this submission, if the option "readObjectRecordData" is set, ObjectRecordData will be read and set."
2016-05-26 18:08:44 +01:00
Robert Osfield
a41282b7be Fixed shadows warnings 2016-05-26 10:01:20 +01:00
Robert Osfield
bf8e22ae63 Fixed shadows warnings 2016-05-26 09:48:16 +01:00
Robert Osfield
bdad1f60c9 Fixed shadows warnings 2016-05-26 08:25:12 +01:00
Robert Osfield
95d8d7d993 Fixed shadows warnings in lwo plugin 2016-05-25 18:12:43 +01:00
Robert Osfield
f268afd044 Disable -Wshadow on GNU compile as OGR headers have shadowing parameters we can't fix. 2016-05-25 17:39:25 +01:00
Robert Osfield
29d4a02ee7 Fixed shadows warnigns 2016-05-25 17:34:59 +01:00
Robert Osfield
259b70156f Fixed shadows warnings 2016-05-25 17:10:54 +01:00
Robert Osfield
3a77520d22 Fixed shadows warnings - txp plugin was a mess w.r.t shadowing member variables. 2016-05-25 17:08:51 +01:00
Rohan Budhiraja
475948f8a2 Added missing stdexcept header, fixes #61 2016-05-21 21:40:07 +02:00
Robert Osfield
a0684bd058 Changed osg::NodeVisitor::traverse(node) to traverse(node) to take advantage of the local travese() implementation pushing/popping any StateSet that is on the node. 2016-05-18 18:30:51 +01:00
Robert Osfield
8c10323154 From Vladimir Chebaev, fixed handling of outline orientiation 2016-04-14 17:46:27 +01:00
Robert Osfield
9d68e13567 Added support for invoked an editor defined by P3D_EDITOR or EDITOR env vars when user press 'U' in Present3D.
This feature makes it easier to editor an presentation that is already running in Present3D, once the edits are done
pressing 'u' in Present3D then loads the file again.
2016-03-11 19:41:22 +00:00
Robert Osfield
370cb7bc6e Fixed debug build 2016-02-24 16:01:00 +00:00
Robert Osfield
9bdb3f55dd Replaced (long int) with more portable (GLint64) 2016-02-18 10:57:19 +00:00
Robert Osfield
08a1c45605 From Tony Vasile, "This is a fix for the handling of OpenFlight files with switches whose children have a transformation matrix on them. It may break other things and I have only tested this with one of my models." 2016-02-18 10:04:04 +00:00
Robert Osfield
51136204d2 Renamed zero and one to transparentCount and opaqueCount to avoid confusion in their meaning and usage. 2016-02-18 08:50:06 +00:00
Robert Osfield
c297fd18b2 Fixed warning 2016-02-17 17:47:38 +00:00
Robert Osfield
4f36b553b3 Commented out unused functions and variable. 2016-02-17 17:44:05 +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
90a0170d47 Fixed build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF. 2016-01-29 11:54:17 +00:00
Robert Osfield
2791d280ae From Sukender, "Collada writer fix : Fixed wrong handling of duplicate names in Collada writer.
The uniquify() method was not checking if the new name was actually in use or not.

Collada with rename option : Added an option to Collada writer, to rename uncommon IDs (geometries, materials...) to something more compatible (especially Google Earth).
Characters which may be interpreted as an URI are replaced with '_'. Useful if you want to ensure names having spaces or slashes to behave correctly. This may be undesired if original naming must be somewhat kept (hence making it an option)."
2016-01-21 12:40:11 +00:00
Robert Osfield
4de2fc120d Merge branch 'master' of https://github.com/openscenegraph/osg 2016-01-20 17:51:03 +00:00
Robert Osfield
8fc287c1b7 Added asUpdate/Cull/EventVisitor and asCamera/asDrawable to osg::Object and usage of these within the code base to avoid dynamic_cast<> usage. 2016-01-20 17:49:10 +00:00
Robert Osfield
1219a6d3bf Added more osg::Object::as*() methods and usage of these through the code base to avoid use of dynamic_cast<> when using UpdateVisitor/CullVisitor/EventVIisitor etc. 2016-01-20 15:13:19 +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
8882fb697e From Wojciech Lewandowski, Visual Studio 2008 compatibility fix
Two fixed files:

osgPlugins/osgjs/JSON_Objects
osgPlugins/stl/ReaderWriterSTL.cpp.

They did not compile with VS 2008 (recent master from Github). It looks like they defined stdint types  (missing in VS 2008) but code using them also included <osg/Types> header. Errors were caused by minor differences in signed int definitions. I just removed own definitions and added include<osg/Types> instead. It solves the problem and makes the code clearer now.
2015-12-14 17:59:45 +00:00
Robert Osfield
15f866a322 Addded setting of the Locator CoordinateSystemType
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15177 16af8721-9629-0410-8352-f15c8da7e697
2015-11-09 15:10:50 +00:00
Robert Osfield
f893dc5ad1 From Alberto Luaces, "here are two minimal capitalization fixes for mingw cross-compilation, where case sensitivity matters."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15169 16af8721-9629-0410-8352-f15c8da7e697
2015-10-23 15:04:13 +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
41f284b678 Moved FIND_PACKAGE(Boost) to within the individual Find scripts that actually need it rather in the root CMakeLists.txt.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15093 16af8721-9629-0410-8352-f15c8da7e697
2015-08-11 08:43:40 +00:00
Robert Osfield
fde838b029 From Glenn Waldron, fix error in ZIP plugin handling of memory buffer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15067 16af8721-9629-0410-8352-f15c8da7e697
2015-08-08 08:49:42 +00:00
Robert Osfield
1fe7aa056b From Kristofer Tingdahl, warning fixes.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15030 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 10:54:13 +00:00
Robert Osfield
f5ef9486bb Merged VS2013 warning fixes from OSG-3.4 branch
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15020 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 14:31:05 +00:00