Compare commits

...

3822 Commits

Author SHA1 Message Date
Robert Osfield
925270d909 Removed indentation to avoid github MD mark up from loosing link. 2022-12-01 18:18:42 +00:00
Robert Osfield
dd1745896a Updated links to discussion forum. 2022-12-01 18:15:55 +00:00
Robert Osfield
6c1cbb1f48 Fixed copyright notice 2022-09-27 11:12:10 +01:00
Robert Osfield
5a939746cc Removed debug messages 2022-05-14 15:17:37 +01:00
mmurrian
606a32685e Update DisplaySettings.cpp
DisplaySettings::setDisplaySettings sets _shaderHint from itself (potentially uninitialized)
2022-04-07 15:29:56 +01:00
Robert Osfield
06558a5dda Quietened down debug message 2021-12-09 15:46:15 +00:00
Robert Osfield
7505cb4603 Fixed orientation of quad strips. 2021-12-09 12:36:40 +00:00
Robert Osfield
8b20f0adef Renanabled check for Asio 2021-12-08 15:31:29 +00:00
Robert Osfield
fee977ac90 Added workaround to prevent building against new Asio headers 2021-12-08 14:28:47 +00:00
Robert Osfield
62dbe7b85e Added 's' write selected nodes to "saved_selected.osgt feature. 2021-12-08 14:28:47 +00:00
Bo Svensson
ecaca716e9 removes invalid glReadBuffer calls 2021-10-08 10:49:01 +01:00
Robert Osfield
df21f59779 Added alias from asc to 3dc 2021-08-31 16:21:18 +01:00
Robert Osfield
e28f789ffa Disabled the use of asio as the RestHttpDevice plugin no longer compiles with modern boost releases 2021-06-25 13:17:21 +01:00
Alexander "Ananace" Olofsson
b7fa2d7914 Fix OpenThreads install on MSVC without a prefix
All this change does is make the install config for OpenThreads identical to the one in ModuleInstall.cmake
2021-06-24 12:19:40 +01:00
Robert Osfield
51924943e2 Removed unnedded include 2021-05-06 10:21:16 +01:00
elsid
969c1821be Add move constructor and move assignment operator to ref_ptr
Use conditional compilation to make it work only with C++11 support.
2021-05-06 10:21:04 +01:00
Calum Robinson
2695f29be0 Fix bounds for empty text nodes
_lineCount can be 0, so we get underflow if the alignment is one of
the *_BOTTOM_BASE_LINE.
2021-04-14 11:51:09 +01:00
Robert Osfield
78cb12b531 Merge pull request #1005 from eligovision/OpenSceneGraph-3.6_webgl_compr_tex
ASTC Compression Support Added; GLExtensions improvements
2021-03-29 10:32:13 +01:00
Robert Osfield
beb9bc3cf2 Merge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6 2021-03-29 10:07:02 +01:00
Robert Osfield
d11e84178f Merge pull request #1046 from eligovision/OpenSceneGraph-3.6_timer_query_gles
OpenSceneGraph 3.6 improvement: GL_EXT_disjoint_timer_query extension added
2021-03-29 09:57:43 +01:00
Gleb Mazovetskiy
b14eecb3c7 Check GL_NV_framebuffer_multisample_coverage
`isRenderbufferMultisampleCoverageSupported()` should not return true if
the extension is not supported.

Fixes #1028
2021-03-29 09:43:50 +01:00
Gleb Mazovetskiy
9fb010fadd Fix C++17 MSVC compilation error
With C++17, Windows headers must not be included after `using namespace std;`.

Windows headers define a `byte` type internally and `using namespace std`
causes it to conflict with `std::byte`:

    error C2872: 'byte': ambiguous symbol

MSVC thread: https://developercommunity.visualstudio.com/t/error-c2872-byte-ambiguous-symbol/93889
2021-03-29 09:31:55 +01:00
Robert Osfield
8a15f23c15 Merge pull request #1059 from eligovision/OpenSceneGraph-3.6_freetype_otf
FreeType plugin: 'otf' extension added
2021-03-29 09:26:46 +01:00
valid-ptr
e260dfb582 merged with upstream/OpenSceneGraph-3.6 2021-03-24 17:45:19 +03:00
valid-ptr
b728587fab conflict with upstream/OpenSceneGraph-3.6 resolved 2021-03-24 17:40:29 +03:00
valid-ptr
f29af50b76 FreeType plugin: 'otf' extension added 2021-03-24 17:01:00 +03:00
Gleb Mazovetskiy
8b2e02b71d Ensure global Mutex is initialized before Registry
A Registry instance may be accessed before the global mutex, e.g. here:

e77f50371c/src/osgText/Font.cpp (L49)

This leads to the Mutex being destroyed before the Registry is destroyed.

This causes a crash at exit, as described in #1048.

Fixes #1048.
2021-03-14 17:58:28 +00:00
Robert Osfield
5faae0e52e Moved Widget case to later. 2021-02-19 12:03:07 +00:00
Robert Osfield
5d51e5bf2a Fixed META_ macro usage 2021-02-18 16:13:50 +00:00
Robert Osfield
159c0271b7 Fixed osgWidget event handling 2021-02-18 16:08:25 +00:00
Robert Osfield
94d5211f43 Ran dos2unix to fix line endings 2021-02-17 18:23:32 +00:00
Robert Osfield
219adb7419 Ran dos2unix to fix line endings 2021-02-17 17:50:21 +00:00
valid-ptr
b101b4b4d2 GL_EXT_disjoint_timer_query extension added 2021-02-04 19:53:54 +03:00
Robert Osfield
b8862d0420 Merge pull request #1041 from glebm/3.6-cherry-pick-android-fix
3.6 cherry-pick: CMakeLists.txt: OSG_FIND_3RD_PARTY_DEPS option
2021-01-23 18:33:39 +00:00
Robert Osfield
8a0114a46a Replaced std::mem_fun_ref usage to avoid compatiblity with modern compilers. 2021-01-23 18:27:58 +00:00
Gleb Mazovetskiy
199035ae51 CMakeLists.txt: OSG_FIND_3RD_PARTY_DEPS option
Android-specific macros aren't needed in some cases, e.g. if the NDK is
setup with all the needed dependencies a much easier way to find
packages is to simply specify the correct `CMAKE_FIND_ROOT_PATH`.

The `ANDROID_3RD_PARTY` macro interferes with this.
Adds an option to disable it.

WIN32 build is in a similar situation, the new option affects it also.
2021-01-23 17:25:45 +00:00
Robert Osfield
23b4345517 Merge pull request #1032 from glebm/3.6-backport-deprecations-fix
Back-port (cherry-pick) warnings fixes into 3.6
2021-01-23 16:15:35 +00:00
Robert Osfield
b5b0bed7c3 Merge pull request #1039 from unelsson/clocaletodae
Use c-locale with std::istream
2021-01-23 15:57:16 +00:00
Nelsson Huotari
a531f2bd13 Use c-locale with std::istream 2021-01-23 14:46:16 +02:00
Gleb Mazovetskiy
f36e9f2a4a include/osgViewer: Fix typo
Follow-up to #1027
2021-01-23 10:53:44 +00:00
Robert Osfield
b7c186f6d3 Fixed warnings reported by gcc-9.3.0
Note from glebm@:

Back-ported from e0d5e4b0ff

Identical except for the changes to `MatrixTemplate`, which does not
exist in 3.6
2021-01-19 20:37:40 +00:00
valid-ptr
927d2f0f10 Texture::TextureProfile::computeSize function fixed for ASTC compressed textures 2021-01-19 12:09:24 +03:00
Robert Osfield
644251db98 Fixed warnings 2021-01-18 16:33:34 +00:00
Robert Osfield
295bfffc17 Added 0 to end of array. 2021-01-18 15:38:43 +00:00
Gleb Mazovetskiy
b4663ded94 osgAnimation/Keyframe: Fix -Wshadow warning
```
include/osgAnimation/Keyframe:108:53: warning: declaration of 'iterator' shadows a member of 'osgAnimation::TemplateKeyframeContainer<osgAnimation::TemplateCubicBezier<double> >' [-Wshadow]
  108 |             for(std::vector<unsigned int>::iterator iterator = intervalSizes.begin() ; iterator != intervalSizes.end() ; ++ iterator) {
      |                                                     ^~~~~~~~

include/osg/MixinVector:39:44: note: shadowed declaration is here
   39 |     typedef typename vector_type::iterator iterator;
      |                                            ^~~~~~~~
```
2021-01-18 14:51:48 +00:00
Gleb Mazovetskiy
44d3da02a9 Fix osgViewer USE_GRAPHICSWINDOW without a windowing system
There is no way for the user to know whether OSG was compiled with a
windowing system.

This means calling USE_GRAPHICSWINDOW() in client libraries was unsafe
in the case of the "None" windowing system, as it would fail to link.

Turns the call into a no-op in that case.
2021-01-18 14:48:12 +00:00
Gleb Mazovetskiy
4093860c32 cmake: Allow passing LTO option 2021-01-18 14:45:41 +00:00
Gleb Mazovetskiy
0161b8ab46 include/osg/Callback: nullptr -> NULL
Fixes travis, which explictly requires c++98
2021-01-18 14:45:06 +00:00
ankurverma85
417f78ac5e Update unzip.cpp 2021-01-18 14:07:47 +00:00
Robert Osfield
8195b9c8e7 Merge pull request #1015 from eligovision/OpenSceneGraph-3.6_state_arg_rename
Wrong argument name rename: uniformMap -> defineMap
2021-01-18 13:57:29 +00:00
Glenn Waldron
5ca6759a1f Fix for #1013 - Texture2DArray fails to regenerate after a releaseGLObjects/dirtyTextureObject - remove the modified count condition on component images when subloading when there is no texture object 2021-01-18 13:55:53 +00:00
Sam Brkopac
9c7cde1db4 updated cmake to properly disable debug iterators on windows 2021-01-18 13:42:40 +00:00
valid-ptr
aed9fd74f6 Wrong argument name rename: uniformMap -> defineMap 2020-12-29 15:07:15 +03:00
valid-ptr
39a78e075f isTextureLODBiasSupported check added 2020-12-04 18:34:02 +03:00
valid-ptr
b4eb001d14 ASTC Texture compression support added 2020-12-04 18:33:18 +03:00
valid-ptr
6cd699e55f GLExtensions: isTextureCompressionASTCSupported (ASTC compression texture), isTextureLODBiasSupported (is needed for GL_TEXTURE_LOD_BIAS) flags added 2020-12-04 18:32:35 +03:00
konstantin.matveyev
4b0bed8161 GLExtensions improved: added support for WebGL compressed textures: S3TC, ETC{1,2}, PVRTC 2020-11-26 14:02:50 +03:00
tomhog
ddbed23537 fix for typo in windows branch of delimiter definition 2020-11-12 12:55:23 +00:00
Robert Osfield
a13f8cf4b4 Merge pull request #973 from arnauddgbes/OpenSceneGraph-3.6
fixed installation of PDB files on Windows with Ninja generator.
2020-11-10 16:41:46 +00:00
Robert Osfield
fab1431e59 Merge pull request #989 from eligovision/OpenSceneGraph-3.6_shader_composer
ShaderComposition mechanism on the osg::State fixed
2020-11-10 16:19:40 +00:00
Matthew Reid
073cfab166 Added support for sRGB texture formats 2020-11-10 16:05:56 +00:00
Robert Osfield
bf279a59fa Merged from master "Declare "result" as LONG for Mingw build" 2020-11-10 15:56:39 +00:00
Robert Osfield
4ad410969e Added Node::accept() usage from IntersectionVisitor to IntersectVisitor 2020-11-10 15:44:51 +00:00
Robert Osfield
f50d32547d Changed to using Node::accept() to handled children of Geode/Billboard to enable scene graphs with non drawables as children 2020-11-10 15:34:32 +00:00
Robert Osfield
8406442a96 Merge pull request #976 from MeyerFabian/build/windows_clang_3.6_target
build/windows_clang 3.6
2020-11-10 14:45:22 +00:00
Robert Osfield
7994bfa767 Merge branch 'OpenSceneGraph-3.6' into build/windows_clang_3.6_target 2020-11-10 14:41:56 +00:00
Robert Osfield
b8982224c3 Merge pull request #969 from unelsson/daeremoveprotcheck
Remove "file" protocol check
2020-11-10 14:13:26 +00:00
Robert Osfield
8178b51956 Merge pull request #968 from unelsson/getdaenamesbonesskel
Get names of bones and skeleton to osg nodes
2020-11-10 14:04:29 +00:00
Robert Osfield
a7a7c0de8b Merge pull request #967 from unelsson/daepluginoptionsfix
Clone pluginOptions.options
2020-11-10 13:51:18 +00:00
Alberto Luaces
2ade061ced Code comments, log strings and some variable spell fixes. 2020-10-29 15:14:29 +00:00
valid-ptr
0415b7df84 ShaderComposition mechanism on the osg::State fixed: condition improved 2020-10-28 15:13:47 +03:00
valid-ptr
43724f004e ShaderComposition mechanism on the osg::State fixed 2020-10-27 17:24:28 +03:00
OpenSceneGraph git repository
300ba7aa02 Merge pull request #983 from rhabacker/update-so-version
Updated SO version as osgDB::ReaderWriter changes from #981 change the ABI
2020-08-19 10:45:54 +01:00
Ralf Habacker
97a4094d76 Updated SO version as osgDB::ReaderWriter changes from #981 change the ABI 2020-08-19 11:19:08 +02:00
OpenSceneGraph git repository
6b95718d65 Merge pull request #981 from rhabacker/3.6-add-plugin-env-support
Add support for showing environment variables provided by osg plugins
2020-08-19 09:57:43 +01:00
Ralf Habacker
47ab799168 Use new method supportsEnvironment() from class ReaderWriter in client code 2020-08-19 10:35:54 +02:00
Ralf Habacker
c3108697de Add support for showing environment variables provided by osg plugins 2020-08-19 10:35:54 +02:00
MeyerFabian
ba70c7d543 build/windows_clang 2020-07-21 17:37:24 +02:00
Arnaud Huck
855212548d fixed installation of PDB files on Windows with Ninja generator.
Also added installation of PDB files for OpenThreads
2020-07-14 12:09:53 +02:00
Robert Osfield
47207248d4 Selected USE_NEW_DELETE allocation mode to fix memory leak 2020-07-09 10:14:02 +01:00
Nelsson Huotari
e1e6e07de3 Remove protocol check 2020-07-01 12:44:43 +03:00
Nelsson Huotari
508cf89f9c get names of bones and skeleton to osg nodes 2020-07-01 12:42:03 +03:00
Nelsson Huotari
f29ecc10a8 clone pluginOptions.options 2020-07-01 12:39:24 +03:00
OpenSceneGraph git repository
46505f66d3 Merge pull request #965 from gramnation/patch-1
comment out cmake internal help markup
2020-06-23 17:54:38 +01:00
Graham Stewart
fb63c5b0a5 comment out cmake internal help markup
cmake 2.8.12 cannot parse it. From the looks of it this sort of markup only needs to be parsable when building cmake v3 itself.
2020-06-23 11:51:58 -05:00
Calum Robinson
2b64d30fca Return early in osgText::Text property setters
Matches what the rest of the properties are doing & avoids unnecessary
computation.
2020-05-29 11:12:35 +01:00
Mathias Nährig
e0b288fe37 Update GLExtensions.cpp
GLExtensions::glTexStorage2DMultisample in fact called glTextureStorage2DMultisample which expects texture object instead of texture target
2020-05-18 09:44:58 +01:00
Conrad Poelman
91cfc02700 Remove register keyword (deprecated in C++17/20)
The "register" keyword is deprecated as of C++17. (https://en.cppreference.com/w/cpp/keyword/register) Removing it is necessary to build with clang10+.
2020-05-18 09:44:40 +01:00
Robert Osfield
b29fb0b870 Added ZLIB as a build depdency to PNG plugin build 2020-05-07 11:28:53 +01:00
OpenSceneGraph git repository
6ca2487362 Merge pull request #934 from mp3butcher/orphanalreadyimmutable
[osg3.6] prevent immutability setting when textureobject is taken from orphans
2020-05-03 09:37:44 +01:00
Julien Valentin
197fc401b4 prevent immutability resetting when textureobject is taken from orphans 2020-05-02 16:01:16 +02:00
Robert Osfield
16cd192562 Updated shaders from OpenSceneGraph-Data. 2020-04-29 12:02:52 +01:00
Remo E
2f043345c9 [macosx 10.15] Fix for https://github.com/openscenegraph/OpenSceneGraph/issues/926 from @PetrBo and @tikittel 2020-04-29 10:52:27 +01:00
Robert Osfield
24fc34a440 Merge branch 'AnyOldName3-tga-1' into OpenSceneGraph-3.6 2020-04-29 10:28:51 +01:00
Robert Osfield
decf339b74 Merge branch 'tga-1' of https://github.com/AnyOldName3/osg into AnyOldName3-tga-1 2020-04-29 10:17:11 +01:00
Conrad Poelman
889325b496 Name unnamed typedef struct {...} to fix MSVC error
Compile with latest MSVC 16.6.0 Preview Release, got error message:
> osgPlugins\x\types.h(41,20): error C7626: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes (compiling source file ...3rdparty\OpenSceneGraph\src\osgPlugins\x\mesh.cpp)

The fix was just to give it a name, which will never be used. I picked Vector_struct, feel free to improve.
2020-04-29 09:45:00 +01:00
Jason Beverage
126623645f Closing ZipArchive in destructor 2020-04-29 09:25:13 +01:00
Scott Giese
6c908e9081 osgsimplegl3: fix minor typo 2020-04-29 09:18:54 +01:00
Robert Osfield
e4373b0143 Fixed crash during compile traversal 2020-04-29 09:14:01 +01:00
Chris Djali
16a5e019c5 Register option
Also make the capitalisation consistent with more plugins
2020-04-25 20:07:03 +01:00
AnyOldName3
597441ca33 Add option to treat all TGA files as TGA 1.0
Some files which are malformed TGA 2.0 files are technically valid TGA 1.0 files. For example, an image that just happened to have pixel data matching the TGA 2.0 footer or files created by buggy TGA 2.0 writers and were only ever fed to TGA 1.0 readers.
2020-04-13 20:42:57 +01:00
Scott Giese
864b087b1f Ignore Visual Studio Code configuration 2020-03-23 16:39:55 +00:00
Philip Lamb
75d03de844 png and tiff plugins do not depend on C++ exceptions. 2020-03-23 11:39:55 +00:00
OpenSceneGraph git repository
1bd75f464a Merge pull request #918 from LaurensVoerman/proxy-3.6
fix bug in ProxyNode with DEFER_LOADING_TO_DATABASE_PAGER
2020-03-13 08:46:29 +00:00
OpenSceneGraph git repository
d501def836 Merge pull request #914 from LaurensVoerman/las_recenter
ReaderWriterLAS recenter bug fixed, final batch of points was missed in translating the center point.
2020-03-13 08:36:19 +00:00
Robert Osfield
cdbec116fa Added arguments to viwer construction to allow better command line control 2020-03-13 08:33:52 +00:00
Laurens Voerman
68c5e6e6ca fix bug in ProxyNode with DEFER_LOADING_TO_DATABASE_PAGER causing crash when children reorder during load. 2020-03-02 10:48:12 +01:00
Laurens Voerman
638069f93b ReaderWriterLAS recenter bug fixed, final batch of points was missed in translating the center point. 2020-02-19 09:49:51 +01:00
Robert Osfield
a827840baf Updated ChangeLog 2020-01-31 11:03:07 +00:00
Robert Osfield
35f3876797 Updates for 3.6.5 release 2020-01-31 11:02:47 +00:00
Robert Osfield
2e0472ba7e Added mutex lock to avoid threading issues when glyphs are added to a Font from multiple threads 2020-01-31 10:37:25 +00:00
Robert Osfield
36e47d31bd Updates for 3.6.5-rc3 2020-01-30 19:25:50 +00:00
OpenSceneGraph git repository
994ea4d203 Merge pull request #911 from LaurensVoerman/FbxSdkFix
Fix for older versions of fbxsdk without xml or zlib libraries,
2020-01-30 16:30:41 +00:00
Robert Osfield
54ac72a126 Added explicit clean up removeView 2020-01-30 16:21:32 +00:00
Laurens Voerman
6559295768 Fix for older versions of fbxsdk without xml or zlib libraries, fix cmake multiconfig generators (msvc) with irrelevant CMAKE_BUILD_TYPE. 2020-01-30 17:13:14 +01:00
OpenSceneGraph git repository
9b41f260d9 Merge pull request #907 from DeadParrot/OpenSceneGraph-3.6
FBX plugin updates / PREFIX-NOTFOUND work-around
2020-01-27 10:11:23 +00:00
Stuart Mentzer
7a442801cd FBX plugin updates / PREFIX-NOTFOUND work-around 2020-01-26 14:28:56 -05:00
Robert Osfield
f3c615631b Updater rc number for 3.6.5-rc2, and CHangeLog 2020-01-21 10:11:30 +00:00
Robert Osfield
62cd8850e2 Removed stray space 2020-01-21 09:43:08 +00:00
OpenSceneGraph git repository
14e7bc5a17 Merge pull request #902 from mp3butcher/oqn
3.6 OQN API convergence
2020-01-21 09:32:57 +00:00
OpenSceneGraph git repository
5ac3a982ae Merge pull request #903 from dedowsdi/renderstage
Add getPreRenderList, getPostRenderList to RenderStage.
2020-01-21 09:16:51 +00:00
dedowsdi
a90a9a0a15 Add getPreRenderList getPostRenderList to RenderStage. 2020-01-21 11:00:25 +08:00
Daniel Trstenjak
995e849e8a OcclusionQueryNode: make all usages of 'updateDefaultQueryGeometry' thread safe 2020-01-20 16:44:58 +01:00
Daniel Trstenjak
ddb72691bc OcclusionQueryNode: fix resetting to default query geometry
When the query geometry gets reset to its default then its
vertices have to be updated by the bounding box dimensions of
the current children of the OcclusionQueryNode.
2020-01-20 16:44:48 +01:00
Daniel Trstenjak
817d92b703 OcclusionQueryNode: fix use case of user defined query geometry
The user defined query geometry handling has been broken in several ways.

The previous way of defining a query geometry was using the non const
`getQueryGeometry` method and overriding its members. But then
`OcclusionQueryNode` wasn't aware of the geometry change and couldn't
internally handle it correctly.

The `computeBound` method never considered a user defined query geometry and
always just overrode the vertices of the geometry.

The member `_validQueryGeometry` wasn't correctly set.

This change should fix all this issues by introducing a small backward
compatibility break. The non const `getQueryGeometry` method is removed
forcing the user to use the `setQueryGeometry` method. But then `OcclusionQueryNode`
is aware of the user defined query geometry and can handle it correctly.
2020-01-20 16:42:38 +01:00
Daniel Trstenjak
8fb5ba4a3f OcclusionQueryNode: reset the test result of the invalid geometry
There're cases that the occlusion test result has been retrieved
after the query geometry has been changed, it's the result of the
geometry before the change.
2020-01-20 16:24:24 +01:00
Daniel Trstenjak
3ef5d2b331 OcclusionQueryNode: ensure a valid query geometry
If the query geometry is invalid then don't do any occlusion queries and
never traverse the subgraphs.
2020-01-20 16:24:08 +01:00
Daniel Trstenjak
c64b94da2e OcclusionQueryNode: ensure a consistent value for '_passed' 2020-01-20 16:21:34 +01:00
Robert Osfield
19cf8b46c3 Introduced a QueryGeometry::getQueryResult(const osg::Camera*) method as a more informative replacedment for QueryGeometry::getNumPixels(). 2020-01-20 16:15:18 +01:00
OpenSceneGraph git repository
2568d1ac79 Merge pull request #900 from dedowsdi/fix_particle_rotation
Fix particle rotation.
2020-01-20 10:37:12 +00:00
dedowsdi
84ee98d9c4 Fix particle rotation. 2020-01-17 18:52:55 +08:00
Robert Osfield
49921bf300 Updated ChangeLog 2020-01-17 09:28:09 +00:00
Robert Osfield
b063f510c1 Moved setting of isftream locale to Model::readOBJ(..) and Model::readMTL(..). 2020-01-17 09:13:27 +00:00
Robert Osfield
396cfca1ae Added explict setting of local to classic to avoid local platform settings affecting parsing 2020-01-17 08:54:52 +00:00
Robert Osfield
aebc71a113 Updated README.md for 3.6.5-rc1 2020-01-14 16:32:29 +00:00
Robert Osfield
d8896f4bcb Updated ChangeLog and set rc candidate 1 for 3.6.5-rc1 2020-01-14 16:30:14 +00:00
Robert Osfield
b2b6ee952b Fixed warnings 2020-01-14 16:29:07 +00:00
Robert Osfield
fbe4e1cf2f Fixed build warning due to auto_ptr<> 2020-01-14 14:58:06 +00:00
Robert Osfield
2b9c501e18 Fixed workaround for invalid indices 2020-01-14 14:42:01 +00:00
OpenSceneGraph git repository
3930621edc Merge pull request #895 from openscenegraph/CurrentThreadId
Added commment explaining that OpenThreads::Thread::CurrentThread() r…
2020-01-13 14:14:48 +00:00
Robert Osfield
9305485a11 Added commment explaining that OpenThreads::Thread::CurrentThread() return NULL on non OpenThreads thread. 2020-01-13 14:12:54 +00:00
Robert Osfield
9e75926338 Added support for using CurrentCodePage functionality with osgText::String
To the DXF plugin added Option string support for using CurrentCodePage|WidePage, UTF8, UTF16, UTF32 and FontFile=filename
2020-01-13 13:41:37 +00:00
Robert Osfield
d969516595 Added encoding and font setting to dxfText as a first step towards making these user controllable to enble handling of non default settings 2020-01-13 09:58:47 +00:00
Robert Osfield
457d12d9b2 Added creation of image directories when required 2020-01-11 14:39:46 +00:00
Robert Osfield
61c7ee76c5 Fixed handling of _autoScaleTransitionWidthRatio<=0.0 2020-01-10 10:12:13 +00:00
Robert Osfield
605821e655 Implemented TextBase::compileGLObjects() with handling of VAO/VBOs to address bugs associated with VAO usage of Text. 2020-01-07 11:12:18 +00:00
Robert Osfield
d1ff16614c Added Thread::CurrentThreadId() method to wrap up thread id functionality in a more platform appropriate way. 2020-01-06 18:39:51 +00:00
OpenSceneGraph git repository
8551f25da0 Merge pull request #887 from limbolily/patch-1
Fix navagation error about Android GLES2 example.
2020-01-06 10:27:18 +00:00
limbolily
315031fa3b Fix navagation error about Android GLES2 example.
Android GLES2 example use event queue without initializing window rectangle with graphics context,that produce navigation error.
2020-01-06 14:48:34 +08:00
Michael Danilov
f4fe1e5cec Fix #877 "Shift key stuck if both shifts switch keymap"
Adapted the patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687332
2019-12-23 15:07:14 +00:00
Robert Osfield
7e8665308d Adopted CMake's FindDCMTK.cmake variables 2019-12-23 14:53:17 +00:00
OpenSceneGraph git repository
c50b699992 Merge pull request #874 from blobfish/occt7.4
Occt7.4
2019-12-22 12:29:47 +00:00
blobfish
cd5740e98f Plugins: OpenCasCade: Adding 'std' prefix where needed. See Following.
Prior to 7.4, occt had a 'using namespace std' in a header file that
was polluting dependent projects. They have since fixed it and so these
changes are required.
2019-12-19 12:41:56 -05:00
blobfish
023bfb8bbb Plugins: Cmake: OpenCasCade: Changing header used for include directory search. See Following.
BRepMesh.hxx is gone in occt 7.4. Now searching for Standard_Version.hxx, which should be more consistent.
2019-12-19 10:16:09 -05:00
Robert Osfield
c5ff9e63df Added classic locale setting to avoid local setting of locale affecting the GLSL code generated. 2019-12-18 14:25:07 +00:00
Robert Osfield
e5e5ea6239 Updated ChangeLog 2019-12-16 17:10:39 +00:00
Robert Osfield
9ae47b921b Added automatically removal from the OjbectCache when a object or it's subgraph contain Texture that no longer have an osg::Image. 2019-12-16 16:51:16 +00:00
OpenSceneGraph git repository
994b066329 Merge pull request #871 from LaurensVoerman/commit_tgaFix
fix debug compile error for ReaderWriterTGA
2019-12-16 11:54:12 +00:00
Laurens Voerman
ad82aea2e3 fix debug compile error for ReaderWriterTGA 2019-12-16 11:06:06 +01:00
OpenSceneGraph git repository
5f2a3ef76f Merge pull request #870 from eligovision/OpenSceneGraph-3.6_glext_fix
GLExtensions's isPBOSupported and isVAOSupported flags fixed
2019-12-16 09:40:30 +00:00
OpenSceneGraph git repository
2e7a7d786a Merge pull request #869 from eligovision/OpenSceneGraph-3.6_glext
Added FBO GL extensions (useful for mobile VR etc.)
2019-12-16 09:40:00 +00:00
konstantin.matveyev
67523373a9 GLExtensions's isPBOSupported and isVAOSupported flags fixed for GLES2+GLES3 configuration 2019-12-13 19:52:10 +03:00
konstantin.matveyev
f38fa9e9c3 GLExtensions's isInvalidateFramebufferSupported flag improved 2019-12-13 19:45:42 +03:00
PntAndCnt
99b2fffa7c Fontconfig should be external library.
Add Fontconfig to TARGET_LIBRARIES cause osg3::osgText target looking for
openscegraph-Fontconfig-import-targets.cmake, which doesn't exists.
2019-12-13 11:11:44 +00:00
PntAndCnt
3fbf24759f Fix a typo and invisible 3dtext in examples/osgtext.
Second text alignment is wrong when "--alignment" specified.

3D text radius is too small, only SCREEN_COORDS can be seen.

Text position should multiply radius.
2019-12-13 10:23:47 +00:00
Kent
d215b255c4 Mered fix for internalFormat 2019-12-13 10:03:52 +00:00
valid-ptr
51fee80224 glInvalidateFramebuffer added to GLExtensions 2019-12-13 12:09:06 +03:00
konstantin.matveyev
fefabb6c2b glFramebufferTexture2DMultisample added to GLExtensions 2019-12-13 12:08:37 +03:00
Dmitry Marakasov
27e3f57da2 Add FreeBSD-specific code bits for pthread_setaffinity_np support 2019-12-12 13:58:23 +00:00
Robert Osfield
56835cf821 Fix linking with Xinerama 2019-12-12 13:25:44 +00:00
OpenSceneGraph git repository
445596e59c Merge pull request #861 from aluaces/default-ffmpeg
Set ffmpeg as the default plugin for video files.
2019-12-12 13:09:33 +00:00
elsid
c0ea4c6310 Fix clang 8 & libc++ build errors
Replace operators for implicit type conversion by explicit data() method to
access implementation pointer and subscript operator to access element by
index just like in std::vector.

src/osgPlugins/tga/ReaderWriterTGA.cpp:455:22: error: use of overloaded operator '==' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'long')
        if (colormap == NULL)
            ~~~~~~~~ ^  ~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:525:16: error: use of overloaded operator '==' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'long')
    if (buffer == NULL || linebuf == NULL)
        ~~~~~~ ^  ~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:525:35: error: use of overloaded operator '==' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'long')
    if (buffer == NULL || linebuf == NULL)
                          ~~~~~~~ ^  ~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:548:30: error: use of overloaded operator '==' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'long')
            if (formattedMap == NULL)
                ~~~~~~~~~~~~ ^  ~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:574:40: error: use of overloaded operator '[]' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                        index = linebuf[x];
                                ~~~~~~~^~
src/osgPlugins/tga/ReaderWriterTGA.cpp:577:50: error: use of overloaded operator '+' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                        index = getInt16(linebuf + x * 2);
                                         ~~~~~~~ ^ ~~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:580:50: error: use of overloaded operator '+' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                        index = getInt24(linebuf + x * 3);
                                         ~~~~~~~ ^ ~~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:583:50: error: use of overloaded operator '+' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                        index = getInt32(linebuf + x * 4);
                                         ~~~~~~~ ^ ~~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:592:72: error: use of overloaded operator '+' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                        (dest + adjustedX * format)[i] = (formattedMap + index * format)[i];
                                                          ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:626:30: error: use of overloaded operator '==' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'long')
            if (formattedMap == NULL)
                ~~~~~~~~~~~~ ^  ~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:642:21: error: use of overloaded operator '==' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'long')
            if (buf == NULL)
                ~~~ ^  ~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:664:44: error: use of overloaded operator '[]' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                            index = linebuf[x];
                                    ~~~~~~~^~
src/osgPlugins/tga/ReaderWriterTGA.cpp:667:54: error: use of overloaded operator '+' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                            index = getInt16(linebuf + x * 2);
                                             ~~~~~~~ ^ ~~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:670:54: error: use of overloaded operator '+' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                            index = getInt24(linebuf + x * 3);
                                             ~~~~~~~ ^ ~~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:673:54: error: use of overloaded operator '+' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                            index = getInt32(linebuf + x * 4);
                                             ~~~~~~~ ^ ~~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:688:76: error: use of overloaded operator '+' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'int')
                            (dest + adjustedX * format)[i] = (formattedMap + index * format)[i];
                                                              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
src/osgPlugins/tga/ReaderWriterTGA.cpp:708:21: error: use of overloaded operator '==' is ambiguous (with operand types 'SafeArray<unsigned char>' and 'long')
            if (buf == NULL)
                ~~~ ^  ~~~~
17 errors generated.
2019-12-12 11:29:41 +00:00
OpenSceneGraph git repository
ddea94b41c Fixed indentation, replacing tabs with spaces 2019-12-12 11:13:49 +00:00
Tim Moore
5f1e33fcb3 Fix bug in matrix transpose() and transpose3x3
The diagonal elements were not copied from the source matrix.
2019-12-12 10:40:41 +00:00
flashk
46e17699b3 Support reading RGB float DDS images
The DDS plugin is not able to load floating point RGB images saved out by itself. There doesn't appear to be a fourcc code for RGB float/half-float data, so I added the appropriate entries to the RGBFormat table so the images can be loaded properly.
2019-12-12 10:38:40 +00:00
OpenSceneGraph git repository
38807c4bb8 Merge pull request #851 from LaurensVoerman/submitCpSubImg
fix copySubImage crash on compressed files
2019-12-12 10:08:32 +00:00
DCFennell
987521ba9c GL_CLAMP_VERTEX_COLOR and GL_CLAMP_FRAGMENT_COLOR deprecated in GL core profile according to OpenGL 4.5 specification. 2019-12-12 09:40:02 +00:00
Johannes Pabst
6776cc2c63 Fix: LuaCallbackObject could form circular references to LuaScriptEngine that prevented its destruction. Destruction of LuaScriptEngine now disarms all callbacks into Lua. 2019-12-12 09:24:19 +00:00
Riccardo Corsi
3fe2e5a9e0 Fbx Plugin: added plugin option to set the target axis system. Default left to OpenGL. 2019-12-12 09:19:59 +00:00
grdowns
0d94d8e5a6 Add vcpkg installation instructions 2019-12-12 09:14:26 +00:00
OpenSceneGraph git repository
c8e283cfe9 Merge pull request #837 from LaurensVoerman/carbonFix
fix apple carbon reference
2019-12-11 17:51:02 +00:00
OpenSceneGraph git repository
b1314c0fb8 Merge pull request #833 from cj-mcdonald/osga-fix
Update ReaderWriterOSGA.cpp
2019-12-11 17:07:27 +00:00
Guilhem Saurel
a86b90ca4a fix dae readme 2019-12-11 17:01:02 +00:00
OpenSceneGraph git repository
bc3372fda0 Merge pull request #828 from eligovision/OpenSceneGraph-3.6_ios_build_fix
Fix build iOS: when using Toolchain or building with Makefiles (not X…
2019-12-11 16:58:50 +00:00
OpenSceneGraph git repository
6477397b95 Merge pull request #822 from mp3butcher/patch-32
optimize indexed color DDS conversion
2019-12-11 16:47:44 +00:00
Alberto Luaces
8f6eff9de5 Set ffmpeg as the default plugin for video files.
As xine is not used anymore, there is no plugin in charge of loading
video files, and osgmovie and other programs are not able to open
them.

If ffmpeg is present, it is registered for opening video files.
2019-12-04 22:16:25 +01:00
Laurens Voerman
c4e7a07367 fix copySubImage crash on compressed files 2019-11-01 16:45:16 +01:00
Laurens Voerman
23b7c4d47d fix apple carbon reference 2019-09-11 10:22:16 +02:00
Colin McDonald
a9900712a4 Update ReaderWriterOSGA.cpp
Fix typo in osga archives which stops node files working
2019-09-02 17:43:38 +01:00
Konstantin S. Matveyev
6774f77779 Fix build iOS: when using Toolchain or building with Makefiles (not Xcode) 2019-08-23 18:35:49 +03:00
Julien Valentin
5516f86f9e use memcpy instead of union 2019-08-22 18:16:43 +02:00
Julien Valentin
a9546da368 optimize conversion with a union 2019-08-22 18:15:46 +02:00
Robert Osfield
415925b024 Removed exlict keyword to address build problems with VS older than 2015. 2019-08-22 14:50:56 +01:00
Remo E
30aae63c3b Debugging: Hint to debug LoadLibrary issues
This helps to debug loading dynamic libraries in an environment without implemented "dlopen". For example emscripten with static compiled OSG.
2019-08-22 13:48:01 +01:00
Robert Osfield
694b1c3d32 Merge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6 2019-08-17 20:04:38 +01:00
OpenSceneGraph git repository
a2436fa8b5 Merge pull request #820 from Capostrophic/dds
DDS plugin: add support for DDPF_PALETTEINDEXED8 pixel format reading
2019-08-17 20:04:30 +01:00
Björn Blissing
64d9b51f91 Fixed spelling error in warning message 2019-08-17 19:50:59 +01:00
capostrophic
a3b507bb01 Fix memory leaks 2019-08-17 15:28:09 +03:00
capostrophic
cbac09902d Add support for DDPF_PALETTEINDEXED8 pixel format reading 2019-08-17 04:15:23 +03:00
Robert Osfield
515a0bbe65 Added TKXCAF to find package list 2019-08-16 10:27:28 +01:00
Julien Valentin
0c142215b9 remove return of local pointer 2019-08-16 10:15:46 +01:00
OpenSceneGraph git repository
dcc6dce8e3 Merge pull request #818 from mp3butcher/patch-31
fix comment block CMake syntax
2019-08-16 09:35:00 +01:00
Julien Valentin
7b3d1dff25 fix cmake block comment syntax 2019-08-15 20:46:52 +02:00
Julien Valentin
842b334803 remove unproperly parsed CMake comment
https://github.com/openscenegraph/OpenSceneGraph/issues/812
2019-08-15 20:27:05 +02:00
OpenSceneGraph git repository
8f5695eafb Merge pull request #808 from 640kb/OpenSceneGraph-3.6
las plugin: fix linking against static boost library under windows
2019-08-07 10:56:59 +01:00
Daniel Wendt
0a704161fe las plugin: fix linking against static boost library under windows
Signed-off-by: Daniel Wendt <daniel.wendt@linux.com>
2019-08-07 10:36:03 +02:00
Robert Osfield
149c04b0df Added a _fontFallback to TextBase to cache any fallback font (usually DefaultFont) that is used when the Textbase::_font is null. 2019-07-31 14:11:59 +01:00
Robert Osfield
92abaca210 Replaced GL_QUADS usage with GL_TRIANGLE_STRIP 2019-07-29 13:01:00 +01:00
Robert Osfield
0e5bb43841 Refactored the mesh setup to use GL_TRIANGLE_STIP instead of GL_QUADS 2019-07-29 12:30:41 +01:00
Robert Osfield
b3808ef89c Updated version to 3.6.5 2019-07-29 09:59:57 +01:00
OpenSceneGraph git repository
99847c3ef2 Merge pull request #804 from eligovision/OpenSceneGraph-3.6_GLQUADS
[*] ParticleSystem: Use GL_TRIANGLES instead if GL_QUADS when GL{1,2}…
2019-07-29 08:57:56 +01:00
Konstantin S. Matveyev
0a6bea870c [*] ParticleSystem: Use GL_TRIANGLES instead if GL_QUADS when GL{1,2} or GLES1 are unavailable 2019-07-26 21:26:31 +03:00
OpenSceneGraph git repository
312f640a4a Merge pull request #802 from eligovision/OpenSceneGraph-3.6_osgtext_fc
OSG_TEXT_USE_FONTCONFIG cmake option added: Set to ON to enable attem…
2019-07-26 12:54:16 +01:00
konstantin.matveyev
2b0105f875 OSG_TEXT_USE_FONTCONFIG additional check needed 2019-07-26 14:40:47 +03:00
konstantin.matveyev
b0c89b137d OSG_TEXT_USE_FONTCONFIG cmake option added: Set to ON to enable attempt to use FontConfig in osgText; Disabled by default for iOS and Android 2019-07-26 14:09:36 +03:00
Robert Osfield
b2daa32420 UPdated for 3.6.3-rc9 2019-07-25 15:10:36 +01:00
Robert Osfield
bf208e1d10 Changed the #extension enable 2019-07-25 14:58:17 +01:00
Robert Osfield
24d61c2df0 Change the DefaultFont so that it's managemed via the ObjectCache to enabl it to be release and cleared in a central manner.
Added call to Registry::releaseGLObjects() to osgViewer/Renderer.cpp to enable automatic clean up of objects in the ObjectCache.
2019-07-25 14:10:01 +01:00
Robert Osfield
e6f6de640a Added readObject() implementations 2019-07-25 12:48:21 +01:00
Robert Osfield
00679c7631 Added ReaderWriterOBJ::readObject(..) implementations to address issue with using osgconv 2019-07-25 10:39:34 +01:00
Robert Osfield
4e126469fc Updates for 3.6.4-rc8 2019-07-22 19:22:16 +01:00
Robert Osfield
ccbc632afc Added handling of iOS and Android to make sure FontConfig is only used for Desktop builds 2019-07-22 17:20:10 +01:00
Robert Osfield
060a641c2b Updated for rc7 2019-07-19 09:20:50 +01:00
OpenSceneGraph git repository
cd124228fd Merge pull request #797 from wangii/OpenSceneGraph-3.6
fix u64 and i64 allocation, setArray bug
2019-07-19 09:10:02 +01:00
Linan Wang
4ad34877d2 fix typo 2019-07-19 14:06:20 +08:00
Linan Wang
2a8b760833 fix u64 and i64 allocation, setArray bug 2019-07-19 13:28:25 +08:00
Robert Osfield
8dea265a91 Fixed indentation 2019-07-18 14:08:41 +01:00
Long Huan
7ec8b65ec4 Add OutputTextureFiles Option
Add OutputTextureFiles Option support Write out the texture images to file
2019-07-18 14:00:11 +01:00
Long Huan
c6c49c3745 Update OBJWriterNodeVisitor.cpp 2019-07-18 13:51:10 +01:00
Long Huan
acac960227 fix obj-Plugin export texture file
Fix obj-plugin to support export texture file
2019-07-18 13:50:56 +01:00
Robert Osfield
da6b4df00a Added handling of zero radius models 2019-07-18 12:18:04 +01:00
Robert Osfield
7f370bdfc6 Removed references OpenVRML plugin 2019-07-18 11:16:49 +01:00
Robert Osfield
587fd6a022 Removed vrml plugin from build as OpenVRML plugin relies on no longer supported functionality 2019-07-18 11:16:49 +01:00
Robert Osfield
730e6ad8f5 Added calls to curl_global_init and curl_global_cleanup to improve the robustness of threaded curl plugin usage 2019-07-18 10:34:53 +01:00
Robert Osfield
a8017cb807 Updated for rc6 2019-07-16 13:50:02 +01:00
OpenSceneGraph git repository
ac6b082963 Merge pull request #789 from rhabacker/OpenSceneGraph-3.6
cmake: Add find_package module for fontconfig
2019-07-16 11:53:24 +01:00
OpenSceneGraph git repository
61957024fc Merge pull request #791 from aluaces/mingw-osg_windowing_system
Avoid that mingw cross-compilation choosing X11 as the windowing system.
2019-07-16 11:32:10 +01:00
Alberto Luaces
117fd42efc Avoid that mingw cross-compilation choosing X11 as the windowing system.
I have moved the PROJECT stanza before the conditionals, because
otherwise expressions like IF(MINGW) always fail.
2019-07-16 11:08:25 +02:00
Ralf Habacker
387e66911b cmake: Add summary information to get an idea of what dependencies might be missing 2019-07-15 19:00:55 +02:00
Ralf Habacker
dc9f6f2751 cmake: Added find_package module for fontconfig which is not available with cmake < 3.14
This file has been taken from cmake 3.14
2019-07-15 19:00:25 +02:00
Robert Osfield
8a4cdcf264 Updated for 3.6.4-rc5 2019-07-15 17:06:51 +01:00
Robert Osfield
02d91a3eea Adopted the matrix transformation code from Text 2019-07-15 16:16:45 +01:00
Robert Osfield
59f417f1e0 Added test of picking 2019-07-15 16:13:57 +01:00
Robert Osfield
9ad7ae5524 Cuietened down the reporting of failure to find fontconfig 2019-07-15 15:05:05 +01:00
OpenSceneGraph git repository
0c7fda710c Merge pull request #788 from rhabacker/3.6-obj-plugin-fixes
3.6 obj plugin fixes
2019-07-15 14:11:11 +01:00
Ralf Habacker
cbf5b14f61 obj plugin: Fix bug not adding first vertex index on writing GL_LINExxx array types 2019-07-15 14:39:02 +02:00
Ralf Habacker
2e33cf0abc obj plugin: Fix not writing material shininess 2019-07-15 14:39:02 +02:00
Ralf Habacker
361ea5d15d obj plugin: add option "NsIfNotPresent=" for setting the specular exponent of a material if not present 2019-07-15 14:39:02 +02:00
Ralf Habacker
a3b2ac63b3 obj plugin: Fix bug not using specular color (Ks) for illumination mode > 2
See paragraph "Illumination models" at http://paulbourke.net/dataformats/mtl/ for details.
2019-07-15 14:26:31 +02:00
OpenSceneGraph git repository
3f9ab5689c Merge pull request #786 from rhabacker/OpenSceneGraph-3.6
Fix 'Incorrect default location for true type fonts on openSUSE'
2019-07-15 11:14:47 +01:00
Ralf Habacker
af5a794a82 Fix 'Incorrect default location for true type fonts on openSUSE'
https://github.com/openscenegraph/OpenSceneGraph/issues/778
2019-07-15 11:08:31 +02:00
Robert Osfield
faa2b1d964 Added check against any empty _segments to avoid undefined behaviour 2019-07-12 17:00:20 +01:00
Robert Osfield
ab95a79540 Removed debug info for constructor and destructors 2019-07-12 16:16:43 +01:00
Robert Osfield
079cf6c090 Added FrameBufferAttachment::resizeGLObjectBuffers(..) and releaseGLObjects(..) methods 2019-07-12 16:09:12 +01:00
StefanBruens
7dbcb4b7d3 Fix wxWidgets COMPONENTS specification, deprecated usage broken with CMake 3.14
Current FindWxWidgets.cmake allows to specify OPTIONAL components, unfortunately
this broke the (deprecated) use of wxWidgets_USE_LIBS.

Fixes: #779
2019-07-03 07:24:03 +01:00
Robert Osfield
634bd7f12d Updated ChangeLog for rc4 2019-07-02 20:21:45 +01:00
Robert Osfield
384cc25380 Updated SO number to refect change to the Drawable header inline method status 2019-07-02 20:21:05 +01:00
Robert Osfield
b43a59aa5d Updated in prep for 3.6.4-rc4 2019-07-02 20:19:05 +01:00
Colin McDonald
e135a85c1a Trivial change to src/osgSim/LineOfSight.cpp to quieten down an info message in DatabaseCacheReadCallback::readNodeFile. 2019-07-01 16:15:21 +01:00
Robert Osfield
2f914506e9 Updated release candidate number to 4 in prep for 3.6.4-rc4 release. 2019-07-01 16:12:53 +01:00
Robert Osfield
e5c951f5a3 Removed stray tab 2019-07-01 15:50:20 +01:00
jimcamel
9566fb7acf Fixed bug where FFmpeg Image Stream would stop if paused for more than 10 seconds
The FFmpeg image stream class uses a 10 second timeout between frames to determine if the stream is dead and if so closes it. However, the timeout is determined using the variable lastUpdateTS which stores the last time the publishNewFrame function was called, and if the video has been playing and then is paused for longer than 10 seconds, when it is unpaused this timeout will fire and the stream will be closed, stopping the video playing beyond what has been buffered.

To stop this timeout from happening before the video starts playing, the timeout checks to see if the lastUpdateTS > 0 (at initialization it is set to 0). In this fix, we simply set the value of lastUpdateTS to 0 when the video is unpaused, this will force the check to skip on unpause, and from then on lastUpdateTS will have the correct value again.

The lastUpdateTS variable is private and only used for this one function, so there should be no side effects from the change.
2019-07-01 15:50:14 +01:00
Riccardo Corsi
511f7be394 Bugfix due to copy-paste typo which prevented multi uv channel mesh to be imported correctly. 2019-07-01 15:11:23 +01:00
Robert Osfield
56e2a03378 Fixed layout 2019-07-01 13:43:29 +01:00
Robert Osfield
5fc917881d Merge branch 'patch-27' of https://github.com/mp3butcher/OpenSceneGraph into patch-27 2019-07-01 13:42:33 +01:00
Alexey Galitsyn
00e2930fb7 Fix not checking num lock state when remapping keypad keys on Windows.
Num lock state was never checked during remapping keypad keys on Windows.
Now when num lock is active, keypad numeric keys and keypad delimeter key
should work as expected (return KEY_KP_0 to KEY_KP_9 and KEY_KP_Decimal
respectivly).
2019-07-01 13:39:33 +01:00
Robert Osfield
fe9c235806 Restructed the setting of the default osgDB::Options so it doesn't override the ObjectCacheHint setting when a user specified osgDB::Options object is passed in. 2019-07-01 12:56:36 +01:00
Robert Osfield
8d505e80a9 Merge branch 'OpenSceneGraph-3.6_vas' of https://github.com/eligovision/OpenSceneGraph into OpenSceneGraph-3.6_vas 2019-07-01 12:33:21 +01:00
Robert Osfield
b6cb11b655 Couldn't resolve warnings coming from the FBX headers so had to suppress warnings. 2019-07-01 12:18:21 +01:00
Laurens Voerman
4b6d9287bc replaced "if (apm || !apm->valid())" 2019-06-14 15:46:55 +01:00
Laurens Voerman
b41c5bde96 fix typo in header guard. 2019-06-14 15:38:38 +01:00
Laurens Voerman
2ac97b5ece fix typo in ReaderWriterFBX: writObject -> writeObject 2019-06-14 15:36:18 +01:00
OpenSceneGraph git repository
21c0affe66 Merge pull request #760 from LaurensVoerman/readObject
implement readObject for all relevant readerWriters
2019-06-14 15:28:46 +01:00
OpenSceneGraph git repository
68fc6ca610 Merge pull request #759 from AnyOldName3/more-tga
Various TGA improvements
2019-06-14 15:01:15 +01:00
OpenSceneGraph git repository
52edc4af8d Merge pull request #758 from LaurensVoerman/osgt_indentation
fix indentation for osgt files for windows dynamic library build.
2019-06-14 14:32:31 +01:00
OpenSceneGraph git repository
c1757aadb4 Merge pull request #757 from LaurensVoerman/rendererNoRefCount
fix compile error if OSGUTIL_RENDERBACKEND_USE_REF_PTR not defined in include/osgUtil/RenderLeaf
2019-06-14 14:29:32 +01:00
Julien Valentin
cfd190a9fa update traversedebug preventing traversal to disable OQN 2019-06-08 01:17:21 +02:00
Julien Valentin
5311d6fb6b add enable check in traverseQuery 2019-05-31 15:27:18 +02:00
Konstantin S. Matveyev
e31afbf78a typo fix 2019-05-15 14:35:39 +03:00
valid-ptr
be6bc39016 VertexArrayState's lazy disabling of vertex attributes mechanism major fix: _vertexAttribArrays must be 'shared' 2019-05-15 14:32:09 +03:00
Laurens Voerman
38727ed4b4 implement readObject for all relevant readerWriters 2019-05-14 14:25:30 +02:00
AnyOldName3
8491fd780d Add support for Targa type 3 and 11 images (greyscale) 2019-05-13 21:56:07 +01:00
Laurens Voerman
3ccdc66717 fix indentation for osgt files for windows dynamic library build. 2019-05-13 17:25:29 +02:00
Laurens Voerman
2f71c55da9 fix compile error if OSGUTIL_RENDERBACKEND_USE_REF_PTR not defined in include/osgUtil/RenderLeaf 2019-05-13 17:02:53 +02:00
AnyOldName3
7b6135f0f7 Avoid wasting memory loading optional TGA fields as RLE image data 2019-05-11 00:00:41 +01:00
AnyOldName3
05e896af7e Add support for type 9 (colour mapped, compressed) TGA images. 2019-05-10 00:04:49 +01:00
AnyOldName3
33bf30cd8c Check TGA footer if present to see if attribute channel contains alpha data 2019-05-10 00:04:08 +01:00
Robert Osfield
fd014e3b52 Merged ELSEIF fix from master 2019-05-08 10:17:06 +01:00
Laurens Voerman
3f0c1daaa2 add missing E to ELSIF
# Conflicts:
#	src/osgViewer/CMakeLists.txt
2019-05-08 09:50:17 +01:00
AnyOldName3
c9fc6e0f79 Consistently check for failed memory allocation 2019-05-08 00:59:40 +01:00
AnyOldName3
348fbfe410 Switch to using safe buffers (fixing a memory leak) 2019-05-08 00:56:42 +01:00
AnyOldName3
47ec2c7951 Cleanup TGA header interpretation
* Read the colour map `First Entry Index` field. If non-zero, error out as the format specification is vague as to what it does and different readers interpret it differently.
* Rename the variable that holds the colour map entry size as the existing name could be misinterpreted as the size of the pointer, not the thing pointed to.
* Handle images reporting themselves as 15 bits per pixel in the same way as Truevision's example code.
2019-05-04 01:19:31 +01:00
Robert Osfield
6ea8ebf25a Fixed indentation 2019-04-26 10:46:04 +01:00
Wei Lisi
2b65555d5f remove tabs 2019-04-26 10:44:04 +01:00
flashk
2439679b0c Update fbxRMesh.cpp 2019-04-26 10:43:04 +01:00
Wei Lisi
0cbf839425 clean up 2019-04-26 10:41:05 +01:00
Wei Lisi
82cae6daf4 fix fbx hierarchy issue 2019-04-26 10:41:05 +01:00
Derek Quam
6767ff540b Fix two bugs introduced when removing the Geode visitor from the FBX
exporter.

In the Geometry visitor, use getNodePath to check if the Geometry node
is root instead of getNumParents.

Reset the state inside buildFaces to prevent duplication when a
Group is inside of Group.
2019-04-26 10:30:24 +01:00
Derek Quam
69ebfecfcc Fix duplicate geometries in FBX export.
The fix to allow the export of orphaned Geometry nodes accidentally
duplicated those geometry nodes in 'normal' scene trees. This commit
refactors the code to rely on the visitor to traverse the Geometry as
opposed to traversing the Geometry in the Geode visit and the Geometry
visit.
2019-04-26 10:30:15 +01:00
OpenSceneGraph git repository
3834172342 Merge pull request #745 from eligovision/OpenSceneGraph-3.6_cmake
CMake: OSG_WINDOWING_SYSTEM fixed
2019-04-26 09:36:51 +01:00
Konstantin S. Matveyev
036bb7b472 CMake: Win32 option added to OSG_WINDOWING_SYSTEM 2019-04-14 00:47:36 +03:00
valid-ptr
b5dff94107 CMake: OSG_WINDOWING_SYSTEM fixed; FORCE flag removed 2019-04-14 00:08:09 +03:00
Robert Osfield
1784381dc7 cMerge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6 2019-04-12 13:57:35 +01:00
Robert Osfield
9e18a7542b Added ability to set which tree rendering techniques to build (via --featuers bitmask command line) and
output scene to using -o outputfilename.extension command line.
2019-04-12 13:55:39 +01:00
OpenSceneGraph git repository
1c6fd4da9b Merge pull request #737 from eligovision/OpenSceneGraph-3.6_android
osgDB::DynamicLibrary: local lib loading on Android fixed
2019-04-11 12:42:22 +01:00
Konstantin S. Matveyev
e1b3c78013 osgDB::DynamicLibrary: local lib loading on Android fixed 2019-03-29 16:32:58 +03:00
Jeongseok Lee
f263ad29db Update CMakeModules/FindCOLLADA.cmake
Keeping old style operator to align with OSG CMake 2.8.0 support.

Co-Authored-By: eknabe <44489094+eknabe@users.noreply.github.com>
2019-03-26 08:05:06 +00:00
Robert Osfield
dd32ee2945 Added basic load and compile stats collection enabled by --stats command line. 2019-03-25 14:09:04 +00:00
Robert Osfield
0b5cb65cdd Added a call to the CullSetting::readCommnadLine(..) to make sure the --NO_CULLING and --VIEW_FRUSTUM, --VIEW_FRUSTUM_SIDES command line parameters are honoured 2019-03-25 12:42:28 +00:00
Robert Osfield
a8e78fde99 Added --NO_CULLING, --VIEW_FRSUTUM and --VIEW_FRUSTUM_SIDES/--vfs command line options for setting the Camera CullingMode value 2019-03-25 12:40:41 +00:00
Jeongseok Lee
43b274f65c Update comments and fix cmake version check 2019-03-21 08:40:33 +00:00
OpenSceneGraph git repository
f97ea3577d Merge pull request #727 from ccochran/OpenSceneGraph-3.6
Fixes Android build for osgViewer.
2019-03-19 14:33:42 +00:00
Colin Cochran
9726617b6e Fixes osgViewer CMake build for Android.
Adds FORCE to overwrite the cached OWG_WINDOWING_SYSTEM variable.
2019-03-18 08:55:05 -06:00
Colin Cochran
997276d359 Fixes Android build for osgViewer.
Previously, cmake attempted to build cocoa windowing system source even if MAKE_SYSTEM_NAME was set to ANDROID.
2019-03-16 11:59:28 -06:00
Capostrophic
dceb353fe6 Replace redundant asCullVisitor usage with a type check 2019-03-16 12:29:39 +00:00
OpenSceneGraph git repository
d8600411bd Merge pull request #726 from Capostrophic/linearinterpolator
Override default behavior for linear vector interpolations
2019-03-16 11:30:21 +00:00
Capostrophic
066c272f7a Override default behavior for linear vector interpolations 2019-03-15 21:29:13 +03:00
Chris Djali
7ebe56291f Resolve OpenGL error caused by confusion between geometry shader implementations.
There are two types of Geometry Shaders in OpenGL. One is provided by `GL_EXT_geometry_shader4` and `GL_ARB_geometry_shader4` and requires that certain parameters are set with calls to `glProgramParameteri` before the program is linked. The other is provided by OpenGL 3.2 as a core feature and by the GLES extensions `GL_EXT_geometry_shader` and `GL_OES_geometry_shader` and requires these parameters to be set in the GLSL source itself.

The value of `isGeometryShader4Supported` is being used to determine if the `glProgramParameteri` calls should occur, so it should only be `true` when one of the extensions requiring them is present.
2019-03-14 13:51:44 +00:00
flashk
c89a7fe67c Update StackedTransform.cpp 2019-03-14 11:25:11 +00:00
Capostrophic
b14bb21801 Avoid unnecessary matrix type conversion in osgParticle 2019-03-14 10:47:08 +00:00
Robert Osfield
37eae8c719 Removed the optional code path hack 2019-03-14 10:46:59 +00:00
Capostrophic
12b298130a Add OSG_USE_FLOAT_QUAT build option to use single precision quaternions 2019-03-14 10:46:42 +00:00
OpenSceneGraph git repository
c548289ac1 Merge pull request #724 from AnyOldName3/more-gitignore
Add missing files to .gitignore
2019-03-14 09:39:40 +00:00
AnyOldName3
2ebde09aff Add Visual Studio cache/options directory to .gitignore 2019-03-13 23:13:41 +00:00
AnyOldName3
049f88325a Add missing documentation build files to .gitignore 2019-03-13 23:13:00 +00:00
Robert Osfield
cc68d7f151 Streamline the animation path completion message 2019-02-25 15:09:12 +00:00
Daniel Trstenjak
5770774e00 OcclusionQueryNode: reset the test result of the invalid geometry
There're cases that the occlusion test result has been retrieved
after the query geometry has been changed, it's the result of the
geometry before the change.
2019-02-25 15:08:38 +00:00
Daniel Trstenjak
5624a22fe4 OcclusionQueryNode: ensure a valid query geometry
If the query geometry is invalid then don't do any occlusion queries and
never traverse the subgraphs.
2019-02-21 17:34:26 +00:00
Björn Blissing
9905b90a18 Add search location for textures in FBX plugin
The FBX plugin may fail texture lookup even if the texture is located in
the same folder as the model file. This change tries, as a last resort,
to check if the texture filename is available in the same folder as the
model.
2019-02-20 17:19:04 +00:00
OpenSceneGraph git repository
6d5c6ad6cc Merge pull request #704 from mp3butcher/patch-24
uncomment INLINE_DRAWABLE_DRAW
2019-02-20 16:54:23 +00:00
Robert Osfield
971eba37ad Added override for broken bindings 2019-02-20 16:31:58 +00:00
Julien Valentin
43574b52c1 uncomment INLINE_DRAWABLE_DRAW 2019-01-28 01:40:35 +01:00
Robert Osfield
625c771641 Updates for 3.6.4-rc3 2019-01-26 19:36:30 +00:00
OpenSceneGraph git repository
1504a54cd8 Merge pull request #702 from mp3butcher/fix36
add MeshReindexation flag
2019-01-26 18:21:47 +00:00
Robert Osfield
0f2e9e6557 Added missing {} to fix getPassed() bug introducted by previus commit 2019-01-26 18:10:44 +00:00
Daniel Trstenjak
cd150cbe96 OcclusionQueryNode: ensure a consistent value for '_passed' 2019-01-26 17:42:20 +00:00
Robert Osfield
02d7d980a7 Introduced a QueryGeometry::getQueryResult(const osg::Camera*) method as a more informative replacedment for QueryGeometry::getNumPixels(). 2019-01-26 16:33:23 +00:00
Daniel Trstenjak
c8521068a5 OcclusionQueryNode: add resetting of queries
If there's a big view change then it might not be appropriate to wait
for '_queryFrameCount' till the next query is issued, because then
geometry might pop into the view after '_queryFrameCount'.

This is especially important for applications not having a constant
frame rate, but just issue a new frame on demand.
2019-01-26 15:22:08 +00:00
mp3butcher
832d8d5228 fix variable name 2019-01-23 17:06:04 +01:00
OpenSceneGraph git repository
bdd0be2f8f Changed member variable name to be consistent with header 2019-01-23 17:03:27 +01:00
OpenSceneGraph git repository
968a427e00 Changed the member variable to be consistent with the method name. 2019-01-23 17:03:11 +01:00
mp3butcher
b8f9249bea add a bool parameter to allow forced reindexation of a mesh 2019-01-23 17:02:53 +01:00
Robert Osfield
e2fb88e187 Commented out the reset of the _vertexArrayObject = 0 as it was break later State::resetCurrentVertexArrayStateOnMatch() calls ability to reset the State::_currentVAO when required. 2019-01-23 15:40:13 +00:00
Robert Osfield
749dc86dd3 Fixed typo 2019-01-23 08:52:11 +00:00
Robert Osfield
84bae01643 Added separate test and rest of _currentVAO to State::resetCurrentVertexArrayStateOnMatch(..) method 2019-01-22 20:21:56 +00:00
Robert Osfield
8a5d1b9f44 Changed resetCurrentVertexArrayStateOnMatch() to reset _vas tp _globalVertexArrayState and currentVAO to 0. 2019-01-21 18:15:02 +00:00
Robert Osfield
488b4854b2 Added reset of the State::CurrentVertexArrayState() to prevent the State::_vas becoming a dangling pointer when VertexArrayState objects are deleted. 2019-01-21 17:36:40 +00:00
Robert Osfield
6455159757 Added calling of releaseGLObjects() and resizeGLObjects() to the Camera DrawCallback's to enable the draw callbacks to clean up their own GL objects. 2019-01-19 16:16:53 +00:00
OpenSceneGraph git repository
2e68db5b55 Merge pull request #693 from LaurensVoerman/glObj_C4250
fix MSVC warning C4250: inherits 'X' via dominance (94x)
2019-01-17 17:24:22 +00:00
Laurens Voerman
2e29085669 fix MSVC warning C4250: inherits 'X' via dominance (94x) 2019-01-17 16:22:51 +01:00
Robert Osfield
f223fec92d Added derpecated and thread unsafe warning message to docs of ObjectCache::getgetFromObjectCache() 2019-01-14 11:56:23 +00:00
OpenSceneGraph git repository
cc3cb92ddc Merge pull request #691 from LaurensVoerman/clrObjCache
clear temp objectCache in databaseRequest
2019-01-14 10:23:05 +00:00
Robert Osfield
4dcb2bbf3c Added using to quieten VS warnings 2019-01-14 09:55:00 +00:00
Laurens Voerman
eeb13d1efc clear temp objectCache in databaseRequest 2019-01-14 10:24:30 +01:00
Robert Osfield
fe98c3d7f5 Moved resizeGLObjects/releaseGLObjects out of Referenced to avoid multiple inheritance warnings 2019-01-12 11:27:18 +00:00
Robert Osfield
46b07141e8 Added read/writeObject() entry point to FBX plugin. 2019-01-10 09:45:32 +00:00
Robert Osfield
02bfd05d6f Upated ChangeLog 2019-01-09 10:22:54 +00:00
Robert Osfield
035abfdb71 Updated for 3.6.4-rc2 2019-01-09 10:19:34 +00:00
Robert Osfield
0c99326db3 Added cmake package configuration files to gitignore 2019-01-09 09:51:21 +00:00
Robert Osfield
8103da6ef1 Replaced use of heap with use of stack created ifstream to avoid potential memory leak 2019-01-09 09:51:21 +00:00
Robert Osfield
bd83044c08 Introduced use of ref_ptr<> and private destructor to tighen up memory management and avoid users attempting to inappropriately delete TexCoordRange. 2019-01-09 09:51:21 +00:00
Robert Osfield
f6b64afdfc Fixed for crashes on exit associaciated with VAO usage and vairous niche usage cases 2019-01-08 19:32:50 +00:00
Robert Osfield
1c65815f4e Fixed crash on exit issues with osgFX, osgParticle, osgSim and the osgforest example 2019-01-07 17:46:02 +00:00
Robert Osfield
5e9be10da6 Merged changes from master 2019-01-07 10:25:13 +00:00
Robert Osfield
820532ddff Updated rc number for 3.6.4 release candidate 2019-01-04 09:22:12 +00:00
Robert Osfield
6951c44464 Updated ChangeLog and AUTHORS in prep for 3.6.4 work 2019-01-04 09:10:39 +00:00
Robert Osfield
e12049ed47 Added use of sizeof to make code a bit more flexible 2019-01-04 08:14:41 +00:00
Robert Osfield
fd47b84bd7 Restructured the clean up of arrays/primitives and GL objects 2019-01-04 08:14:33 +00:00
Robert Osfield
b7947b13f3 Changed the clean up of the GL objects on destruction so that the destructors of the arrays/primitives themselves do the release rather than have it done explictly in the destructor. This allows arrays/primitives to be shared. 2018-12-31 11:06:45 +00:00
OpenSceneGraph git repository
7a601753e0 Merge pull request #679 from mp3butcher/patch-18
setup camera Read/Draw Buffer
2018-12-20 08:46:12 +00:00
Julien Valentin
07e5480b57 setup camera Read/Draw Buffer
fix flickering shadows in SingleThread
2018-12-19 18:30:26 +01:00
Robert Osfield
ea1e832d4d Removed examples from build as it was causing travis to timeout 2018-12-14 09:14:26 +00:00
OpenSceneGraph git repository
da7bf3ff81 Fixed indentation 2018-12-13 14:10:26 +00:00
OpenSceneGraph git repository
a6fbf73f36 Merge pull request #671 from mp3butcher/patch-16
remove useless code
2018-12-13 08:31:27 +00:00
OpenSceneGraph git repository
ef8fd268de Merge pull request #672 from ccochran/OpenSceneGraph-3.6
Xcode 9/10 build fixes for OSG 3.6
2018-12-13 08:01:24 +00:00
Julien Valentin
064c39a7f3 remove dead code 2018-12-11 23:56:47 +01:00
Thomas Hogarth
5eb9ab1d75 removed ios simulator reference, adjusted readme 2018-12-10 08:23:04 -07:00
Thomas Hogarth
e8ba57b22f Improved iOS cmake support for xcode 9.4 and cmake 3.11 2018-12-10 08:22:36 -07:00
OpenSceneGraph git repository
47aa320787 Merge pull request #670 from emminizer/four-byte-utf8
osgText::String:createUTF8EncodedString() now supports 4-byte UTF-8 strings (code points over 0x100000)
2018-12-07 14:53:52 +00:00
Daniel Emminizer
3a3ddfce49 osgText::String:createUTF8EncodedString() now supports 4-byte UTF-8 strings (code points over 0x100000). 2018-12-06 14:10:14 -05:00
flashk
dc2aa77d98 Prefer FOURCC pixel format in DDS loader
I have found that certain image editing programs export DDS images with both the DDPF_FOURCC and DDPF_RGB pixel format flags. The DDS loader will give preference to the DDPF_RGB flag and try to deduce the format from the RGB bit mask values instead of using the more reliable FOURCC flag. This causes some images to not load, even though the FOURCC flag is supported.  I've modified the loader so that it checks for the DDPF_FOURCC flag first, then falls back on deducing the format from the RGB bit masks.
2018-11-23 12:36:45 +00:00
Robert Osfield
aa6cd2d7da Added, currently commented out, alias for .vsga and .vsgb to help with automatic loading a vsg plugin when .vsga and .vsgb files are encountered. 2018-11-20 14:24:24 +00:00
Robert Osfield
658fd4d19d Added support for reading and writing images 2018-11-20 14:19:37 +00:00
Robert Osfield
8b4359b77e Restructed the setting of the OSG_GL_CONTEXT_VERSION to allow script to set it's default value 2018-11-11 10:14:50 +00:00
Robert Osfield
c5d00bc223 Added make clobber target, imported in from the VSG project. 2018-11-09 11:28:57 +00:00
Robert Osfield
1eedae844e Removed 12 year old workaround that is no longer required and was causing a misleading info message "OpenGL extension '' is not supported." to be reported. 2018-11-09 11:25:16 +00:00
OpenSceneGraph git repository
e819ea9c0e Replaced tabs with spaces to fix indentation 2018-11-03 16:16:19 +00:00
flashk
15b9a493ed Fix handling of alpha values in animated gifs
The gif loader was incorrectly setting pixels as transparent in certain animated gifs. It was ignoring the disposal method value in the extension block and always overwriting the alpha value in each frame. It is common for some animated gifs to set the disposal method so that the previous alpha value is retained. This patch modifies the loader to respect the disposal method flag.
2018-11-03 16:16:10 +00:00
Robert Osfield
0341d6f873 Removed reprecated C++ usage 2018-11-01 09:13:43 +00:00
Emil Knabe
3577fd9d90 Added support for FBX 2019 2018-10-29 08:25:18 +00:00
OpenSceneGraph git repository
a47294a580 Merge pull request #649 from LaurensVoerman/3.6-dae
3.6 dae
2018-10-23 08:44:55 +01:00
flashk
452802b168 Update daeRMaterials.cpp 2018-10-22 09:17:37 +02:00
flashk
5a3f2e287c Update daeReader.h 2018-10-22 09:17:37 +02:00
Robert Osfield
bf5a88870f Added check under Windows for a concatinated path that exceeds the MAX_PATH so that it isn't used for file IO operations that could lead to undefined behavior
https://github.com/openscenegraph/OpenSceneGraph/issues/634
2018-10-17 15:55:10 +01:00
flashk
8af46a6e98 Update ReaderWriterDAE.cpp 2018-10-17 15:54:54 +01:00
flashk
56617a4bfb Fix crash in Collada loader
The collada loader would crash when processing effects that didn't have a technique defined.
2018-10-12 07:38:59 +01:00
Boris Pek
7eaceb0baa fix builds with case sensitive includes
Tested during cross-compilation for MS Windows using MinGW.
2018-10-10 18:26:43 +01:00
Robert Osfield
8feae585e1 Fixed buld 2018-10-10 13:10:55 +01:00
Antoine Lavenant
fa7843d520 fix apply once 2018-10-10 08:16:41 +01:00
flashk
d48a304569 Fix for HDR DDS images
The DDS loader was not applying the correct internal format for certain HDR images (e.g. float/half_float formats)
2018-10-04 09:22:57 +01:00
flashk
ce90a9b2da osgDB::OutputStream write array optimization
I've made a change to osgDB::OutputStream::writeArrayImplementation so that it writes the array data in a single write operation for binary files. This significantly speeds up writing out osgb files for large data sets (e.g. point clouds). osgDB::InputStream already performs a similar optimization when reading array data from binary files.
2018-10-04 09:22:38 +01:00
flashk
273dd046c2 Fix for GifImageStream::setReferenceTime
Setting the reference time greater than the duration of a gif would cause a crash. Also, the current reference time is not immediately updated when manually setting the reference time.
2018-10-04 09:22:26 +01:00
flashk
627c3df093 Update ReaderWriterFBX.cpp 2018-10-04 09:22:14 +01:00
flashk
ab372b9ead Update fbxRMesh.cpp 2018-10-04 09:21:58 +01:00
flashk
247eee2ca1 Update fbxReader.h 2018-10-04 09:21:41 +01:00
flashk
d4bbec4a0c Fix hardware mipmap generation for cube maps
I was getting a black image when enabling hardware mipmap generation on cubemaps. I believe the problem is that the base Texture class is hard coding GL_TEXTURE_2D when enabling mipmap generation, instead of using the target type from the derived class.
2018-10-03 12:00:04 +01:00
Robert Osfield
114c818f2e Removed unused static variables 2018-10-02 12:21:31 +01:00
Robert Osfield
1ee6d476f8 From Andy Skinner, Added ~GLExtensions to clear cached values for context ID 2018-10-02 11:28:34 +01:00
Julien Valentin
8a29c504e4 add version and required extension
let a chance to work on intel chipset
2018-10-02 11:06:22 +01:00
OpenSceneGraph git repository
f376af1fd5 Merge pull request #627 from eligovision/OpenSceneGraph-3.6_gui_adapters_1px
1px error in GUIEventAdapter, View, Viewer and CompositeViewer major fix
2018-10-02 10:46:25 +01:00
Konstantin S. Matveyev
e663330bdf 1px error in GUIEventAdapter, View, Viewer and CompositeViewer major fix 2018-09-21 13:30:39 +03:00
Robert Osfield
d011ca4e8d Updated ChangeLog for 3.6.3 release 2018-09-14 11:16:53 +01:00
Robert Osfield
3a6b13c46e Updated version number and date for 3.6.3 stable release 2018-09-14 10:41:24 +01:00
Robert Osfield
88afccd85e Updated ChangeLog for 3.6.3-rc3 2018-09-13 08:52:21 +01:00
Robert Osfield
d6d6c3cda2 Updated for 3.6.3-rc3 2018-09-13 08:47:17 +01:00
Robert Osfield
ca134dca2d Standardized the glTexStorage*() calls to use osg::maximum(_numMipmapLevels,1) of rnumber of mipmaps to keep the usage consistent.
Fixed the erronous Texture2DArray glTexStorage call so that it used the _numMipmapLevels as above to resolve bug in allocation.
2018-09-12 17:45:49 +01:00
Robert Osfield
66246703bf Warning fixes 2018-09-11 15:32:44 +01:00
Robert Osfield
fb09be05a9 Fixed warning 2018-09-11 12:29:40 +01:00
Robert Osfield
41fa8fecd1 Updated for 3.6.3-rc2 2018-09-11 12:23:01 +01:00
Robert Osfield
2213011caa Updated rc number 2 for 3.6.3-rc2 2018-09-11 11:56:04 +01:00
OpenSceneGraph git repository
c2f0da31f2 Merge pull request #620 from LaurensVoerman/txt_SCREEN_COORDS
fix scale problem for osgText with characterSizeMode SCREEN_COORDS and _position set.
2018-09-11 11:29:36 +01:00
Robert Osfield
2e14bd52bf Fixed hang using a ReentrantMutex 2018-09-11 11:23:34 +01:00
Robert Osfield
4ea833cc6b Fixed build 2018-09-11 10:13:49 +01:00
Robert Osfield
7fae3b67cd Fixed build 2018-09-11 09:31:35 +01:00
Robert Osfield
8780347f2f Cleaned up code 2018-09-11 09:05:16 +01:00
gwaldron
22e6f6038f osgText: fixed thread-safety issues in Glyph and Font 2018-09-11 08:53:40 +01:00
mp3butcher
385cfa0cbf fix examples context creation for X11
(when display not :0.0)
2018-09-11 08:40:02 +01:00
OpenSceneGraph git repository
960f4d1ef2 Merge pull request #619 from mathieu/topic/SaveInlinedImages
Added saving of inline Images without having the physical image file.
2018-09-11 08:34:20 +01:00
Robert Osfield
257c2deb86 Added greater control of how cubemap is set up and controlled 2018-09-11 08:11:27 +01:00
Laurens Voerman
4dc6a6c4cd fix scale problem for osgText with characterSizeMode SCREEN_COORDS and _position set. 2018-09-07 15:09:15 +02:00
Mathieu MARACHE
2e38e4751c Added saving of inline Images without having the physical image file.
The can be read from and inlined image file
2018-09-07 14:05:50 +02:00
Robert Osfield
dfdb946d60 Merge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6 2018-09-06 12:30:18 +01:00
Robert Osfield
2f056dcaa9 Updated for 3.6.3-rc1 2018-09-06 12:29:44 +01:00
Robert Osfield
d07fe93f34 Fixed memory leak with assignment of default value to ObjectSerializer 2018-09-06 11:53:35 +01:00
OpenSceneGraph git repository
05297f439c Merge pull request #616 from eligovision/OpenSceneGraph-3.6_particles
ParticleSystem: Added support for GLES2 and upper (GL_QUADS -> GL_TRI…
2018-09-05 18:06:25 +01:00
Robert Osfield
34d58d447d Fixed copy constructor 2018-09-05 18:01:33 +01:00
Konstantin S. Matveyev
637e1cc33b ParticleSystem: Using of GL_TRIANGLES for GLES2 and upper; GL_QUADS otherwise 2018-09-05 19:00:29 +03:00
OpenSceneGraph git repository
5d6ab3e6b7 Merge pull request #617 from aluaces/Image_scaleImage_typo
Fix typo in the initial check of Image::scaleImage().
2018-09-05 14:04:57 +01:00
Alberto Luaces
69667a478f Fix typo in the initial check of Image::scaleImage(). 2018-09-05 13:38:09 +02:00
Konstantin S. Matveyev
f00b7180cb ParticleSystem: Added support for GLES2 and upper (GL_QUADS -> GL_TRIANGLES) 2018-09-05 14:05:29 +03:00
Jason Beverage
6ae1139630 Protect the _programSet in Shader with a mutex.
This prevents thread safety issues when Shader objects are used in
multiple programs.
2018-09-05 09:34:54 +01:00
Robert Osfield
a06fcbe5d9 Updated ChangeLog 2018-09-05 09:33:24 +01:00
Robert Osfield
5f9c6a0170 Changed the ShapeDrawable::build() methpd so that it does run when the ShadpwDrawabe is a KdTree. 2018-09-04 15:26:30 +01:00
Robert Osfield
2a4dd6e03b Updated SO version as XmlNode::Input changes change the ABI 2018-09-04 14:13:32 +01:00
Robert Osfield
afe5644b9f Added support for reading UTF-8 encoded of xml files 2018-09-04 12:42:31 +01:00
Robert Osfield
ae3133522d Changed the logic for whether to call setUpThreading() in setThreadingModel() to make it possible to changed threadings even if the threading model starts of as SingleThreaded 2018-09-03 12:30:02 +01:00
Robert Osfield
5040c583b4 Updated version number to 3.6.3 in prep for next naintainance release 2018-09-03 11:19:50 +01:00
Robert Osfield
61967a7d1a Merge branch 'OpenSceneGraph-3.6-TexStorage' into OpenSceneGraph-3.6 2018-09-03 10:16:45 +01:00
Robert Osfield
bcba3928e6 Added reset of _stateset to prevent the releaseGLObjects calling release on th StateSet from the destructor 2018-09-03 09:41:59 +01:00
Robert Osfield
006ca64f4b Added reset of _stateset to prevent the releaseGLObjects calling release on th StateSet from the destructor 2018-09-03 09:37:36 +01:00
Robert Osfield
77fd07eaa9 Replaced the glSGetProcAddressARB code with the dlsym() usage as the NVidia driver looks to be returning non NULL pointers for invalid function names. 2018-08-28 12:01:35 +01:00
Robert Osfield
8b8c427afe Replaced the glSGetProcAddressARB code with the dlsym() usage as the NVidia driver looks to be returning non NULL pointers for invalid function names. 2018-08-28 11:52:42 +01:00
Robert Osfield
f55b864d59 Enabled point sprite validty modes. 2018-08-22 11:21:30 +01:00
Robert Osfield
d18c498322 Enabled point sprite validty modes. 2018-08-22 11:13:11 +01:00
Robert Osfield
4f7f34a6b0 Merged fix for PointSprite modes validity checks from master. 2018-08-22 10:43:15 +01:00
Robert Osfield
29789f898b Merged fix for PointSprite modes validity checks from master. 2018-08-22 10:42:18 +01:00
plevy
dd9312ae35 Change GL_RGBA16F to GL_RGBA16F_ARB to fix Windows Build
Change GL_RGBA16F to  GL_RGBA16F_ARB to fix Windows build.
2018-08-22 07:48:55 +01:00
plevy
78e050db43 Change GL_RGBA16F to GL_RGBA16F_ARB to fix Windows Build
Change GL_RGBA16F to  GL_RGBA16F_ARB to fix Windows build.
2018-08-22 07:48:22 +01:00
Robert Osfield
250dcc5b6c Replaced GL_RGBA32F with GL_RGBA32F_ARB to fix Windows build 2018-08-21 09:20:49 +01:00
Robert Osfield
f2dfd78914 Replaced GL_RGBA32F with GL_RGBA32F_ARB to fix Windows build 2018-08-21 09:19:50 +01:00
OpenSceneGraph git repository
1819bb32ae Merge pull request #606 from mp3butcher/OpenSceneGraph-3.6-TexStorage
Open scene graph 3.6 tex storage
2018-08-20 10:08:09 +01:00
mp3butcher
e043c3db33 complete TexStorage support 2018-08-20 05:11:43 +02:00
mp3butcher
587e65e674 add more extensions 2018-08-20 05:11:29 +02:00
mp3butcher
274b6894af remove redondant variable and test 2018-08-19 22:46:10 +02:00
Robert Osfield
29e87780f5 Removed check as this is better outside of the function 2018-08-17 16:53:13 +01:00
Robert Osfield
58a51cbc41 Created a GLenum Texture::selectSizedInternalFormat(const osg::Image* image=0) const method to help clean up set up of glTexStorage.
Fixed typo.
2018-08-17 12:20:59 +01:00
Robert Osfield
7ae7a994b4 Merged changes to InternalPixelRelations sizedInternalFormats[] from master 2018-08-17 10:31:46 +01:00
Robert Osfield
3808b298d1 Fixed memory leak associated with VertexArrayStte objects not getting released on destruction of Geometry/Drawables. 2018-08-16 19:24:56 +01:00
Robert Osfield
ed13576d03 From Chris White, Cygwin build fix 2018-08-08 14:42:04 +01:00
Vic-Min
15f2ae8d15 Renamed USE_DEPRECATED_API to OSG_USE_DEPRECATED_API 2018-08-08 14:37:28 +01:00
OpenSceneGraph git repository
9ab5aafd02 Merge pull request #583 from emminizer/flt-registry-cache
OpenFlight: Replace internal caches with osgDB::ObjectCache use.  Fix…
2018-07-31 16:58:41 +01:00
Daniel Emminizer
2e0e78144f OpenFlight: Replace internal caches with osgDB::ObjectCache use. Fixes unbounded memory growth when using readNode(std::istream&, ...) method. 2018-07-31 11:45:33 -04:00
Robert Osfield
ffb68bec7c Removed unneccessary FIX ME statement. 2018-07-31 09:14:02 +01:00
Robert Osfield
79bc4c3843 Fixed check against dataType changes 2018-07-27 17:34:30 +01:00
Alex Burton
a7747972dc updated osgviewerWX to remove deprecated calls in wxWidgets 3.x 2018-07-27 17:12:07 +01:00
OpenSceneGraph git repository
467baa8c00 Merge pull request #573 from emminizer/fix-flt-typo
FLT: Fix texture unit typo and code style from PR 568.
2018-07-09 17:55:38 +01:00
Daniel Emminizer
4d6c4a7f1f FLT: Fix texture unit typo and code style from PR 568. 2018-07-09 06:34:41 -04:00
Robert Osfield
fb40a0d1db Updated ChangeLog for 3.6.2 release 2018-06-29 10:56:35 +01:00
Robert Osfield
975b62c735 Updated date for 3.6.2 releases 2018-06-29 10:56:01 +01:00
Robert Osfield
dff2faa63b Updates for 3.6.2 stable release 2018-06-29 10:54:13 +01:00
Robert Osfield
500d3947ef Fixed isPointSpriteModeSupported assignment bug 2018-06-29 10:53:23 +01:00
Robert Osfield
2b7b051421 Removed the gl3.h usage for GL3 case as these headers were replaced by glcorearb.h, it's probably better to just fallback to gl.h and have the OSG get the extentions at runtime. 2018-06-29 09:52:47 +01:00
Robert Osfield
8a05850048 UPdated ChangeLog 2018-06-28 07:34:49 +01:00
Robert Osfield
469d743bec Updated for rc3 2018-06-28 07:06:59 +01:00
Larry-Hu
c1dfc39706 Remove call to nonexistent member seekpos() of std::fpos in VS 2017 version 15.8 or later 2018-06-28 06:54:57 +01:00
OpenSceneGraph git repository
aa5e25db8d Merge pull request #568 from emminizer/fix-flt-texture-export-gl3
OpenFlight: Textures now correctly export in GLCORE mode.
2018-06-27 20:59:09 +01:00
Daniel Emminizer
33cb2e6f70 OpenFlight: Textures now correctly export in GLCORE mode. 2018-06-27 12:57:20 -04:00
Robert Osfield
11e4a995c4 Updated for 3.6.2-rc2 2018-06-27 09:17:00 +01:00
Robert Osfield
27fc282bb5 Fixed relaseGLObjects() calls 2018-06-27 09:06:58 +01:00
Robert Osfield
9d897c2555 Merge branch 'OpenSceneGraph-3.6' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.6 2018-06-26 20:50:55 +01:00
Robert Osfield
cbcf7015bb Replaced creation of a temporary Settings object on the heap with creation on the stack to improve performance 2018-06-26 20:46:49 +01:00
OpenSceneGraph git repository
4d5c1ff14e Merge pull request #566 from emminizer/fix-gl_rb-in-gluscaleimage
GL_RG is now a supported format in gluScaleImage().
2018-06-26 20:17:07 +01:00
Robert Osfield
d01edcb540 Added GLExtensions::isPointSpriteModeSupported to allow it to be enable for GL versions that support GL_POINT_SPRITE_ARB/GL_POINT_SPRITE_OES 2018-06-26 20:10:51 +01:00
Daniel Emminizer
bfa8d157c1 GL_RG is now a support format in gluScaleImage(). 2018-06-26 14:44:34 -04:00
Robert Osfield
44b3bcc3fc Moved osg::clampProjectionMatrix() template from CullVisitor.cpp into include/osg/CullSettings to make it easier to implement custom clampProjectionMatrix callbacks 2018-06-25 20:02:30 +01:00
Robert Osfield
89e186014e Updates for 3.6.2-rc1 2018-06-20 13:59:10 +01:00
Calum Robinson
40bde873bc Fix z near calculation for lines 2018-06-20 12:28:06 +01:00
OpenSceneGraph git repository
12db2f8011 Merge pull request #558 from LaurensVoerman/submit-ffmpeg3.2
resolve av sync failure with ffmpeg 3.2 and up
2018-06-19 11:50:38 +01:00
Laurens Voerman
e18a03abc3 resolve av sync failure with ffmpeg 3.2 and up 2018-06-19 10:47:23 +02:00
弥继平
2205506aa3 Fixed the position of the viewport for the camera
The position of viewport doesn't setup properly, some part of viewer is out of CMFC_OSG_MDIView,  and not visible.
2018-06-18 19:38:27 +01:00
Laurens Voerman
15c6b7a196 remove include/osgQt from doxyfiles; add osgPresentation and osgUI 2018-06-14 14:45:49 +01:00
OpenSceneGraph git repository
9171f12069 Merge pull request #555 from emminizer/fix-noisy-flt-loading
FLT: Missing optional attr files on textures no longer generates a co…
2018-06-14 14:44:16 +01:00
Daniel Emminizer
acf359777e FLT: Missing optional attr files on textures no longer generates a console warning. 2018-06-14 07:33:08 -04:00
Robert Osfield
a9f91a875b Changed version to 3.6.2 in prep for next release 2018-06-14 08:54:21 +01:00
Robert Osfield
4665a2f033 To handle calling Array::setBinding() after Geometry::set*Array() call, to the Geometry::addVertexBufferObjectIfRequired(osg::Array* array) added treatment of array->getBinding()==Array::BIND_UNDEFINED as BIND_PER_VERTEX as a safe fallback. 2018-06-14 08:51:00 +01:00
Robert Osfield
673292b995 Moved Stae::setUseVertexAttributeAliasing(bool) implementation to .cpp an added call to _globalVertexArrayState->assignAllDispatchers(); to ensure state is consistent 2018-06-13 12:23:29 +01:00
Robert Osfield
b1d64ee476 Updated LICENSE to use the WxWidgets-3.1 and updates to the LGPL-2.1-only that updates addresses and tighten up language used.
Functionality the OSGPL-1.0 is the same as OSGPL-0.0, All the OpenSceneGraph users can use either OSGPL-0.0 or OSGPL-1.0.
2018-06-03 10:30:55 +01:00
Robert Osfield
5fb1e9c120 Removed deprecated xine plugin to simplify licensing (xine plugin is GPL'd) 2018-05-31 15:11:19 +01:00
Robert Osfield
801069d4cc As the author of all the files in osgPresentation and present3D have rectified the license notices to reflect their intended license rather than histoical license they had prior to being merged into the OpenSceneGraph project. OSGPL was always intended but missed during merge.
Replaced the GPL notices with OSGPL usge in present3D and include/osgPresentation as this was intended when Present3D was merged back into OpenSceneGraph but missed.
2018-05-31 14:45:37 +01:00
Robert Osfield
d3706a24e4 Updated for 3.6.1 2018-05-28 08:58:21 +01:00
Philippe Renon
0a4a31d17b Notify: silence warning about unused argument 2018-05-28 07:54:42 +01:00
Robert Osfield
3838267770 Updated ChangeLog 2018-05-23 19:54:10 +01:00
Robert Osfield
2c39714dff Updates for 3.6.1-rc7 2018-05-23 19:53:12 +01:00
Robert Osfield
4291636619 Updated REMOVE_SERIALIZER( ImageAttachment ); block to use 154 version to retain compatibility with binaries made with 153 SOVERSION prior to the Imageattachement change 2018-05-23 17:02:28 +01:00
Robert Osfield
189e4e3a64 Implemented StateGraph reuse in in scene graph Canera's RenderStage. 2018-05-23 14:30:31 +01:00
Robert Osfield
a6ef1cd66b Fixed warning of RenderLeaf's having multiple references in CullVisitor::createOrReuseRenderLeaf() but forcing a clean up of the StateGraph at the end of RenderStage::draw() 2018-05-23 14:13:27 +01:00
Robert Osfield
f2012eeeb8 Added check to make sure that glEnablei and glDisablei are only called when the capability is non zero to fix GL invalid value error. 2018-05-23 07:47:15 +01:00
Robert Osfield
e2aeab2b60 Fixed type of Timer_t under Windows 2018-05-23 06:32:42 +01:00
Robert Osfield
dce4b81728 Updates for rc6 2018-05-22 09:04:48 +01:00
gwaldron
e4adb509e0 osgText: perform pixel size computation in double-precision to prevent coordinate jitter 2018-05-21 20:04:45 +01:00
Robert Osfield
eae5f9b958 Moved the rotation to before the scale 2018-05-21 18:14:18 +01:00
Robert Osfield
9c6951e4ba Fixed typos 2018-05-21 13:18:29 +01:00
Robert Osfield
dce6684c59 Restored the REGISTER_WINDOWINGSYSTEMINTERFACE macro to the include/osg/GraphicsContext header and removed the OSGVIEWER_EXPORT as this was causing compatibility issues with osgQt.
In GraphicsWindowWin32 replaced REGISTER_WINDOWINGSYSTEMINTERFACE usage with locally implemented equivilant with the required OSGVIEWER_EXPORT.
2018-05-21 13:10:40 +01:00
Robert Osfield
43058ac1d5 Updated ChangeLog and README.md for rc5 2018-05-20 13:39:44 +01:00
Robert Osfield
55c0afbe3a Restructed SCREEN auto scaling so that it's removes the rotation of the modelview matrix so that the XY coords of the text map directly to window xy coords for all text alignment types 2018-05-20 13:22:58 +01:00
Robert Osfield
b34461febe Updates in prep for 3.6.1-rc5 2018-05-18 15:49:28 +01:00
Robert Osfield
e3c47b60e0 Moved REGISTER_WINDOWINGSYSTEMINTERFACE from include/osg/GraphicsContext to include/osgViewer/GraphicsWindow and added OSGVIEWER_EXPORT 2018-05-18 14:58:53 +01:00
Robert Osfield
7602b868f4 Added GL_RED and GL_RG support to _readColor()/Image::getColor(); 2018-05-18 13:55:01 +01:00
Robert Osfield
880a100a60 Cleaned up the WindowingSystemInterface registration 2018-05-18 12:52:50 +01:00
Robert Osfield
3b563ab21b Fixed create of graphics context by explicting adding USE_GRAPHICSWINDOW to force the WindowingSystemInterface to initialize 2018-05-18 12:47:34 +01:00
Robert Osfield
a86c6dc2c6 Quitened down unsupport compression output when passing in a file with a non rgb extension 2018-05-18 12:42:20 +01:00
Robert Osfield
1476f829c4 Introduced a local StateGraph hierarchy into CullVisitor::apply(osg::Camera&) and RenderBin to fixed RTT Camera bug where multiple RTT Camera end up with the rendering back end results assigned to them which occured when RTT Camera's share the same StateSet or null StateSet. 2018-05-18 10:00:10 +01:00
Robert Osfield
26acc9a6b1 Fixed support for update and event callbacks on StateSet/Uniform/StateAttributes on View(er) Cameras. 2018-05-14 09:46:39 +01:00
Robert Osfield
510a231e14 Renamed the counter used to enable traversal order sorting 2018-05-14 08:43:08 +01:00
Robert Osfield
3bbbbd07ea Improved the handling of precision 2018-05-14 08:24:02 +01:00
Robert Osfield
640b03b671 Fixed crash when using ShapeDrawable with a TriangleMesh or ConvexHull shape due to missing texture coords 2018-05-13 11:52:06 +01:00
Robert Osfield
7a3e0445ba Updated for rc 2018-05-13 09:23:38 +01:00
Robert Osfield
00a946bc2e Removed _traverseNumber variable that was duplicating the one in NodeVisitor base class 2018-05-13 09:18:31 +01:00
Robert Osfield
66251abd38 Updates for 3.6.1-rc4 2018-05-12 12:47:08 +01:00
Robert Osfield
312ce9ad05 Build fixes for OSG_USE_REF_PTR_IMPLICIT_OUTPUT set to OFF 2018-05-12 12:41:42 +01:00
Robert Osfield
362e355db2 Rewrote TextBase::computeMatrix(..) computation of the scaling factor with slower but easier to understand and more robust code 2018-05-12 11:40:25 +01:00
Robert Osfield
cf2e3227cc Removed use of deprecated cmake policy 2018-05-12 07:51:51 +01:00
Robert Osfield
01f69e6b10 Moved constructors and destructors to .cpp 2018-05-11 11:16:43 +01:00
Robert Osfield
a211ea4e68 Revert "Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging"
This reverts commit 0fc7aa8cc0.
2018-05-11 11:11:48 +01:00
Robert Osfield
fcde92ad89 Fixed crash the occurred when passing in a osgDB::Options to the ObjectCache that doesn't have any references to it. 2018-05-11 09:00:22 +01:00
Robert Osfield
0fc7aa8cc0 Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging 2018-05-11 08:58:30 +01:00
Robert Osfield
be363ef8d4 Fixed build when OSG_ENVVAR_SUPPORTED is disabled and quietened down warnings using OSG_UNUSED* macros 2018-05-10 18:58:29 +01:00
Robert Osfield
b1daa6a693 Changed the ordering of the build include directory and the source include directory to avoid build issues on systems where a different version of the OSG has been built in-source then another built out-of-source resulting in conflicts 2018-05-10 18:50:17 +01:00
Robert Osfield
05793cb104 Fixed typo 2018-05-10 16:59:56 +01:00
Robert Osfield
a5c421863e Updates for 3.6.1-rc3 2018-05-06 07:47:23 +01:00
Robert Osfield
e79edabf98 Restructed the handling of SCREEN_COORD scaling to better handle window resizing 2018-05-05 15:47:28 +01:00
Robert Osfield
d95993554e Added C++ specific path for calling std::map<>::erase() to avoid issues with std::map<>::erase implementation that invalidates iterators 2018-05-05 12:31:00 +01:00
Robert Osfield
f49e1d32c9 Replaced std::auto_ptr<> usage as it's deprecated in C++11 and will be removed in C++17 2018-05-05 12:28:45 +01:00
OpenSceneGraph git repository
a15d4532fa Merge pull request #545 from emminizer/fix-gl3-text-bad-mode
Text only applies GL_TEXTURE_2D modes when fixed function is availabl…
2018-05-04 16:11:31 +01:00
Daniel Emminizer
27955ae8e9 Text only applies GL_TEXTURE_2D modes when fixed function is available. Prevents GL3 Core Profile console spam. 2018-05-04 06:44:13 -04:00
Robert Osfield
c078968f66 Added non const version of State::getActiveDisplaySettings() 2018-05-04 10:54:02 +01:00
Robert Osfield
f90edd0d9f Added check for null to prevent null entries getting into the cache 2018-05-04 09:44:43 +01:00
Robert Osfield
62a9f87f45 Added osg::MakeString class to make it easier to create std::string's using std::ostream style << usage. 2018-05-04 09:31:57 +01:00
Robert Osfield
f510613d55 Fixed null pointer warning 2018-05-04 09:22:54 +01:00
Björn Blissing
645704dfd3 Check existence of path before reading image
When loading texture images inside the FBX plugin check that the path
exists before trying to read the image. This is done to avoid
unnecessary warnings inside the readRefImageFile function.
2018-05-03 16:13:24 +01:00
Robert Osfield
13d56b8b37 Updated ChangeLog 2018-05-02 09:14:04 +01:00
Robert Osfield
c5990c4f65 Updates for the 3.6.1-rc2 2018-05-02 09:10:54 +01:00
Robert Osfield
94c4baccad Updated SO version to reflect change in ABI 2018-04-30 11:55:17 +01:00
OpenSceneGraph git repository
bb1e208d30 Merge pull request #542 from psyinf/fix_particle_system_header
FIX: <osgParticle> removed unimplemented functions from header
2018-04-30 11:44:02 +01:00
Sebastian Messerschmidt
fce55993bc FIX: <osgParticle> removed unimplemented functions from header 2018-04-30 11:16:02 +02:00
Robert Osfield
31c9dbc881 Fixed particle update bug where a ParticleSystem wouldn't start when loaded during the frame loop due to the _last_frame value not being set. 2018-04-27 11:25:46 +01:00
Robert Osfield
c9b0fcaa32 Updated ChangeLog, README.md and rc number for 3.6.1-rc1 2018-04-26 10:21:53 +01:00
Robert Osfield
37a63d37e2 Split up #pragma so that there only three parameters per line to aovid Intel driver bug crash 2018-04-26 09:52:32 +01:00
Robert Osfield
1daacced5a Renamed text.vert and text.frag to osgText_Text.vert and .frag to avoid name overlapping with user shaders. 2018-04-26 09:52:32 +01:00
Julien Valentin
cea33e40df add wrapper for osg::DrawIndirectBufferObject 2018-04-25 09:49:56 +01:00
Robert Osfield
2b3ac015bb Renamed CMake variable + C++ #define to OSG_GL_CONTEXT_VERSION 2018-04-24 17:06:07 +01:00
Robert Osfield
1aa0a80de7 Added OSG_GL_CONTEXT_STRING cmake variable to set include/osg/GL headers that sets Traits::glContextVersion. 2018-04-24 16:22:13 +01:00
OpenSceneGraph git repository
4dd1156444 Merge pull request #537 from openscenegraph/revert-536-default-gl3-context
Revert "When GL3 build is enabled, default context requested is version 3.3, …"
2018-04-24 15:38:02 +01:00
OpenSceneGraph git repository
c10f298dc6 Revert "When GL3 build is enabled, default context requested is version 3.3, …" 2018-04-24 15:37:44 +01:00
OpenSceneGraph git repository
e8c0033f5f Merge pull request #536 from emminizer/default-gl3-context
When GL3 build is enabled, default context requested is version 3.3, …
2018-04-24 15:36:11 +01:00
Robert Osfield
31c29f4318 Refactored the handling of glyph and shadow alpha values to make the text and shadow clearer for fonts with narrow glyphs 2018-04-24 15:33:03 +01:00
Robert Osfield
e0be94389e Refactored the handling of text bounding box to provide more stable bounding box computation 2018-04-24 13:52:53 +01:00
Daniel Emminizer
d660b29ef0 When GL3 build is enabled, default context requested is version 3.3, enabling core profile by default. 2018-04-24 06:31:32 -04:00
Alberto Luaces
490d3a8f21 Small fix for uncaught typo. 2018-04-23 11:03:37 +01:00
Alberto Luaces
02c310982e Fix typos and spelling. 2018-04-23 11:03:37 +01:00
OpenSceneGraph git repository
c3008512f1 Merge pull request #534 from emminizer/fix-msvc-includes
Fix includes for MSVC 2015 build.
2018-04-23 11:02:03 +01:00
Daniel Emminizer
22d2fae30c Fix includes for MSVC 2015 build. 2018-04-20 13:16:43 -04:00
Robert Osfield
dac9ed17f1 Updated ChangeLog 2018-04-20 15:58:27 +01:00
Robert Osfield
709194c88c Replaced osgUtil::IntersectVisitor usage with osgUtil::InteresectionVisitor 2018-04-20 14:32:34 +01:00
Robert Osfield
8de8af6850 Removed TriStripVisitor for default set of Optimizer passes as it doesn't generate efficient scene graphs 2018-04-20 11:48:46 +01:00
Robert Osfield
7bda8083fb Added osgUtil::optimizeMesh(osg::Node* node) convinience method 2018-04-20 11:48:39 +01:00
Robert Osfield
a082b57c3f Removed usage of the osgUtil::TriStripVisitor is it generates osg::Geometry that perform very poorly when using VBO and VAO's vs GL DisplayLists.
With DisplayLists being deprecated in GL and VBO and VAO becoming standard it's best to standardize on using the osgUtil::MeshOptimizers instead of TripStrupVisitor
2018-04-20 11:44:44 +01:00
Robert Osfield
547340659f Fixed the set*Binding() methods so that they assign BufferObjects when required 2018-04-19 19:43:14 +01:00
Robert Osfield
29d12ddcbc Fixed messages 2018-04-19 19:42:51 +01:00
Robert Osfield
f95fdd4d4e Fixed the GLBufferObject size computation so that it takes into account padding. 2018-04-19 19:41:51 +01:00
Robert Osfield
bf6db4eee7 Replaced the use of osgUtil::TriStripVisitor with ogUtil::MeshOptimizer usage to improve performance.
Fixed set setColorArray assignement to pass in the color binding
2018-04-19 19:36:19 +01:00
Robert Osfield
fe39589771 Fixed the handle of boundary equalization 2018-04-18 10:15:01 +01:00
Robert Osfield
d88f0c4cd1 Added --equalize-boundaries -e command line option to call terrain->setEqualizeBoundaries(true) 2018-04-18 10:03:52 +01:00
Robert Osfield
a2a026e116 Updated version number in prep for future 3.6.1 release. 2018-04-16 17:53:38 +01:00
Robert Osfield
38ad6ed3b3 Fixed inline Drawable::draw(..) method 2018-04-16 17:18:49 +01:00
Robert Osfield
9d72bf4712 Fixed Geometry::drawImplmentation() handling of VBO's to prevent them from being used when display lists are used. 2018-04-16 17:18:37 +01:00
Robert Osfield
15429198b8 Replaced osgViewer::GraphicsWindow dynamic_cast as it's not neccessary. 2018-04-15 08:25:57 +01:00
Robert Osfield
3da4a5e503 Fixed typo 2018-04-07 18:35:19 +01:00
Robert Osfield
7ab1208c65 Renamed osg::ComputeDispatch to osg::DispatchCompute to make sure the nameing between GL and OSG is consistent i.e glDispatchCompute -> osg::DispatchCompute
Updated AUTHORS.txt, NEWS.txt and README.txt for CMakeLists.txt for 3.6.0 release
2018-04-07 17:59:55 +01:00
Robert Osfield
7c7a904315 Updated ChangeLog 2018-04-07 07:19:14 +01:00
Robert Osfield
d3c0a90a3c Updated for rc7 2018-04-07 07:18:41 +01:00
Robert Osfield
6bfca1582e Refactored the way that margin is applied to the text buounding box to prevent growth of the bounding box each time Text::setPosition() is called. 2018-04-06 20:07:57 +01:00
Robert Osfield
ba4624c437 Updated ChangeLog 2018-04-06 15:33:42 +01:00
Robert Osfield
c9cce01868 Update ChangeLog 2018-04-06 14:58:00 +01:00
Robert Osfield
1866b5ca44 Updated for rc6 2018-04-06 14:47:54 +01:00
Robert Osfield
1145b84f8b Fixed warning 2018-04-06 14:17:35 +01:00
Robert Osfield
36f891c6cd Changed TextBase::setAlignment() to use computeGlyphRepresentation(); rather than computePositions(); to address issues seen with calling Text::setAlignment() after calls to Text::setText() 2018-04-06 14:10:51 +01:00
Robert Osfield
d1c54223cb Added osgtext --alignment test to look the effect of calling Text::setAlignent() before and after the Text::setText(). 2018-04-06 14:10:43 +01:00
OpenSceneGraph git repository
0ce3131ffd Merge pull request #525 from emminizer/fix-windows-export
osgDB: Added missing extern OSGDB_EXPORT.
2018-04-05 18:00:30 +01:00
Daniel Emminizer
3d8cc71601 osgDB: Added missing extern OSGDB_EXPORT. 2018-04-05 10:51:24 -04:00
Robert Osfield
914e60a872 Quietened down debug message output for osgText shader setup and Drawable::createVertexArrayStateImplementation 2018-04-05 14:18:30 +01:00
Robert Osfield
4cb697205e Changed DisplaySettings::setShaderHint(..) messages to INFO 2018-04-05 12:35:36 +01:00
Robert Osfield
5d54697c29 Updated ChangeLOG and news 2018-04-05 12:19:56 +01:00
Philippe Renon
edbca390ed mingw: fix compile error in GraphicsWindowWin32.cpp
compilation error was introduced by msvc specific change
see bb169979a1
2018-04-05 11:15:49 +01:00
Ralf Habacker
d468cae86b Remove duplicated and incorrect fetching of 'map_bump' attributes in obj plugin
Parsing the key 'map_bump' was processed in the block, where the attributes
for 'bump' are extracted and results into having parts of the key in the
extracted filename, generating an invalid filename.

The mentioned string compare could be removed without loosing any features,
because the key 'map_bump' is parsed correctly some lines below.
2018-04-05 08:46:33 +01:00
Robert Osfield
4136621e93 Updated ChangeLog for rc5 2018-04-04 15:35:28 +01:00
Robert Osfield
9168b6e5de Fixed threading crash in osgFX that occurred when an osgFX node is added to the scene being rendered in multiple threaded windows. 2018-04-04 15:11:25 +01:00
Robert Osfield
74e74d76d9 Added focus classifiction of handling of keyboard events 2018-04-04 14:10:43 +01:00
Robert Osfield
b8b105b54e Added EventHandler to report key and mouse events for debugging purposes 2018-04-04 14:10:43 +01:00
Robert Osfield
3be15a310e Added -4 command line entry that creates two seperate windows within CompositeViewer 2018-04-04 14:10:43 +01:00
Frank Bausch
ceed09afea When testing XYZ/ECEF coordinate values that convert to LLA points with latitude = 90.0 or latitude = -90.0, the heights calculated by EllipsoidModel::convertXYZToLatLongHeight have substantial errors. With the provided change, points at the pole are handled more correctly. This has been tested against US NGA GoldData. 2018-04-04 08:51:38 +01:00
Robert Osfield
7541bc9d48 Updated rc to 5 2018-04-03 17:21:47 +01:00
OpenSceneGraph git repository
23c3ea4ecc Merge pull request #518 from emminizer/fix-scroll-event
CompositeViewer: SCROLL event now only goes to view with focus.  Incl…
2018-04-03 17:17:59 +01:00
Robert Osfield
419c351862 Updated rc number to 4 2018-04-03 16:07:46 +01:00
Robert Osfield
2746f50a7c Updated ChangeLog and NEWS for rc3 2018-04-03 16:04:24 +01:00
Thomas Hogarth
7c57dd04de missing gles2 check 2018-04-03 15:48:37 +01:00
Daniel Emminizer
59eae3260d CompositeViewer: SCROLL event now only goes to view with focus. Includes minor typo fixes. 2018-04-03 10:32:58 -04:00
Robert Osfield
f9f475d76d Added a ShadowTechniue::setShadowedScene() virtual method to make it possible to implement techniques as fascades to other techniques 2018-04-03 15:30:58 +01:00
Andreas Ekstrand
e888e9621c The attached code (from the 3.6 branch) adds a keepSeparatePoints option to the SHP plugin which makes it possible to avoid merging point features into multi-points, in case you e.g. need to keep separate point attributes.
It also contains a fix in the Xbase DBF parser, converting a numeric shape attribute to double instead of integer. As stated in e.g. https://en.wikipedia.org/wiki/.dbf the numeric field can contain decimals.
2018-04-03 12:43:34 +01:00
Robert Osfield
3450b9fee8 Removed osgShadow::ShadowVolume as it functionality isn't functional 2018-04-03 12:23:18 +01:00
OpenSceneGraph git repository
d0f891ca31 Merge pull request #516 from eligovision/OpenSceneGraph-3.6_program
osg::Program's compileGLObjects and apply methods fixed for OSG witho…
2018-04-03 12:10:29 +01:00
Konstantin S. Matveyev
41f5157c1e osg::Program's compileGLObjects and apply methods fixed for OSG without OSG_GL_FIXED_FUNCTION_AVAILABLE 2018-04-02 23:58:33 +03:00
Robert Osfield
f71513cab5 Rewrote the handling of AutoTransform::setAutoScaleToScreen(bool) functionality so that is disabling CullingActive when switched on. 2018-04-02 18:29:39 +01:00
Robert Osfield
6c055e3400 Added __VERSION__<140 check for usage of gl_ClipVertex to avoid GL3 core profile usage issues 2018-04-02 16:23:07 +01:00
Robert Osfield
7ed0389051 Restructured merge geometry code to make it easier to follow 2018-04-02 14:09:57 +01:00
Robert Osfield
2946ea0759 Fix for MergeGeometryVsiitor bug. Restructured the processing the merge geometry list to avoid missing geometries that aren't binned along with other geometries. 2018-04-02 14:09:49 +01:00
Robert Osfield
589905fc38 Removed stray CMAkeLists.txt from TARGET_SRC list 2018-04-01 10:40:25 +01:00
Andreas Ekstrand
4cdca85699 Small fix (from the 3.6 branch) in the osgjs plugin, avoiding a double addition of the CullFace attribute when it has been turned off. This resulted in an empty json object in the osgjs file causing warnings in osgjs. 2018-04-01 10:19:27 +01:00
Robert Osfield
363a933f25 Updated NEWS and ChangeLog for 3.6.0-rc3 2018-03-30 17:52:12 +01:00
Robert Osfield
d0f7b85ae0 Fixed build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2018-03-30 16:34:01 +01:00
Robert Osfield
9d5a22a0aa Added suport for writing to gl_ClipVertex 2018-03-30 15:27:35 +01:00
Robert Osfield
88e8b1ede0 To osgclipe example added --text textstring and --simple command line options to test mixing text and clipping 2018-03-30 15:16:45 +01:00
Robert Osfield
f54403284f Changed Layer::get*Value(..) methods to const 2018-03-30 12:47:15 +01:00
Robert Osfield
79b181f9c9 Fixed double calling of TerrainTechnique::init(). 2018-03-29 11:38:53 +01:00
Robert Osfield
9526a3c35d Maded TerrainTechnique::setTerrainTile(..), addNeighbour(..), removeNeighbour(..) and containsNeighbour(..) virtual and public to enable implementation of TerrainTechnique that act as a facade to actual TerrainTechnique implementations. 2018-03-29 11:38:53 +01:00
Robert Osfield
86b57d552f Updated RC number to 3 2018-03-28 14:04:41 +01:00
Robert Osfield
aae5f87d13 Fixed osgDB::findFileInDirectory() handling of directory strings with trailing \ or / that was causing failure to find valid files in otherwise valid directories 2018-03-28 11:37:42 +01:00
Haojia Yu
0d386ff3f1 OutputStream writes images using its Options object
when writing images, OutputStream can search files using its Options object rahter than always using FilePathList object of global Regidtry instance.
2018-03-28 09:05:40 +01:00
OpenSceneGraph git repository
fb39450067 Merge pull request #510 from eligovision/OpenSceneGraph-3.6_ios
GraphicsWindowIOS: multithreaded viewer's mode support added; updated…
2018-03-27 08:39:52 +01:00
OpenSceneGraph git repository
00e2466bc7 Merge pull request #508 from eligovision/OpenSceneGraph-3.6_plugins
OSG 3.6: Write support with .curl pseudo extension added
2018-03-27 08:37:29 +01:00
OpenSceneGraph git repository
37fabbeecd Merge pull request #509 from eligovision/OpenSceneGraph-3.6_vas
VertexArrayState: typo fixed in log
2018-03-27 08:35:57 +01:00
Konstantin S. Matveyev
a846c0160c GraphicsWindowIOS: multithreaded viewer's mode support added; updated for iOS-11 SDK; view rotations fixed; GLES2, GLES3 preprocessors fixed; tested on iPhone4 and upper 2018-03-26 20:40:14 +03:00
Konstantin S. Matveyev
cbb9fd4218 VertexArrayState: typo fixed in log 2018-03-26 18:31:23 +03:00
Konstantin S. Matveyev
1a86ed4e7a Write support with .curl pseudo extension added 2018-03-26 17:59:49 +03:00
Robert Osfield
80a2dd924f Updated ChangeLog 2018-03-26 09:55:53 +01:00
Robert Osfield
aebdefbbf7 Updated NEWS for 3.6.0-rc2 2018-03-26 09:54:59 +01:00
Robert Osfield
a399e9ccb2 Re-ordered the creating of the DatagbaseThread to avoid startThread being called twice. 2018-03-25 12:14:46 +01:00
Robert Osfield
862c36a08b Added check if thraeding is running before executing start thread. 2018-03-25 12:13:50 +01:00
Robert Osfield
6b037372b6 Updated ChangeLog, AUTHORS and Controbitors for 3.6.0-rc1 2018-03-24 18:02:35 +00:00
Robert Osfield
ef94f2e391 Added new features in 3.6 to NEWS release 2018-03-24 17:51:06 +00:00
Robert Osfield
6c6ae2db60 First step for 3.6 stable release news 2018-03-24 12:13:59 +00:00
Robert Osfield
1930d9c345 Fixed read shader to safer ref version 2018-03-24 11:23:59 +00:00
Robert Osfield
640e7bc06c Fixed spotlight colour mixing 2018-03-24 10:59:15 +00:00
OpenSceneGraph git repository
46850214df Merge pull request #502 from Haojia521/OutputStreamUseTargertSoVersion
write binary file with a specific so version
2018-03-23 20:20:43 +00:00
Robert Osfield
647b578ce6 Removed serailizers that are now supplied by osg::Node 2018-03-23 19:54:33 +00:00
Robert Osfield
1d5ae1362a Fixed member variable names to avoid conflicts with osg::Node 2018-03-23 19:54:01 +00:00
Robert Osfield
9634688559 Removed Drawable writing out of StateSet as this is now done by Node 2018-03-23 18:07:36 +00:00
Michael Kapelko
96b586c165 Provide osgemscripten example CMake flags in a more stable way 2018-03-23 16:42:40 +00:00
Robert Osfield
b1be6c6def Changed the isBufferObjectSupported flag so that it's true when either VBO or PBO's are supported 2018-03-23 12:56:26 +00:00
Paul Obermeier
b1170621c8 Fixes for VS2008 and 2010 build 2018-03-22 17:36:19 +00:00
Robert Osfield
3c1e29db9f Moved OPENGL_INCLUDE_DIR include into it's own INCLUDE_DIRECTORIES(SYSTEM ${OPENGL_INCLUDE_DIR}) entry to help with FreeBSD builds where a previous rev of the OSG has already been installed 2018-03-22 16:51:03 +00:00
Robert Osfield
ffb3ed8ef7 Removed typedef and used osg::GraphicsContext::Cameras explictly to avoid any hiding of type 2018-03-22 09:05:43 +00:00
Victor
d18f61688d Fixed bug of determining availability of functions ‘pthread_getconcurrency’, ‘pthread_setconcurrency’, ‘pthread_setaffinity_np’ in ‘pthread’ library
CMake cannot find 'pthread_getconcurrency’, ‘pthread_setconcurrency’ and ‘pthread_setaffinity_np' functions in 'pthread' library because when linking internal cmake test did’t specifed ‘-l pthread’.
2018-03-22 08:37:09 +00:00
Robert Osfield
7d290daa73 Removed -m message that was causing problems with branch creation 2018-03-20 09:20:59 +00:00
Robert Osfield
383161c14c Updated version numbers in prep for 3.6 branch 2018-03-20 09:12:58 +00:00
Robert Osfield
ba4791a15d Updated ChangeLog and AUTHORS file 2018-03-20 09:02:05 +00:00
Robert Osfield
950823fac9 Updated ChangeLog and updated version to 3.5.11 2018-03-19 14:27:18 +00:00
Robert Osfield
b563f1bd78 Fixed build issues when building with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2018-03-19 14:08:47 +00:00
Robert Osfield
b38a37c3bb Fixed warnings 2018-03-19 10:42:09 +00:00
Robert Osfield
b7147ff532 Updated ShaderGen shaders 2018-03-16 11:33:03 +00:00
Robert Osfield
e5b67a6795 Removed the static osg::Program creation as it's not required 2018-03-15 16:50:47 +00:00
Robert Osfield
add6b3edee Added --shader saderfilename command line option to enable one to manually specify which shaders to use for the uber program. 2018-03-15 16:49:58 +00:00
Robert Osfield
0308dfecf5 Introduced a _specverson to centralizer the control of this variable 2018-03-15 16:12:40 +00:00
Robert Osfield
d365a6a347 Added support for Collada DOM-2.5 2018-03-15 15:58:46 +00:00
OpenSceneGraph git repository
8229d19f21 Merge pull request #495 from aitormoreno/fix_installExamplesPDB
fix installation of PDB files from the examples.
2018-03-15 12:53:32 +00:00
Aitor Moreno
bcd2adf977 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph into fix_installExamplesPDB 2018-03-14 16:56:08 +01:00
Aitor Moreno
79fde49084 (re)fix the installation of the PDB files 2018-03-14 16:54:05 +01:00
Robert Osfield
57f2b1fa27 Standardized the MSCV INSTALL lines between applications and examples 2018-03-14 08:39:12 +00:00
Robert Osfield
4447190dd6 Refactored osgUtil::ShaderGen to use #pragma(tic) shader composition. 2018-03-14 08:22:45 +00:00
Aitor Moreno
5fcaf18025 fix installation of PDB files from the examples. 2018-03-13 11:21:35 +01:00
OpenSceneGraph git repository
009580676f Merge pull request #494 from pelicanmapping/fix-text-empty-checks
Added required empty vector checks to osg::Text
2018-03-13 08:47:53 +00:00
gwaldron
23b94c2468 Text: added code in accept(functor) methods to check for empty vectors before accessing front() element, which was causing a crash in some cases. Also fixed a negated null check in getCharacterCoords 2018-03-12 17:35:46 -04:00
Yaroslav Tarasov
f8199935fa Fixed renamed of _textureDepth. 2018-03-12 16:14:30 +00:00
Robert Osfield
5c8a5307d6 From Colin McDonald, "If the glCreateProgram in osg::Program fails for any reason, then subsequently
Program::PerContextProgram::linkProgram would crash.  I've put in some
checks to prevent that."
2018-03-12 15:55:35 +00:00
Robert Osfield
3f686d8719 Fixed indentation 2018-03-12 15:29:56 +00:00
Robert Osfield
7ce1938543 Improved indentation 2018-03-12 15:12:44 +00:00
Robert Osfield
556089e6a1 From Raymond de Vries, added support for latest FBX SDK 2018-03-12 10:43:56 +00:00
Robert Osfield
957bd4b886 Added FbxLayeredTexture support 2018-03-12 10:29:04 +00:00
Robert Osfield
125263f216 Refactored the texture setup to streamline it and make it easier to adapt 2018-03-10 17:51:52 +00:00
Alessandro Terenzi
9010fd8035 iOS CMake project generation improvements (bitcode option)
when building for iOS, Xcode allows developers to specify to enable or disable the 'bitcode' compilation option. There's not a preferred way to go and the choice is really up to the developer but considering that:

1. Currently the generated project defaults the option to YES
2. There are almost 90 projects targets that should be modified if one wants to disable the bitcode option (which considerably reduces the footprint of the app)
3. Even though one can select all the 90+ targets and set the option to NO for all of them, the updates could take a few seconds and could be error prone because one could miss to select some targets

I propose to add a CMake setting that is displayed only when building for iOS. By setting this option "before" the project generation would speed up things for developers and would avoid errors at compiling time.
2018-03-09 10:17:59 +00:00
Robert Osfield
e17f1c4e31 Refactored the handling if RESIZE, CLOSE, QUIT AND USER events so they are dispatched to all views associated with a window, or all views associated with a CompositeViewer 2018-03-08 16:26:01 +00:00
Robert Osfield
1020bddb15 Fixed recursive call bug 2018-03-08 10:47:07 +00:00
Robert Osfield
4e6e0f53be Changed glDrawBuffer/glReadBuffer calls to use the new State::glDrawBuffers/glReadBuffers helper functions to enable lazy state updating to avoid unneccessary GL calls 2018-03-07 17:49:40 +00:00
Robert Osfield
4dac60540a Changed the default values of _drawBuffer and _readBuffer to make sure that the lazy state updating in State.glDrawBuffers(GLenum)/glReadBuffers(Glenum) doesn't ever ignore the first call. 2018-03-07 17:44:48 +00:00
Robert Osfield
178cba7cf0 Fixed build error 2018-03-07 16:45:58 +00:00
Robert Osfield
98cdeac9f6 Added missing Camera::setDrawBuffer/setReadBuffer() 2018-03-06 16:54:57 +00:00
Robert Osfield
f8eabd38ba Added missing Camera::setDrawBuffer() & setReadBuffer() 2018-03-06 16:42:11 +00:00
Robert Osfield
731065a32e Added missing setDrawBufer/setReadBuffer calls 2018-03-06 16:23:20 +00:00
Robert Osfield
b03e76bdb9 Renamed numBytesPerPixel to numBytesPerComponent to be clearer 2018-03-06 09:58:31 +00:00
Robert Osfield
64341cfb72 Added State::glDrawBuffer/glReadBuffer() method to implement lazy state updating for glDrawBuffer and glReadBuffer 2018-03-06 09:49:02 +00:00
OpenSceneGraph git repository
ee3235e7e0 Merge pull request #491 from mmassing/readerwritergdal_fix_reading_of_multichannel_multibyte_images
ReaderWriterGDAL: fix stride when reading multi-channel images with…
2018-03-06 09:33:30 +00:00
OpenSceneGraph git repository
5b80ee91c6 Merge pull request #492 from emminizer/stateattribute-typo
Minor typo fix on osg::StateAttribute
2018-03-06 09:25:49 +00:00
Daniel Emminizer
28544a4e29 Minor typo fix on osg::StateAttribute 2018-03-05 10:26:54 -05:00
Manuel Massing
b4cf315d6f - ReaderWriterGDAL: fix stride when reading multi-channel images with more than 1 byte per pixel 2018-03-05 15:48:24 +01:00
Robert Osfield
1b8567e11e Added deprecated comments for ShaderComposer 2018-03-05 14:39:07 +00:00
OpenSceneGraph git repository
31d78b7bb3 Merge pull request #490 from torokati44/master
osgDB: Fix handling of return value of loadLibrary in Registry.
2018-03-02 09:43:24 +00:00
TÖRÖK Attila
b7c429a72a osgDB: Fix handling of return value of loadLibrary in Registry.
"Unable to load ..." was printed if the library could be loaded,
and it wasn't if not.
2018-03-02 00:13:43 +01:00
OpenSceneGraph git repository
eafab0fc35 Merge pull request #488 from LaurensVoerman/submit_array_ext
remove _EXT from GL_MAX_ARRAY_TEXTURE_LAYERS_EXT
2018-02-28 14:10:15 +00:00
Laurens Voerman
c81317b5b0 remove _EXT from GL_MAX_ARRAY_TEXTURE_LAYERS_EXT and GL_TEXTURE_BINDING_2D_ARRAY_EXT 2018-02-28 14:11:41 +01:00
Robert Osfield
be723811c8 Added GUIEventHandler to allow one to write out models with event callbacks 2018-02-28 10:30:47 +00:00
Robert Osfield
99bcd95756 Replaced GL_TEXTURE_2D_ARRAY_EXT with GL_TEXTURE_2D_ARRAY 2018-02-28 08:50:48 +00:00
Robert Osfield
3dec244d5b Changed GL enum to fix Windows build issue 2018-02-28 08:02:39 +00:00
Robert Osfield
6a4609c28f Fixed precision issue with filling in the last element of the TransferFunction1D's osg::Image. 2018-02-27 19:09:18 +00:00
Robert Osfield
7b6eedbdf4 Restructured the way that applyTexParameters() is applied to address issues with Intel drivers not handling mipmap generations unless the tex parameters are reapplied on new upload of data. 2018-02-27 17:35:13 +00:00
Robert Osfield
39881b5576 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2018-02-23 09:57:19 +00:00
Robert Osfield
2b13166c8d Cleaned up the applying of the glDrawBuffers() 2018-02-23 09:55:00 +00:00
OpenSceneGraph git repository
ebf0e8f435 Merge pull request #485 from eligovision/OpenSceneGraph_gles
GLExtensions fix: No PBO on GLES2 by default
2018-02-23 08:28:59 +00:00
Konstantin S. Matveyev
e3df1e954d GLExtensions fix: No PBO on GLES2 by default 2018-02-22 16:43:14 +03:00
OpenSceneGraph git repository
ffc8e54cdc Merge pull request #484 from LaurensVoerman/submit_inventor_dllexport
Remove OSG_EXPORT from deprecated_osg::Geometry in inventor plugin.
2018-02-22 08:15:46 +00:00
Laurens Voerman
819fb2b14c Remove OSG_EXPORT from deprecated_osg::Geometry in inventor plugin. 2018-02-21 13:38:42 +01:00
OpenSceneGraph git repository
56baa7bf04 Merge pull request #479 from LaurensVoerman/submit_vc14WarnC4800_v2
move Get/SetScalarvalue out of ValueObject and provide specialization…
2018-02-19 10:14:36 +00:00
Robert Osfield
f5021e8bc0 Added ADD_DEFINITIONS(-D_WINSOCK_DEPRECATED_NO_WARNINGS) to quieten warning 2018-02-19 10:07:14 +00:00
OpenSceneGraph git repository
2378b41e9f Merge pull request #482 from hwiesmann/master
Addition of comments for ClusterCullingCallback
2018-02-19 08:39:42 +00:00
OpenSceneGraph git repository
c52ae4f99f Changed the doxygen control characters and clarifications 2018-02-19 08:39:23 +00:00
OpenSceneGraph git repository
7200b21203 Merge pull request #483 from filnet/fix_log_messages
Fix log messages
2018-02-19 08:35:00 +00:00
Philippe Renon
4a025cafb4 renderstage: fix spelling in log message 2018-02-18 18:39:47 +01:00
Philippe Renon
b4a2114fd4 singlewindow: minor log output fix
log message made it look like it originated from View::setUpViewOnSingleScreen
2018-02-18 18:39:47 +01:00
Hartwig Wiesmann
f01383c02a Addition of comments for ClusterCullingCallback 2018-02-18 08:49:41 +03:00
OpenSceneGraph git repository
21539466fd Merge pull request #480 from hwiesmann/master
Addition of radius parameter for ClusterCullingCallback's constructor
2018-02-16 19:56:32 +00:00
Hartwig
73a36679df Addition of radius parameter for ClusterCullingCallback's constructor
The radius parameter is already present in ClusterCullingCallback's set method but has been forgotten in the constructor.
2018-02-15 21:10:59 +01:00
Laurens Voerman
b79d680580 move Get/SetScalarvalue out of ValueObject and provide specialization for GetScalarValue<bool> fixing MSVC waring C4800 2018-02-15 14:59:24 +01:00
OpenSceneGraph git repository
486cd48daf Merge pull request #476 from LaurensVoerman/submit_luaWarn
silence MSVC warning C4324: 'lua_longjmp': structure was padded
2018-02-14 17:16:39 +00:00
OpenSceneGraph git repository
03ef16a4fa Merge pull request #475 from LaurensVoerman/submit_Zeroconf_warningsFix
fix visual studio compile warnings for ZeroConfDevice project.
2018-02-14 17:15:31 +00:00
OpenSceneGraph git repository
da31fc9c76 Merge pull request #474 from LaurensVoerman/submit_bool_getScalarvalue_Bug
bugfix: GetScalarValue returns inverted values for booleans
2018-02-14 17:12:46 +00:00
Laurens Voerman
ac00b8537f silence MSVC warning C4324: 'lua_longjmp': structure was padded 2018-02-14 10:49:33 +01:00
Laurens Voerman
01eff6bc6b fix visual studio compile warnings for ZeroConfDevice project. 2018-02-14 10:38:09 +01:00
Laurens Voerman
ec4881da5a bugfix: GetScalarValue returns inverted values for booleans; SetScalarValue needs to be a SetValueVisitor 2018-02-13 17:38:35 +01:00
Robert Osfield
68bb67312e Improved handling of updates to the Texture target that require the texture to be reapplied.
Used State for applying Texture target to work better with lazy state updating.
2018-02-13 12:12:34 +00:00
Robert Osfield
e491c61fa5 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2018-02-13 12:03:19 +00:00
Robert Osfield
b8e5f22cb7 Added virtual bool Texture::isDirty(contextID) method to help determine whether a GL texture object is likely to be out of date and needs updating 2018-02-13 12:01:57 +00:00
OpenSceneGraph git repository
f9e2fb9d74 Merge pull request #473 from LaurensVoerman/submit_OT_winver
remove conficting defenition of _WIN32_WINNT in OSG_DETERMINE_WIN_VERSION is ON
2018-02-12 13:42:47 +00:00
Laurens Voerman
59500d78d0 remove conficting defenition of _WIN32_WINNT in OSG_DETERMINE_WIN_VERSION is ON 2018-02-12 10:47:37 +01:00
Robert Osfield
22d6ce826f Changed internalFormat to use pixelFormat 2018-02-10 18:37:57 +00:00
Robert Osfield
a7839d77cd Added support for PixelBufferObject to Texture2DArray 2018-02-10 17:55:50 +00:00
Robert Osfield
79f9cfae80 From Ravi Mathur, "he freetype plugin currently forces the use of the first font within a truetype collection (.ttc index 0). I made a slight modification such that users can specify any font index via the userOptions input to osgText::readFontFile(). Specifically, the freetype plugin now accepts a new string option of the format "index=< unsigned int >". Example usage:
Code:
// Chooses the second font within the Menlo font collection
osg::ref_ptr<osgDB::Options> fontOptions = new osgDB::Options;
fontOptions->setObjectCacheHint(osgDB::Options::CACHE_OBJECTS);
fontOptions->setOptionString("index=1");
text->setFont(osgText::readFontFile("Menlo.ttc", fontOptions));

"
2018-02-07 18:28:17 +00:00
Robert Osfield
f767ab0cc9 Refactored the event handler so that it contains a helper NodeVistor class rather than inherits from inappropriately using multiple inheritance. 2018-02-07 17:23:14 +00:00
Robert Osfield
55a45e3c0e Changed the text bounding box calcualtion so that it only takes in to account the basic glyph size, and doesn't add in the glyph margin used for accounting for texel sampling 2018-02-06 17:54:33 +00:00
OpenSceneGraph git repository
a1132442ff Merge pull request #466 from openscenegraph/revert-454-imagebinding
Revert "BindingTextureImage: a more complex condition for  _texture->apply ?"
2018-02-02 09:54:48 +00:00
OpenSceneGraph git repository
6d1d1bb000 Revert "BindingTextureImage: a more complex condition for _texture->apply ?" 2018-02-02 09:54:31 +00:00
OpenSceneGraph git repository
db5e803439 Merge pull request #463 from xyzz/android-gl1
getGLExtensionFuncPtr: support gl4es wrapper on Android.
2018-01-30 09:53:45 +00:00
Ilya Zhuravlev
92b45581af getGLExtensionFuncPtr: support gl4es wrapper on Android. 2018-01-29 16:07:13 -05:00
OpenSceneGraph git repository
8046ef5b6b Merge pull request #459 from mp3butcher/bufferstorage
add more extensions
2018-01-27 09:20:12 +00:00
OpenSceneGraph git repository
03977b5619 Merge pull request #461 from filnet/issue_458
os_utils: fix non portable use of "defined"
2018-01-27 09:17:30 +00:00
OpenSceneGraph git repository
28245e252c Merge pull request #457 from PissedCapslock/patch-3
Typo in comment
2018-01-27 09:16:46 +00:00
Philippe Renon
13d88c7fec os_utils: fix non portable use of "defined"
see https://github.com/openscenegraph/OpenSceneGraph/issues/458
2018-01-26 10:33:48 +01:00
Julien Valentin
f4663b0e32 add ARB_BufferStorage extensions 2018-01-25 16:22:33 +01:00
Robin Stevens
3cd5e43fdf Typo in comment 2018-01-24 10:29:49 +01:00
Robert Osfield
753d86d6d8 Merged shader_pipeline version of CMakeLists.txt 2018-01-23 15:27:24 +00:00
Robert Osfield
e49aaa9f2c Removed the OSG_SYSTEM_SUPPORTED cmake var and added use of posix_spawn under Apple with C system function used elsewhere. 2018-01-23 11:43:55 +00:00
OpenSceneGraph git repository
022d1df97d Merge pull request #454 from mp3butcher/imagebinding
BindingTextureImage: a more complex condition for  _texture->apply ?
2018-01-23 10:26:20 +00:00
OpenSceneGraph git repository
3b2b2d762c Merge pull request #456 from PissedCapslock/patch-2
Fixing typos in comments
2018-01-23 09:56:26 +00:00
OpenSceneGraph git repository
afc533283a Merge pull request #455 from PissedCapslock/patch-1
Typo in comment
2018-01-23 09:55:52 +00:00
Robin Stevens
dcbaa3e64a Fixing typos in comments 2018-01-23 10:25:32 +01:00
Robin Stevens
5810d2ba18 Typo in comment 2018-01-23 10:20:49 +01:00
Robert Osfield
b36b5fa8da Changed fallback message to be consistent with fucntion name 2018-01-21 12:19:27 +00:00
Robert Osfield
18d5a9159f Restructured the system() fallback to be usable for C and C++ 2018-01-21 12:09:49 +00:00
Julien Valentin
588a9ae10d use introduced getBufferData to determine _target->apply requirements. 2018-01-21 01:24:01 +01:00
Julien Valentin
0aa8008f0a add a virtual getBufferData to Texture 2018-01-21 01:23:38 +01:00
OpenSceneGraph git repository
9cc2bab737 Merge pull request #452 from LaurensVoerman/submit_input_copyWchar
text copy - get unicode text to clipboard.
2018-01-20 12:35:30 +00:00
OpenSceneGraph git repository
c7f5d13e19 Merge pull request #453 from LaurensVoerman/submit_directinput
fix bug: potentially uninitialized local variable 'hr' used
2018-01-20 12:33:54 +00:00
Laurens Voerman
b0b28d21d9 fix bug: potentially uninitialized local variable 'hr' used 2018-01-19 11:38:01 +01:00
Laurens Voerman
9ef68841c0 text copy - get unicode text to clipboard. 2018-01-19 11:20:34 +01:00
OpenSceneGraph git repository
ee7e7a7019 Merge pull request #447 from LaurensVoerman/submit_remove_unused_vars
remove unused variable "newArrays"
2018-01-15 16:30:44 +00:00
OpenSceneGraph git repository
fb4d14d49f Merge pull request #448 from LaurensVoerman/submit_remove_unused_maxBonePerVertex
remove unused variable "maxBonePerVertex"
2018-01-15 16:30:23 +00:00
OpenSceneGraph git repository
6b9235f185 Merge pull request #449 from LaurensVoerman/submit_toLower
fix vc2017 compile warning 'unsigned int' to 'const char'
2018-01-15 16:28:54 +00:00
Robert Osfield
5ad1a652a0 Moved defined into GLDefines header to avoid compile issues under Windows 2018-01-15 16:02:44 +00:00
Laurens Voerman
33f99e9c70 fix vc2017 compile warning 'unsigned int' to 'const char' 2018-01-15 16:42:31 +01:00
Laurens Voerman
4f7fcb19d5 remove unused variable "newArrays" 2018-01-15 16:04:12 +01:00
Laurens Voerman
df6194de5f remove unused variable "maxBonePerVertex" 2018-01-15 15:59:56 +01:00
OpenSceneGraph git repository
bf6aaed5e0 Merge pull request #445 from mp3butcher/osgSampler3
Osg sampler3  improve example to get command arguments
2018-01-14 13:27:15 +00:00
OpenSceneGraph git repository
1946ff652d Merge pull request #444 from mp3butcher/osgSampler2
Osg sampler2  add static helper func in order to generate Samplers of a Samplerless StateSet
2018-01-14 13:25:23 +00:00
OpenSceneGraph git repository
a6a72755b8 Merge pull request #443 from mp3butcher/osgSampler1
Add MinLOD MaxLOD and LODBias to Texture
2018-01-14 12:40:34 +00:00
Julien Valentin
480b452e38 improve example to get command arguments 2018-01-13 21:29:02 +01:00
Julien Valentin
4c0a861f91 add static helper func in order to generate Samplers of a Samplerless StateSet
+fix ident
2018-01-13 21:25:47 +01:00
Julien Valentin
8894939577 add MinLOD MaxLOD and LODBias to Texture and its serializer
as well as ShadowTextureMode None enum
2018-01-13 21:20:32 +01:00
Julien Valentin
020bff3ab1 increment SO version 2018-01-13 21:19:25 +01:00
Julien Valentin
d2b8468bf4 add MinLOD MaxLOD and LODBias to Texture 2018-01-13 21:16:16 +01:00
Robert Osfield
3e6d118d10 Disabled the use of the GeometryFinishedObjectReadCallback in the Geometry serializer as this doesn't look it's needed anymore. 2018-01-13 16:43:42 +00:00
OpenSceneGraph git repository
561b49fb78 Merge pull request #442 from eligovision/OpenSceneGraph_viewer
osgViewer::ViewerBase setThreadingModel function fixed
2018-01-13 16:07:56 +00:00
Konstantin S. Matveyev
bb84f1ea3c osgViewer::ViewerBase setThreadingModel func fix: should not start threading, must only restart 2018-01-13 15:49:39 +03:00
Robert Osfield
ae57f3cd46 Added ability to toggle on/off use of C system() function call, using OSG_SYSTEM_SUPPORTED Cmake option 2018-01-12 19:52:31 +00:00
Robert Osfield
6a3d9b2aa2 Added os_utils header 2018-01-12 17:03:31 +00:00
Robert Osfield
a7cc9664c0 Renamed EnvVar header to os_utils in prep for adding more OS related calls to it 2018-01-12 16:48:17 +00:00
OpenSceneGraph git repository
bfbae8ad12 Merge pull request #437 from filnet/text_typo
osgText: fix typos related to SIGNED_DISTANCE_FIELD
2018-01-11 14:32:53 +00:00
Robert Osfield
e84c93dfce Fixed Linux NVTT build issue by restricting the addition of the new libs to just Windows 2018-01-11 10:10:43 +00:00
Robert Osfield
7d311915e7 Merged NVTT cmake fixes from 3.4 branch 2018-01-11 09:39:27 +00:00
Robert Osfield
0cee5f5d27 Added returns to avoid fall through between case statements 2018-01-11 08:51:08 +00:00
Robert Osfield
6bd2d9054e Moved setFusionDistance() into View::updateSceneView() 2018-01-10 16:55:02 +00:00
Philippe Renon
3e12972a03 osgText: fix typos related to SIGNED_DISTANCE_FIELD 2018-01-10 14:21:25 +01:00
Andreas Ekstrand
0eacd8161a Small fix in the osgjs plugin. Since osgjs uses pixel area for PIXEL_SIZE_ON_SCREEN PagedLOD ranges instead of a diameter, it's a more correct approximation to square the ranges in this case. 2018-01-10 11:07:46 +00:00
Robert Osfield
df280811a1 Merged Program.cpp from shader_pipeline 2018-01-08 10:52:35 +00:00
Robert Osfield
0fafb385f9 Fixed indentation 2018-01-08 10:31:47 +00:00
Robert Osfield
f866836d60 Added extension support checks 2018-01-08 10:14:13 +00:00
Robert Osfield
818dee31d8 Fixed build with GLES2 2018-01-08 10:04:28 +00:00
Robert Osfield
b45803898d Added suppor for StateSet::DefineList 2018-01-06 14:59:16 +00:00
Robert Osfield
9944d949fc Improvements to lua/OSG integration 2018-01-06 14:57:39 +00:00
Robert Osfield
2108141b4e Replaced old style access of ValueObject values to new ValueObject::getScaleValue() methods 2018-01-06 13:47:18 +00:00
Robert Osfield
bdff0955dc Added TextureCubeMap::setImage/getImage() methpds 2018-01-06 13:11:36 +00:00
Robert Osfield
3e676f67ff Removed inappropriate // 2018-01-06 13:09:16 +00:00
Robert Osfield
230ee49428 Added ValueObject::get/setScaleValue(..) convinient methods 2018-01-06 12:54:14 +00:00
OpenSceneGraph git repository
6a3c88fb5b Merge pull request #431 from mp3butcher/callbacks
allow read of script from zip
2018-01-06 12:37:02 +00:00
OpenSceneGraph git repository
4d4b02848b Had to fix spacing and bracket position yet again... 2018-01-06 12:31:23 +00:00
Julien Valentin
518048bc64 allow read of zipped script 2018-01-05 19:57:41 +01:00
Robert Osfield
4abc97f44b Fixed return values 2018-01-05 12:12:24 +00:00
OpenSceneGraph git repository
741db16916 Merge pull request #428 from mp3butcher/serializerfixbis
add Node associate on Drawable serializers
2018-01-05 11:26:06 +00:00
Robert Osfield
647fc75add Disabled OSX builds as they are consistently failing on travis due to timeouts so a giving false positives for all builds 2018-01-05 10:36:25 +00:00
OpenSceneGraph git repository
eca7831281 Merge pull request #424 from mp3butcher/osgSampler
GL3.3 SamplerObject as StateAttribute
2018-01-05 09:43:16 +00:00
OpenSceneGraph git repository
f5108459be Fixed indentation and spacing issues 2018-01-05 09:41:32 +00:00
OpenSceneGraph git repository
6ef90054bc Merge pull request #425 from mp3butcher/callbacks
Support for multiple nest Camera DrawCallbacks
2018-01-05 09:18:39 +00:00
Julien Valentin
e33a407aaf add BufferData associate to Image and subclasses 2018-01-04 22:50:30 +01:00
OpenSceneGraph git repository
73689caa5f Had to fix positioning of { and spacing to be consistent with the rest of the OSG 2018-01-04 15:28:45 +00:00
OpenSceneGraph git repository
70488271bd Merge pull request #426 from mp3butcher/moreExtensions
add more Extensions
2018-01-04 15:20:57 +00:00
Julien Valentin
196256fdcd Evolve DSO
add Node associate on Drawable based:
Drawable
Geometry
DrawPixels.cpp
ShapeDrawable.cpp
RigGeometry.cpp
ConnectedParticleSystem.cpp
FadeText.cpp
Text.cpp
Text3D.cpp
TextBase.cpp
2018-01-04 05:15:13 +01:00
Julien Valentin
0e76dc169e add more Extensions 2018-01-04 04:18:38 +01:00
Julien Valentin
61548dc5a8 add recursivity on Camera Callbacks 2018-01-04 03:59:25 +01:00
Julien Valentin
662bea239c add GLSampler as Texture Property
and a simple example mixing (add) 2 textures
2018-01-03 21:34:10 +01:00
OpenSceneGraph git repository
6492ec8c6b Merge pull request #421 from mp3butcher/imagebinding
complete Imagebinding integration
2018-01-03 11:11:16 +00:00
Julien Valentin
c605b24432 remove old BindImageTexture path 2018-01-02 18:29:42 +01:00
Julien Valentin
f9b1c614bc adapt examples for new BindImageTexture 2018-01-02 18:15:25 +01:00
Julien Valentin
8a84ee7660 add (untested) BindImageTexture serializer
TOREVIEW : my GLBoolean serializer macro seams hacky
2018-01-02 18:12:52 +01:00
OpenSceneGraph git repository
b4c62bd32b Merge pull request #415 from aluaces/fix/opencascade_minimal
Use a minimal set of OpenCASCADE libraries.
2018-01-01 12:07:17 +00:00
Robert Osfield
eb72f3ed30 Renamed ImageTexture file to BindImageTexture to better fit it's OpenGL implementaton.
Improved the indentation so it's more consistent with the rest of the OSG.
2018-01-01 11:10:55 +00:00
Robert Osfield
1f4ae0425c Merge branch 'imagebinding' of https://github.com/mp3butcher/OpenSceneGraph into mp3butcher-imagebinding 2018-01-01 10:16:10 +00:00
OpenSceneGraph git repository
f0bb9da9c6 Changed the enum value to be consistent with StateAttribute 2018-01-01 10:14:58 +00:00
OpenSceneGraph git repository
e27148240a Change enum name to be consistent with assciated class name 2018-01-01 10:13:14 +00:00
OpenSceneGraph git repository
9d4ee0d766 Improved spacing and indentaton
To keep things consistent with the rest of the OSG
2018-01-01 10:12:09 +00:00
Robert Osfield
7a351d3407 Changed the case of method name to be consistent with the rest of the OSG 2017-12-31 13:44:21 +00:00
OpenSceneGraph git repository
ce4d76ef21 Merge pull request #411 from rickyviking/fbxGeometrySupport
Fbx writer: added support to convert geometries directly attached as node
2017-12-31 13:43:09 +00:00
OpenSceneGraph git repository
407402df14 Merge pull request #414 from aluaces/fix/osg_winver_switch
Added optional checking the windows version at build configuration time to fix cross-compilation.
2017-12-31 13:34:26 +00:00
OpenSceneGraph git repository
91aec8107a Improved indentation 2017-12-31 13:32:44 +00:00
Robert Osfield
dd1f95d24d Fixed typo 2017-12-31 13:17:23 +00:00
Robert Osfield
94a1a84a59 Fixed handling of reassignment of ArrayDispatch when vertex aliasing is toggled 2017-12-31 12:38:17 +00:00
mp3butcher
2f8a262a0e add flexier Image Unit Binding implementation (allow different IUBs for a Texture) 2017-12-28 19:04:32 +01:00
Alberto Luaces
958e954b93 Use a minimal set of OpenCASCADE libraries.
This eases the configuration avoiding to look for unused or nonexistent
libraries.
2017-12-26 15:45:03 +01:00
Alberto Luaces
08e1a06fcd Detecting the windows version at build time breaks cross-compilation.
I have made this auto-detection optional (default ON).
2017-12-26 15:35:42 +01:00
Riccardo Corsi
ef8891351f Fbx writer: added support to convert geometries directly attached as node, without geodes. 2017-12-20 09:52:50 +01:00
Robert Osfield
5afd32b2d9 Introduced dedicated VertexArrayStateList class to wrap up the VertexArrayState container with convinience methods to help initialize them.
Using the new VertexArrayStateList class fixed bug associated with setting new setTexCoord() array when a VertexArrayState is already assigned.
2017-12-19 09:57:57 +00:00
Robert Osfield
d2bfde30f0 Deprecated dirtyDisplayLists(), use established dirtyGLObjects() instead 2017-12-18 13:54:08 +00:00
OpenSceneGraph git repository
3bb327e93f Merge pull request #408 from eligovision/OpenSceneGraph_serializers
Open scene graph serializers
2017-12-18 10:45:00 +00:00
OpenSceneGraph git repository
24813331c6 Merge pull request #409 from jcarpent/master
[Fix] Use explicitelly colladom 1.4.1
2017-12-18 10:39:29 +00:00
OpenSceneGraph git repository
dd1c0edd4b Merge pull request #406 from eligovision/OpenSceneGraph_text
TextBase: left alignment position fix
2017-12-18 10:33:35 +00:00
jcarpent
1d46178d72 [Fix] Use explicitelly colladom 1.4.1 2017-12-14 19:27:08 +01:00
Konstantin S. Matveyev
df8dc83fc7 osgAnimation serializes: static linking fix 2017-12-13 11:48:55 +03:00
Konstantin S. Matveyev
23ed49b330 Merge remote-tracking branch 'upstream/master' into OpenSceneGraph_serializers 2017-12-13 11:48:08 +03:00
Konstantin S. Matveyev
2d3ed2a3c7 TextBase: left alignment position fix 2017-12-12 12:08:50 +03:00
Robert Osfield
7e0163383f Quitened down debug output 2017-12-09 19:18:43 +00:00
Robert Osfield
854beb39ce Quited now deboug output 2017-12-09 18:42:40 +00:00
Robert Osfield
588cad24e2 Quietened down debug messages 2017-12-09 18:29:19 +00:00
Robert Osfield
9bf3d2b7ce Pushed background image away from eye point a small amount to prevent z fighting with text on the image plane. 2017-12-09 11:12:35 +00:00
Robert Osfield
90748f8b74 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-12-08 16:15:52 +00:00
Robert Osfield
6ef0e667d2 Added support for OSG_BORDERLESS_WINDOW="x y width heigh" and --bordless-window x y width height to make it easier to manage custom placement of viewers without window decoration 2017-12-08 16:10:57 +00:00
OpenSceneGraph git repository
5de9c97ff5 Merge pull request #403 from mp3butcher/VAS
fix logo reader plugin
2017-12-08 11:19:20 +00:00
Julien Valentin
53d8032656 fix logo reader plugin
TODO upgrade to a more modern gl (remove glDrawpixel usage)
2017-12-07 20:13:57 +01:00
Robert Osfield
25f5605ad8 Improvements to dot visitors 2017-12-07 17:52:24 +00:00
OpenSceneGraph git repository
b8fd3abdd5 Merge pull request #402 from mp3butcher/VAS
add a fix in order setArray  work with an user managed interleaved array
2017-12-07 09:49:47 +00:00
Julien Valentin
7f2481e976 add a fix in order setArray work with an user managed interleaved array 2017-12-06 23:17:02 +01:00
Robert Osfield
37dbb04608 Added more flexibility into the State::checkGLErrors() method, allowing calling code to pass in two strings.
Improved the StateSet::compileGLObjects() usage of checkGLErrors() to make the warning reports more meaningful.
2017-12-06 10:11:53 +00:00
Robert Osfield
d313184cd0 Added fine grained checking for GL errors in the GLObjectVisitor so that the OSG's default pre compile stage provides better feesback on any GL errors. 2017-12-06 09:51:57 +00:00
Robert Osfield
d82a7e7c0b Removed the unncessary rescale to power of two, and added clear of image to prevent previous image data corrupting the rendered image 2017-12-05 17:16:17 +00:00
Robert Osfield
4501320793 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-12-05 16:33:55 +00:00
Robert Osfield
a8924a7b36 Added "rs=value" Options support to SVG plugin 2017-12-05 16:33:01 +00:00
Robert Osfield
551e9ba17c Fixed AUTHORS 2017-12-04 17:51:21 +00:00
Robert Osfield
7f0baaab61 Added passing of the osgDB::Options to the remove from cache to make sure the cache model for the presentation is found and removed. 2017-12-04 16:43:08 +00:00
Robert Osfield
56681c89cd Changed the reload presentaiton key to 'R' to better match the 'E' for editor 2017-12-04 14:50:12 +00:00
Anna Sokol
279df6d57e From Anna Sokol, "There is no need to specify WINVER of 0x0603 in order to check for the SetProcessDPIAwareness function existence.
If your current OS where the application is running is Windows 8.1 or above it the function will exist in the dll or if its below it wont.
I checked the attached code with both a Windows 7 desktop (where the function doesn't exist) and a Windows 10 tablet (where it does and had my screen scaled to 150%) and in both cases the code worked as intended."
2017-12-04 13:01:52 +00:00
Robert Osfield
1810c9e7e3 Updated ChangeLog and AUTHORS file 2017-12-03 14:27:10 +00:00
Robert Osfield
aa26f99367 Updated ChangeLog 2017-12-03 14:14:34 +00:00
Robert Osfield
9ef79c2f44 Renamed chanels to array to be consistent with the rest of the usage 2017-12-03 11:17:34 +00:00
OpenSceneGraph git repository
92cccff866 Merge pull request #398 from marchelbling/sharedarrayoptimizer-fix
Improve SharedArrayOptimizer
2017-12-03 11:12:20 +00:00
Robert Osfield
200537ed6f Removed redundent !ps 2017-12-03 10:49:39 +00:00
Robert Osfield
5ff16798a3 Removed unused local variable and associated typedef 2017-12-03 09:49:09 +00:00
Robert Osfield
9a96e211f9 Quietened down cppcheck false positive. 2017-12-03 09:45:37 +00:00
Robert Osfield
3870edf376 Fixed leak and clean up formatting. 2017-12-03 09:38:32 +00:00
Robert Osfield
ef5410aaf0 From Jordi Torres, fixed leak and inappropriate read bug 2017-12-03 09:34:43 +00:00
Robert Osfield
6ca3cab0d5 From Jordi Torres, removed unused local variable 2017-12-03 09:32:50 +00:00
Robert Osfield
24d32e89a1 From Jordi Torres, fix indentation and removed redundent break; 2017-12-03 09:30:35 +00:00
Robert Osfield
bd716b38c7 From Jordi Torres, added ref_ptr<> usage to quieten cppcheck false positive 2017-12-03 09:27:41 +00:00
Robert Osfield
24c3b40b56 From Jordi Torres, removed unused local variables 2017-12-02 18:07:13 +00:00
Robert Osfield
c913c0e6f7 From Jordi Torres, removed unused local variables 2017-12-02 18:04:43 +00:00
Robert Osfield
d7f5357059 From Jordi Torres, Removed unused local variables 2017-12-02 18:00:03 +00:00
Robert Osfield
4fc3c8ef26 From Jordi Torres, removed unused local variables 2017-12-02 17:58:17 +00:00
Robert Osfield
c85e56940e From Jordi Torres, removed unused local variables 2017-12-02 17:52:47 +00:00
Robert Osfield
847e472130 Commented out unused local variables 2017-12-02 17:42:53 +00:00
Robert Osfield
e44fb08f6a From Jordi Torres, removed unused local variable 2017-12-02 17:41:27 +00:00
Robert Osfield
490b9b0e0e Fixed string parsing and substituion bugs isn substitudeEnvVars(..) 2017-12-02 17:35:36 +00:00
Robert Osfield
302f625ec7 From Jordi Torres, removed unused local variables 2017-12-02 17:08:14 +00:00
Jordi Torres
82f0a2d849 same values in || so one of them not needed 2017-12-02 16:49:47 +00:00
Robert Osfield
da68d32482 Improved readaibility of text by removing redundent indirection. 2017-12-02 16:35:16 +00:00
Robert Osfield
59f841bc20 Fixes for cppcheck reported issues 2017-12-02 16:20:34 +00:00
Marc Helbling
75af025c55 Improve SharedArrayOptimizer
When an array is shared within and outside a geometry, it's still worth it and safe
to recreate the reference within each individual geometry.
2017-12-01 12:26:02 +01:00
OpenSceneGraph git repository
2366305e83 Merge pull request #396 from bjornblissing/feature/DPIAwareScaling
Applications declared as DPI-aware in the Windows environment
2017-11-30 14:13:21 +00:00
OpenSceneGraph git repository
b909ac2d95 Added return to last line 2017-11-30 14:12:05 +00:00
Robert Osfield
05b0f142c8 Quieted down dubug output 2017-11-30 12:48:47 +00:00
Björn Blissing
9fac39c5e0 Applications declared DPI-aware in the Windows environment
Applications that run on a Windows computer with desktop scaling enabled
gets scaled incorrectly since windows assumes that applications are
DPI-unaware unless declared otherwise.

This change declares the application DPI-aware, thus not automatically
scaled by the operating system.

The corresponding library call requires Windows 8.1 or later.
2017-11-30 13:00:54 +01:00
Björn Blissing
09eefd7973 Added script to identify Windows version
Added script to identify the Windows version used to compile the source.
Currently the windows version for Windows NT is hard coded into the
source. By running this CMake script the _WIN32_WINNT preprocessor
variable gets set to the corresponding windows version.
2017-11-30 12:53:24 +01:00
Björn Blissing
e8f7eeb5dc Removed unnecessary define in FileUtils
The define of _WIN32_WINNT was added to handle an error case from MinGW
,as described in commit 712ca43219

This was later giving warnings and thus undefined for MinGW by commit
3bf6fb1778

Since the two operations cancel each other out, they should be removed.
2017-11-30 12:50:09 +01:00
Robert Osfield
a16702627a Typo fix 2017-11-29 21:20:10 +00:00
Robert Osfield
4af66f6897 Update version to 3.5.10 2017-11-29 15:06:53 +00:00
Robert Osfield
85a79f53d7 Updated ChangeLog and AUTHORS for 3.5.9 dev release 2017-11-29 14:49:00 +00:00
Robert Osfield
d3815759a9 Fixed build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2017-11-29 14:44:00 +00:00
Robert Osfield
a6069c3226 Introduced Drawable::CreateVertexArrayStateCallback to enable customization of how VertexArrayState objects.
Added public accessors to the Drawable::VertexArrayStateList.
2017-11-29 14:22:31 +00:00
Robert Osfield
03434b20cf Added mapping of GLSL file extension to shader Type. 2017-11-29 12:22:03 +00:00
Robert Osfield
306275d230 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-11-29 10:40:42 +00:00
Robert Osfield
28af946c4b Bummped the SO version 2017-11-29 10:40:20 +00:00
OpenSceneGraph git repository
27e5041d97 Merge pull request #394 from mathieu/master
Make the culling be disabled at the drawable level
2017-11-29 10:38:52 +00:00
Robert Osfield
0c7972b3f1 Merge branch 'mp3butcher-ComputeDispatch' 2017-11-29 10:14:16 +00:00
Robert Osfield
c0a276e850 Added back in serializer support for comput dispatch groups to retain backwards compatibility. 2017-11-29 10:11:35 +00:00
Mathieu
cf05cd5bf3 Make the culling be disables at the drawable level not at the geode level 2017-11-29 11:05:53 +01:00
Robert Osfield
9f6eb74d28 Merge branch 'ComputeDispatch' of https://github.com/mp3butcher/OpenSceneGraph into mp3butcher-ComputeDispatch 2017-11-29 09:30:56 +00:00
OpenSceneGraph git repository
cd0744ddfa Cleaned up code layout 2017-11-29 08:16:53 +00:00
OpenSceneGraph git repository
021dca0072 Cleaned up code layout 2017-11-29 08:14:44 +00:00
OpenSceneGraph git repository
fc1d19b6e5 Merge pull request #390 from filnet/readref
replace more read*File() usage to readRef*File()
2017-11-29 08:09:01 +00:00
Julien Valentin
739303b3d9 override compile and createVAS in order to do nothing 2017-11-28 20:38:54 +01:00
Julien Valentin
994c38c0c7 adapt SSBO example for ComputeDispatch
but have strange runtime errors:
0(100) : error C7623: implicit narrowing of type from "vec3" to "float"
0(108) : error C7623: implicit narrowing of type from "vec3" to "float"
2017-11-28 20:03:40 +01:00
Philippe Renon
2acddf66b1 replace more read*File() usage to readRef*File() 2017-11-28 19:51:31 +01:00
Robert Osfield
1152da8bbd Quietened down debug output 2017-11-28 18:08:08 +00:00
Robert Osfield
85917ea4d4 Quietened down debug output 2017-11-28 18:05:59 +00:00
Robert Osfield
5ad22dc4af Quitened down debug output 2017-11-28 18:04:26 +00:00
Julien Valentin
195df4f811 numgroup removed but introduce a reto compatibility bug in Program serializer
hope nobody use it
2017-11-28 17:39:32 +01:00
Julien Valentin
bf1b4ec2bb add ComputeDispatch class
revoke glDispatch in PCProgram::useProgram
update example
2017-11-28 17:30:04 +01:00
Robert Osfield
117045170d To the GLSL shader plugin added support forL
#pragma include shaderfile.glsl

To enable easier reuse of shaders
2017-11-28 15:31:39 +00:00
Robert Osfield
284f91b3e0 Replaced deprecated osg::Shader::reaDShaderFile()/loadShaderFromSource() usage 2017-11-27 18:38:37 +00:00
Robert Osfield
5f13a3aa11 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-11-27 18:36:41 +00:00
Robert Osfield
34336931fa Deprecated the osg::Shader::reaDShaderFile() and osg::Shader::loadShaderSourceFromFile() methods.
Programmers should use osgDB::readRefShaderFile()/readShaderFile() instead.
2017-11-27 18:28:15 +00:00
Robert Osfield
f81a46da5b Added support for .cs, .compute, .tctrlm .teval extensions in the GLSL plugin 2017-11-27 18:27:13 +00:00
OpenSceneGraph git repository
6abb9b27f9 Merge pull request #387 from jtorresfabra/remove_custom_code
Removes custom code added for sketchfab channel compression that shou…
2017-11-27 15:54:39 +00:00
Robert Osfield
bc4a9d9dd0 Refactored the MergeGeometry::mergeGroup(..) method to avoid O(N^2) issue with using removeChildren() on groups with very large numbers of children. 2017-11-27 15:44:11 +00:00
Robert Osfield
06302a1082 Replaced read*File() usage to readRef*File() 2017-11-27 15:41:54 +00:00
Robert Osfield
cb2c48d015 Added template addShader() method to make it easier to pass ref_ptr<osg::Shader> 2017-11-27 15:40:21 +00:00
Jordi
66eeabd7d0 Removes custom code added for sketchfab channel compression that should not be there 2017-11-27 15:48:50 +01:00
Robert Osfield
9fc63d7613 Fixes for building with OSG_PROVIDE_READFILE to OFF 2017-11-27 11:10:48 +00:00
Robert Osfield
a72a929d12 Fixed build issues when compiling with OSG_PROVIDE_READFILE to OFF 2017-11-27 11:05:31 +00:00
Robert Osfield
93a5213b99 Build fix 2017-11-27 10:32:02 +00:00
Robert Osfield
80d1de7832 Removed use of local static to avoid threading issue. 2017-11-22 11:05:17 +00:00
OpenSceneGraph git repository
a5eb5c7bb0 Merge pull request #383 from anormann1974/patch-1
Fixed missing initialization of B_ and N_ in constructor
2017-11-21 14:01:14 +00:00
Robert Osfield
13c593ce0e Fixed typo 2017-11-21 13:59:51 +00:00
Robert Osfield
7f97b9f999 Added Text::getCharacterCorners(...) method to help applications that want to find out the positions of characters being rendered. 2017-11-21 13:41:57 +00:00
Andre Normann
e0eb4fbda8 Fixed missing initialization of B_ and N_ in constructor 2017-11-21 13:54:45 +01:00
Robert Osfield
d60b9714fe Moved the version to 3.5.9 and the version setting code to top of CMake file 2017-11-20 12:49:20 +00:00
Robert Osfield
c95a5486b1 Updated ChangeLog and AUTHORS file for 3.5.8 dev release 2017-11-14 15:04:05 +00:00
Raymond de Vries
41dda781ee attached fixes for configuring and building the osgPlugin exr with Visual Studio and using out-of-the-box builds of ilmbase and openexr, i.e. without manual/extra config for using these 2 libs with the OSG.
Previously, the assumption was made that ilmbase and openexr were installed in a common directory and hence the header files and libs were both found in that common directory. That is not consistent with other libs and this submission makes it consistent and therefore the OSG configures out of the box. I made this work for ilmbase-2.1.0.tar.gz / openexr-2.1.0.tar.gz and ilmbase-2.2.0.tar.gz / openexr-2.2.0.tar.gz
2017-11-14 10:59:08 +00:00
Robert Osfield
49a5fdbd1f Fixed typo 2017-11-13 13:08:39 +00:00
Robert Osfield
9c605ba9be Fixed CoverityScan reported errors 2017-11-13 13:06:12 +00:00
Robert Osfield
d98d9c9e72 FIxed two CoverityScan detected memory leaks 2017-11-13 12:49:33 +00:00
Andre Normann
a811de2ba7 Attached is a fix in GLExtension, which is based on latest git version, that fixes the usage of uniform buffer objects on macOS. Under macOS core OpenGL features aren't exported as extension. OpenGL 3.1 includes the GL_ARB_uniform_buffer_object as core feature for example. On macOS a simple osg::isGLExtensionSupported() call would fail. It is required to use the isGLExtensionOrVersionSupported() method. This is what my fix does. 2017-11-13 10:24:31 +00:00
Robert Osfield
cba8559137 Updated SO version to 152 to reflect the resent API changes to osgAnimation. 2017-11-11 14:50:55 +00:00
OpenSceneGraph git repository
8d36049dcd Merge pull request #382 from openscenegraph/osganimation
Osganimation improvements
2017-11-11 14:43:10 +00:00
OpenSceneGraph git repository
8d5a9e84fc Build fix 2017-11-11 13:27:43 +00:00
OpenSceneGraph git repository
729680714c Readbility improvements and updating version to 152 2017-11-11 13:08:42 +00:00
OpenSceneGraph git repository
3567e31009 Added versioning to the new serialization additions 2017-11-11 13:04:34 +00:00
OpenSceneGraph git repository
8694fd61ba Code readability improvements 2017-11-11 13:00:56 +00:00
OpenSceneGraph git repository
4977939c05 Code readability improvements 2017-11-11 12:58:52 +00:00
OpenSceneGraph git repository
8e55ed5923 Code readability improvements 2017-11-11 12:54:28 +00:00
OpenSceneGraph git repository
f59efe0bfe Code readability improvement 2017-11-11 12:46:48 +00:00
OpenSceneGraph git repository
a5f6e4b0c4 Small readability improvements 2017-11-11 12:45:55 +00:00
OpenSceneGraph git repository
8ee8550aac Fix of incorrect Program assignment bug and coding style 2017-11-11 12:42:34 +00:00
OpenSceneGraph git repository
b23cc72037 coding style/readability fixes 2017-11-11 12:33:44 +00:00
OpenSceneGraph git repository
ca5ce00783 coding style/readability fixes 2017-11-11 12:29:45 +00:00
OpenSceneGraph git repository
252c28d516 coding style/readability fixes 2017-11-11 12:27:56 +00:00
OpenSceneGraph git repository
4753b8b2b9 coding style fix 2017-11-11 12:24:27 +00:00
Robert Osfield
ee118c872f Restructed the ref counting of the rawImageRec structure so that it's done with a separate refImageRec struct so it doesn't interfer with the writing of the rawImageRec as a header when writing to .rgb 2017-11-11 11:17:34 +00:00
Andreas Ekstrand
eb061d9acc I have implemented readObject to make loading objects from SceneLoader in the LWS plugin work. I'm not sure about other implications from changes leading up to this problem (readRefFile instead of readNodeFile in SceneLoader) but this fix works for me. 2017-11-11 10:19:09 +00:00
Robert Osfield
dfec052eb9 Fixed handling of GL_TEXTURE_CUBE_MAP when using glTextureStorage. 2017-11-10 17:12:20 +00:00
OpenSceneGraph git repository
054727cb00 Merge pull request #381 from openscenegraph/revert-379-osganimbugfix
Revert "    following guidance from OpenGL Common Mistakes:"
2017-11-10 17:00:52 +00:00
OpenSceneGraph git repository
821ca4e5cd Revert " following guidance from OpenGL Common Mistakes:" 2017-11-10 16:58:29 +00:00
OpenSceneGraph git repository
9b6fa79e32 Merge pull request #379 from mp3butcher/osganimbugfix
Fixed handling of mipmaps
2017-11-10 14:49:54 +00:00
OpenSceneGraph git repository
860df3e10e Merge pull request #380 from mp3butcher/MDI7
add funcs to read GZ Objects from a stream
2017-11-10 13:36:52 +00:00
Robert Osfield
826c139ef3 Fixed crash in copy constructor due to copy and paste/typo. 2017-11-10 12:41:21 +00:00
Julien Valentin
79afe82774 replace string with stringstream (avoid a string copy at read) 2017-11-08 16:44:09 +01:00
Julien Valentin
baf6945a7a add funcs to read Object from a GZ stream 2017-11-08 15:40:11 +01:00
Robert Osfield
74226e5904 Added Pawel's origin commit message into the osggpucull source as it examples a lot about how the example works 2017-11-06 20:49:23 +00:00
Robert Osfield
01c68ba5e5 Temporary workaround for the regression of intersection tests with osgText::Text. Added a local vertex array that is transformed by the last applied text matrix. 2017-11-06 19:53:38 +00:00
Julien Valentin
f7f76a1029 following guidance from OpenGL Common Mistakes:
mipmaps should be upload with glTexImage2D and not glTexSubImage2D
2017-11-06 16:22:03 +01:00
Robert Osfield
24f8a01f17 Added check for malloc returning a valid pointer 2017-11-03 09:55:42 +00:00
Robert Osfield
6d65768dab Added an explict null termination of buffer to address Coverity Scan reported issue 2017-11-03 09:49:50 +00:00
Robert Osfield
7dd0320236 Added check for a valud positions pointer 2017-11-02 18:43:05 +00:00
Robert Osfield
6f924f84ba Fuxed missing initializers 2017-11-02 18:39:11 +00:00
Robert Osfield
a07105d6c5 Changed the key binding for opening and editor to edit presentation to 'E' and to trigger update the presentation by pressing 'e' 2017-11-02 16:39:32 +00:00
Robert Osfield
281aae8eea Fixed copy and paste error 2017-11-02 11:51:03 +00:00
Robert Osfield
1bf2db24f2 Moved memset to after check for null memory pointer 2017-11-02 11:48:39 +00:00
Robert Osfield
9dc6c454f4 Cleaned up getEnvVar usage 2017-11-02 11:42:25 +00:00
Robert Osfield
ce69f18ec7 Replaced getenv usage with safer osg::getEnvVar 2017-11-02 10:43:41 +00:00
Robert Osfield
aa744edacc Fixed warning 2017-11-02 10:02:34 +00:00
Robert Osfield
239b0faa4c Replaced getenv calls with safer osg::getEnvVar usage 2017-11-02 10:00:28 +00:00
Robert Osfield
338b0e2b7b Moved getenv usage across to safer osg::getEnvVar() usage 2017-11-01 17:38:33 +00:00
Robert Osfield
0e7e06349e Added safety check for getenv parsing to prevent overflow attacks via getenv. 2017-11-01 16:43:32 +00:00
Robert Osfield
3b85aa35df Moved from getenv to osg::getEnvVar usage 2017-11-01 14:45:27 +00:00
Robert Osfield
e59ad87044 Made template function inline to avoid multiple declaration issues 2017-11-01 14:16:54 +00:00
Robert Osfield
fbb7270e55 Replaced getenv(..) usage with osg::getEnvVar(..) 2017-11-01 13:54:15 +00:00
Robert Osfield
51a9c66856 Added OSG_ENVVAR_SUPPORTED cmake control and bool osg::getEnvVar(const char* name, T& value, ...) conviniece funcions to make it easier to implement optinal getenv reading code. 2017-11-01 13:32:47 +00:00
Robert Osfield
fb175eed14 Fixed Coverity Scane reported issue. 2017-11-01 11:35:05 +00:00
OpenSceneGraph git repository
cca35390ad Merge pull request #378 from mp3butcher/osganimation
update osganimationhardware example to use a common program
2017-10-31 17:59:13 +00:00
Robert Osfield
c242ad4497 Fixed unititialized memory variables and improved readability by adding spacing where appropriate 2017-10-31 17:55:59 +00:00
Robert Osfield
6a2bd1f898 Added missing initializers 2017-10-31 17:43:39 +00:00
Robert Osfield
14f50ab31c Fixed CovertiScan reported uninitialized member variable 2017-10-31 17:39:34 +00:00
Robert Osfield
061e52b89f Fixed Coverity Scan reported issue 2017-10-31 17:02:31 +00:00
Julien Valentin
47c4ef510d update example to use a common program 2017-10-31 18:00:06 +01:00
Robert Osfield
95eb5e2ad6 Replace c char array with std::string to address Coverity scan reported issue 2017-10-31 16:46:42 +00:00
Robert Osfield
3459e8f4fd Fixed Coverity Scan reported memory leaks 2017-10-31 15:55:24 +00:00
Robert Osfield
42c7d7ece1 Fixed Coverity reported memory leak 2017-10-31 15:47:49 +00:00
Robert Osfield
6a8fe45543 Reinstated two stage OSX build, and disabled part of the coverity_scan build to attempt to get it running without timeout. 2017-10-31 14:55:41 +00:00
Robert Osfield
89708ae277 Upped the number of threads used in build to try and improve build speed 2017-10-31 12:32:45 +00:00
Robert Osfield
17380a7191 Simplified build for OSX now that trais builds are running faster. 2017-10-31 10:01:52 +00:00
Robert Osfield
7e86438871 Merge branch 'master' into osganimation 2017-10-30 15:53:56 +00:00
Robert Osfield
e196b23723 From Raymond de Vires, added support for 2018 and 2016 versions of FBX. 2017-10-30 14:38:35 +00:00
Robert Osfield
4f2328bc09 From Raymond de Vires, added support for 2018 and 2016 versions of FBX. 2017-10-30 14:36:41 +00:00
Robert Osfield
bd3262e07f From Raymond de Vires, Windows build fix 2017-10-30 14:22:10 +00:00
Robert Osfield
45f1f23064 Updated ChangeLog and AUTHORS 2017-10-30 14:05:45 +00:00
Robert Osfield
45e520663d Quitened down the DisplaySettings::setShaderHint() output for NONE. 2017-10-30 13:40:50 +00:00
Robert Osfield
053ba83be6 Merged support for StateSet::DefineList from shader_pipeline branch 2017-10-30 09:32:04 +00:00
OpenSceneGraph git repository
af3a0bd7d1 Merge pull request #375 from mp3butcher/osganimation
reformat AStyle (with codeblocks)
2017-10-30 08:37:19 +00:00
Julien Valentin
6e79ce348d reformat with the help of AStyle reformat tool (codeblocks) 2017-10-28 14:46:14 +02:00
Robert Osfield
6530b16fc7 Fixed build error when building wiht OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF 2017-10-27 18:14:04 +01:00
OpenSceneGraph git repository
d664c09a79 Merge pull request #374 from mp3butcher/osganimation
fix InfluenceMap "remove useless bones" method
2017-10-27 17:15:38 +01:00
OpenSceneGraph git repository
faa254dd61 Merge branch 'osganimation' into osganimation 2017-10-27 17:14:43 +01:00
Robert Osfield
671847387f Fixed build errors when compiling with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2017-10-27 14:19:13 +01:00
Julien Valentin
c61e4fb15c fix InfluenceMap "remove useless bones" method 2017-10-27 15:10:54 +02:00
Robert Osfield
2b6ffad99a Build fix for when compiling with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2017-10-27 13:51:08 +01:00
Robert Osfield
b3515d0e09 Build fix for when compiling with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2017-10-27 13:48:52 +01:00
Robert Osfield
1f913ec130 Fixed warning 2017-10-27 13:19:52 +01:00
Robert Osfield
5d9dcfccbf From Farshid Lashkari, "fix for the Collada loader to check for some NULL attributes." 2017-10-27 13:17:47 +01:00
Robert Osfield
11f9bbf6ea Merge branch 'master' into osganimation 2017-10-27 12:54:10 +01:00
OpenSceneGraph git repository
c2520a8533 Merge pull request #373 from LaurensVoerman/noStdMax
use osg::maximum, not std::max
2017-10-27 09:33:24 +01:00
Laurens Voerman
93ef9d1dc9 use osg::maximum, not std::max 2017-10-27 09:41:28 +02:00
OpenSceneGraph git repository
1126812f8f Merge pull request #372 from openscenegraph/text_improvements
Text improvements, introducing implementation of Signed Distance Function texture generation and new shaders for outlines and shadows replacing old multi-pass approach
2017-10-26 14:26:01 +01:00
Robert Osfield
1e896777d1 Updated from OpenSceneGraph-Data/shader/text.frag to add fixes to handling of vertexColor's alpha values 2017-10-26 12:08:00 +01:00
Robert Osfield
5918735ebc Added update of glyph representation to ensure all the glyphs are assigned to the required GlyphTextures 2017-10-26 12:03:56 +01:00
Robert Osfield
671ea7ae74 Added command line parsing to aid with testing of osgText by allowing osgText::FadeText to be created with various options 2017-10-26 12:02:56 +01:00
Robert Osfield
fa58d01644 Added optimization for text where the colour alpha value is 0.0, returning early to aovid any GL calls. 2017-10-25 16:29:25 +01:00
Robert Osfield
248805fedd Fixed pre compilation osg::Program state leaking into the main scene graph rendering 2017-10-25 16:13:26 +01:00
Robert Osfield
c8bd6fd100 Added stats handler 2017-10-24 16:04:14 +01:00
Robert Osfield
8f658fbc32 Updated from OpenSceneGraph-Data/shaders/text.frag to address GLSL int to float conversion warning 2017-10-24 15:14:23 +01:00
Robert Osfield
9c9439ef73 Added DisplaySettings:s/getgTextShaderTechnique() and OSG_TEXT_SHADER_TECHNIQUE env var support to DisplaySettings.
Added using of DisplaySettings:getgTextShaderTechnique() to Text default constructor.
Added better debug output control in Text.cpp
2017-10-24 14:46:13 +01:00
Robert Osfield
1ecae6d33a Improved the Text::_shaderTechnique default setting using OSG_TEXT_SHADER_TECHNIQUE env var, options are ALL_FEATURES, GREYSCALE, SIGNED_DISTANCE_FIELD, SDF, NO_TEXT_SHADER, NONE. 2017-10-24 12:34:48 +01:00
Robert Osfield
c162a091fe Quitened down debug info 2017-10-24 12:07:13 +01:00
Robert Osfield
1cd0a5fe03 Fixed Glyph::TextureInfo assignment bug 2017-10-24 11:36:00 +01:00
Robert Osfield
55a1764712 Renamed text_sdf.frag to text.frag and removed text_greyscale_frag.
Cleaned up setup of osgText::ShaderTechnique adding a NO_SHADER_TECHNIQUE option.
2017-10-23 16:07:24 +01:00
Robert Osfield
4b295c46d1 Restructed the way that GlyphTexture is set up to better support control of osgText::ShaderTechnique from osgText::Text 2017-10-23 14:50:35 +01:00
OpenSceneGraph git repository
cfca536583 Merge pull request #371 from hwiesmann/master
Removal of compiler warning for Cocoa builds
2017-10-23 09:06:55 +01:00
OpenSceneGraph git repository
8347027e17 Merge pull request #370 from siu/master-travisCcache
Fix ccache on travis
2017-10-23 09:05:34 +01:00
Hartwig
2fc3387429 BUG FIX - Addition of missing #endif directive 2017-10-22 22:13:46 +02:00
Hartwig
41e9cd3157 Replacement of commas with semicolons 2017-10-22 15:04:33 +02:00
Hartwig
abb7f46371 Removal of compiler warning for Cocoa builds 2017-10-22 13:47:51 +02:00
David Siñuela Pastor
727653695d Install ccache on MacOs
Note that brew update must be run before any brew install command or
it will fail, see https://github.com/travis-ci/travis-ci/issues/8552.
2017-10-21 14:26:06 +00:00
David Siñuela Pastor
ade97dcd95 Fix ccache configuration in travis
Use ccache as explained in https://docs.travis-ci.com/user/caching/#ccache-cache
2017-10-21 14:04:46 +00:00
Robert Osfield
817b6601d2 Added Text::s/getShaderTechnique() 2017-10-21 10:08:41 +01:00
Robert Osfield
97aeb16551 Moved osgText::GlyphTechnique::Features enum to osgText::ShaderTechinque enum to make it's roll clearer 2017-10-20 17:03:25 +01:00
Robert Osfield
6b75439ae4 Merge branch 'master' into text_improvements 2017-10-20 14:14:14 +01:00
Robert Osfield
38e5fdadf0 From Ralf Habacker, patch refactoring struct ObjOptionsStruct
in obj plugin into a real class, which is a preparation for further obj
related patches.
2017-10-20 11:52:48 +01:00
Robert Osfield
a2ad1c9606 Added built-in support for lighting.vert 2017-10-20 11:37:41 +01:00
Robert Osfield
4645cc789e Updated shaders from OpenSceneGraph-Data/shaders 2017-10-20 10:18:21 +01:00
Robert Osfield
24c2a0ca60 Moved the assignment of the ModifiedCount to before GL texture calls. 2017-10-19 20:57:25 +01:00
Robert Osfield
8965c9369e Implemented --single command line option that creates a single osg::DrawElementsUInt primitive set instead of using MultiDrawIndirect. 2017-10-19 12:39:22 +01:00
Robert Osfield
4791e5f6b5 Improved spacing to make code more readable 2017-10-19 12:06:59 +01:00
Robert Osfield
068f47d91f Build fixes with ref_ptr<> autoconversion disabled 2017-10-19 11:57:53 +01:00
Robert Osfield
3c6f569360 Fixed placement of { and spacing to make the code more readable and consistent with the rest of the OSG 2017-10-19 11:06:23 +01:00
Robert Osfield
6496c304f9 Implemented inplace replacement 2017-10-18 10:32:18 +01:00
David Siñuela Pastor
cc8a34cd14 Do not break systems with cr as line endings 2017-10-18 10:30:57 +01:00
Robert Osfield
ad45bf1d61 Fixed warning 2017-10-16 11:52:54 +01:00
Robert Osfield
879b54f6e9 Fixed GLX EGL build 2017-10-16 10:47:47 +01:00
Robert Osfield
639ced08fc Removed inappropriate tabs&spaces 2017-10-16 10:38:33 +01:00
OpenSceneGraph git repository
7b9f44cb17 Merge pull request #364 from mp3butcher/osganimbugfix
add osg::Program::BindUniformBlockList serialization
2017-10-16 10:16:49 +01:00
Robert Osfield
ea379e64e7 Fixed build error 2017-10-16 10:12:19 +01:00
Robert Osfield
5067db39f8 Moved bracket to be consistent with the rest of the OSG 2017-10-16 10:08:18 +01:00
OpenSceneGraph git repository
bfca9998ea Merge pull request #366 from LaurensVoerman/rotateDXT
add support for dxt compressed images to createImageWithOrientationConversion
2017-10-16 10:00:49 +01:00
OpenSceneGraph git repository
1604b81919 Merge pull request #367 from LaurensVoerman/compression_astc
copySubImage support for block compressed images, added support for astc compressed type.
2017-10-16 09:58:29 +01:00
Robert Osfield
a9ef5a90eb Fixed indentation 2017-10-16 09:49:47 +01:00
OpenSceneGraph git repository
bd28b48be1 Merge pull request #365 from LaurensVoerman/login2
modified present3D and osgvnc to allow multiple --login arguments like osgViewer.
2017-10-16 09:45:37 +01:00
Robert Osfield
0e39c129b7 Changed the precision setting of #pargma(tic) shader composition define setup to address GLES compatibility issues 2017-10-14 09:06:37 +01:00
Robert Osfield
0a5c6d3fd6 Improved the formating of GLSL source that is passed to OpenGL to make debugging shaders easier. 2017-10-14 09:03:08 +01:00
Robert Osfield
2303d6afc4 Cleaned up support for GL3 build 2017-10-13 17:03:31 +01:00
Laurens Voerman
274cea19bf copySubImage support for block compressed images, added support for astc compressed type. 2017-10-13 16:54:04 +02:00
Robert Osfield
24bec09b9e Removed the glyph image outline support as it's no longer required. 2017-10-13 13:01:57 +01:00
Robert Osfield
8b12d2d71a Deprecated Text:BackdropImplementation, removing the backend as it no longer required when using shaders for backdrop effects 2017-10-13 11:42:25 +01:00
Robert Osfield
28561b2b77 Removed old multipass implemenmtations of backdrops as effect is now fully implememted in shaders 2017-10-13 08:40:58 +01:00
Julien Valentin
b540ed70ba add osg::Program::BindUniformBlock serialization 2017-10-12 20:09:55 +02:00
Robert Osfield
846204ed9e Updated from OpenSceneGraph-Data/shaders/text_sdf.frag to add support for SHADOW 2017-10-12 18:45:38 +01:00
Robert Osfield
f07bf5be2a Merge branch 'master' into text_improvements 2017-10-12 16:44:40 +01:00
Laurens Voerman
0fedfd2ff9 add support for dxt compressed images to createImageWithOrientationConversion 2017-10-12 17:38:16 +02:00
Laurens Voerman
99491e46ec modified present3D to allow multiple --login arguments like osgViewer, added --login option to osgvnc example 2017-10-12 17:21:10 +02:00
OpenSceneGraph git repository
4d67c80350 Merge pull request #363 from LaurensVoerman/dxtcGetcolor
added dxtc support in Image::getColor, Image::isImageTranscent testdxt3 and dxt5
2017-10-12 15:52:42 +01:00
Laurens Voerman
63f12986b4 added dxtc support in Image::getColor, enhanced Image::isImageTranslucent to test opacity of dxt3 and dxt5 images 2017-10-12 13:49:57 +02:00
Robert Osfield
eebb679754 Updated text_sdf_frag.cpp from OpenSceneGraph-Data changes that add outline generation for non SIGNED_DISTANCE_FIELD text. 2017-10-12 11:12:47 +01:00
Robert Osfield
d6af00d9bd Merge branch 'master' into text_improvements 2017-10-10 09:21:34 +01:00
Robert Osfield
adb6ae849d Updated ChangeLog 2017-10-09 12:33:06 +01:00
Robert Osfield
b2603d6c93 Updated version number 2017-10-09 12:25:40 +01:00
Robert Osfield
d649334662 Updated AUTHORS 2017-10-09 12:23:45 +01:00
OpenSceneGraph git repository
d74e340f32 Merge pull request #359 from eligovision/OpenSceneGraph_gles
Added defines: GL_ALPHA4/8/12/16 in osg/Image, this will fix compilat…
2017-10-09 10:03:21 +01:00
OpenSceneGraph git repository
5f985a36a2 Merge pull request #358 from eligovision/OpenSceneGraph_optimizer
VertexAttribDivisor compare function fix: index must be compared
2017-10-09 10:02:51 +01:00
Robert Osfield
4906844ea7 Added explictly unbinding of VBO for setInterleavedArrays(). 2017-10-06 18:03:36 +01:00
Robert Osfield
9ac2b2eb7b Added VertexArrayState::ArrayDispatch::className() method and implementation for each ArrayDispatch subclass to help with debugging 2017-10-06 17:47:19 +01:00
Konstantin S. Matveyev
1e1f69febc Added defines: GL_ALPHA4/8/12/16 in osg/Image, this will fix compilation error while building for GLES2 2017-10-06 18:16:48 +03:00
Konstantin S. Matveyev
a87e57e946 VertexAttribDivisor compare function fix: index must be compared 2017-10-06 18:14:47 +03:00
Robert Osfield
7868b42ef2 Improved the readability of recent changes by adding spaces, {} and moving { onto separate lines to keep things consistent with the rest of the OSG. 2017-10-05 16:56:30 +01:00
OpenSceneGraph git repository
eb5f46d8dd Merge pull request #357 from mp3butcher/osganimation
fix normalization bug (happen too early )
2017-10-05 16:43:54 +01:00
OpenSceneGraph git repository
11352bbdbb Merge pull request #354 from eligovision/OpenSceneGraph_intersection
LineSegmentIntersector fixed: intersection ratio remaped to the range…
2017-10-05 16:31:45 +01:00
OpenSceneGraph git repository
1a1fe43347 Merge pull request #353 from eligovision/OpenSceneGraph_io
tellg call removed from StreamOperator's checkStream function, becaus…
2017-10-05 16:30:21 +01:00
OpenSceneGraph git repository
bc9f481c2b Merge pull request #355 from denyskoch/patch-1
Fix loading of 16bit PNG images
2017-10-05 16:29:37 +01:00
Robert Osfield
042a357278 Fixed spacing to make it consistent with the rest of the OSG and make it easier to read. 2017-10-05 15:59:26 +01:00
OpenSceneGraph git repository
19a48951b7 Merge pull request #351 from LaurensVoerman/vncHostPw
VNC: try to find password for host if no password for host:port is found
2017-10-05 15:57:02 +01:00
Robert Osfield
ddf8c68d26 Added support for multiple --login url username password entries to osgviewer 2017-10-05 15:37:03 +01:00
OpenSceneGraph git repository
d75564c7e3 Merge pull request #348 from eligovision/OpenSceneGraph_serializers
osg serializers fixed for static build, ShaderAttribute wrapper added
2017-10-05 15:02:17 +01:00
Robert Osfield
c918916bcb Steamlined the handling of osg::Geometry 2017-10-05 12:45:47 +01:00
OpenSceneGraph git repository
95de3a460e Merge pull request #346 from LaurensVoerman/FindLIBLAS
removed las_c library from FindLIBLAS.cmake, it's not used by the osgplugin.
2017-10-05 12:15:23 +01:00
Robert Osfield
7fb37016fd Merge branch 'master' into text_improvements 2017-10-05 12:14:03 +01:00
Robert Osfield
2f19cd4b87 Improvements to the Signed Distance Field implementation. 2017-10-04 18:06:42 +01:00
Julien Valentin
d2162717b8 fix normalization bug (happen too early )
minor bug

bla
2017-10-04 07:23:46 +02:00
Robert Osfield
d2fa7c4317 Simplified and improved the glyph margin computation and usage 2017-09-29 20:21:13 +01:00
Robert Osfield
beb5801eee Improved SDF generation 2017-09-29 10:39:02 +01:00
Robert Osfield
1f36f5bd8d Added setting of the FontResolution of the DefaultFont 2017-09-29 10:25:04 +01:00
Robert Osfield
468d6d8eea Added command line support for specifying "default" for osgText::DefaultFont 2017-09-29 10:20:59 +01:00
Robert Osfield
726bb13e9a Improved the setup of the --counter test 2017-09-29 09:54:43 +01:00
Denys Koch
b3c08a8ad6 Fix loading of 16bit PNG images
When a 16bit PNG image is loaded, the internalTextureFormat is set to unsized (i.e pixelFormat) constant. This results in 8 Bit Texture2D
2017-09-28 11:09:18 +02:00
Robert Osfield
75d23b2c10 Fixed update of GlyphTexture Image when copying new Glyph image's to it. 2017-09-27 11:09:22 +01:00
Robert Osfield
8c575c0cea UPdated from OpenSceneGraph-Data with handling of non textured text decoration 2017-09-26 15:32:41 +01:00
Robert Osfield
6ec9f0a3d3 Updated shader from OpenSceneGraph-Data/shaders to add fade out for SDF and non SDF pathways 2017-09-26 12:51:03 +01:00
Robert Osfield
ca5a8a81a2 Updated wiht OpenSceneGraph-Data/shader version that introduced use of textureLOD to reduce aliasing artifacts with SDF 2017-09-26 10:57:09 +01:00
Robert Osfield
845e1d4463 Updated shaders using latest OpenSceneGraph-Data/shader versions 2017-09-26 10:44:14 +01:00
Robert Osfield
6d4128324b Improvements to SDF and outline generation 2017-09-26 10:42:47 +01:00
Robert Osfield
708ae1c076 Fixed rendering old sytel outline 2017-09-22 12:22:58 +01:00
Konstantin S. Matveyev
941ec1e451 LineSegmentIntersector fixed: intersection ratio remaped to the range of LineSegment => correct order in multiset of intersections 2017-09-22 11:46:02 +03:00
konstantin.matveyev
cf2b5d030c tellg call removed from StreamOperator's checkStream function, because reading of files (readNodeFile etc.) with tellg on 'every iter' is approximately 100 times slower on Emscripten platform 2017-09-22 11:43:07 +03:00
Konstantin S. Matveyev
8d8035a173 LineSegmentIntersector fixed: intersection ratio remaped to the range of LineSegment => correct order in multiset of intersections 2017-09-22 11:34:28 +03:00
OpenSceneGraph git repository
e2d20a337d Merge pull request #352 from remoe/patch-3
addShader fix
2017-09-22 07:56:30 +01:00
Remo E
49c336e514 addShader fix 2017-09-22 08:39:38 +02:00
Robert Osfield
b6bb0caf8d Removed debug output 2017-09-21 16:04:10 +01:00
Robert Osfield
4b6722ab44 Added assignStateSet() to Text::setBackgroundColor() 2017-09-21 16:01:27 +01:00
Robert Osfield
12904105f8 Added support for toggling on use of the new SignedDistanceFunction function now built into osgText, just use --sdf to enable. 2017-09-21 15:52:07 +01:00
Robert Osfield
a1f519cbec Removed debug info 2017-09-21 15:41:21 +01:00
Laurens Voerman
292b892478 VNC: try to find password for host if no password for host:port is found 2017-09-21 16:33:14 +02:00
Robert Osfield
957a7d4e92 Moved enabling/disabling of SDF so it's done regardless of whether a backdrop is used. 2017-09-21 14:35:31 +01:00
Robert Osfield
e72a38c8b6 Umproved SDF computation. 2017-09-21 14:32:17 +01:00
Robert Osfield
e565a5e1c3 Removed no longer used code paths 2017-09-20 16:51:30 +01:00
Robert Osfield
78811462f1 Added support for only enabling SignedDistanceField shader path when font resolution is greater than 16. 2017-09-20 15:51:03 +01:00
Robert Osfield
fb0a995d7b cleaned up exmple 2017-09-20 14:30:23 +01:00
Robert Osfield
e8eb1ee0c7 Added Text::assignStateSet() and usage to make sure the correct StateSet is setup for each combination of backdrop settings 2017-09-20 14:29:05 +01:00
Robert Osfield
b0829cc352 Updated text_sdf.frag shader to handle GLES2+ versions 2017-09-20 11:02:06 +01:00
Robert Osfield
420094174e Added commented out debug output to make it easier to test in future 2017-09-20 11:01:04 +01:00
Robert Osfield
fafa468fea Fixed OSG_PRECISION_FLOAT usage 2017-09-19 17:07:59 +01:00
Robert Osfield
370ca2b8a3 Fixed X11 GLES2 build 2017-09-19 17:01:58 +01:00
Robert Osfield
72cf6734a1 Added osgText/shaders to support greyscale and Signed Distance Field based text 2017-09-19 16:35:28 +01:00
Robert Osfield
cc7cf54353 Added support for subsititing $VAR_NAME entries in shaders to enable writing shaders that work across GLSL versions. 2017-09-18 18:09:15 +01:00
Robert Osfield
5ade852172 Added constant sizeing vs changing label size relatve to font resolution, controlled by --constant-size and --scale-size command line options. 2017-09-15 15:14:19 +01:00
Konstantin S. Matveyev
8055ec9156 osg serializers fixed for static build, ShaderAttribute wrapper added 2017-09-15 12:36:19 +03:00
Robert Osfield
a12a43d352 Impprovide the computation of the Signed Distance Field 2017-09-14 15:58:38 +01:00
Robert Osfield
70b3a3a442 Fixed of shadow 2017-09-13 11:09:56 +01:00
Robert Osfield
1e11b89d04 Added --shadow-* command line variants to provide full control over the position of the text shadow 2017-09-13 11:08:51 +01:00
Robert Osfield
0d5a42f635 Added setting of the Text::BackdropImplementation type to USE_SHADERS when setting up shaders 2017-09-12 19:13:01 +01:00
Robert Osfield
7a50bdafe3 Changed the margin computation to properly account of the Signed Distance Function data 2017-09-12 16:03:35 +01:00
Robert Osfield
722ed6fc5e Shifted set up of osgText related StateSet from osgText::Font into into osg::TextBase/Text to enable grater control over state required for specific Text implementations 2017-09-12 11:50:47 +01:00
Laurens Voerman
985b3a7206 removed las_c library from FindLIBLAS.cmake, it's not used by the osg plugin. 2017-09-12 09:19:33 +02:00
Robert Osfield
f98c23d460 Added extra command line paramter and osgText::Font settings to add better control of osgText::GlyphTexture generation to support signed distance field and outline image data. 2017-09-08 17:03:15 +01:00
Robert Osfield
2b010f019f Added setting of the original font reoslution to the created Glyph 2017-09-08 17:02:38 +01:00
Robert Osfield
de47eb3666 Add support for generating outline and signed distance field channels in a RGBA packed GlyphTexture Image. 2017-09-08 16:59:43 +01:00
Robert Osfield
77d4705182 Added KeyHandler for toggling "SIGNED_DISTANCE_FIELD" and "OUTLINE" #pragma(tic) shader defines to control the different shader paths.
Keys to press are 'd' for toggle SIGNED_DISTANCE_FIELD and 'o' for OUTLINE.
2017-09-06 16:53:54 +01:00
Robert Osfield
20ee12e986 To control the GlyphTexture Min/MagFilter values Added --min <value> and --mag <value> filter with LINEAR, NEAREST and LINEAR_MIPMAP_LINER options for values 2017-09-06 10:40:05 +01:00
OpenSceneGraph git repository
cf14587b5c Merge pull request #340 from mp3butcher/osganimation
add a new method on VertexInfluenceMap and the serializer for MorphTransforfHW
2017-09-04 15:35:01 +01:00
OpenSceneGraph git repository
4bc1320709 Merge pull request #344 from eligovision/OpenSceneGraph_text3d
Text3D dynamic changing fix
2017-09-04 15:21:26 +01:00
OpenSceneGraph git repository
ce8fa14d41 Merge pull request #345 from eligovision/OpenSceneGraph_example_text3d
example_osgtext3d: more options for testing
2017-09-04 15:20:54 +01:00
Julien Valentin
0a93569b9e add DSO scope in modified XXXTransformHardware serializers 2017-09-04 12:04:37 +02:00
Konstantin S. Matveyev
ca42523cd0 example_osgtext3d: more options for testing 2017-09-04 11:44:30 +03:00
Konstantin S. Matveyev
3503a0fefb Text3D dynamic changing fix 2017-09-04 11:29:50 +03:00
OpenSceneGraph git repository
ff6e77c874 Merge pull request #341 from scrawl/cullingactive_fix
LineSegmentIntersector: respect the 'cullingActive' flag for bounding box check
2017-09-04 08:36:49 +01:00
Julien Valentin
7da072b433 cleanup 2017-09-04 02:34:59 +02:00
Julien Valentin
041a2a6e72 make preparedata skeleton independant (as it was with the Rig::buildInfluenceSet)
no more divergence with master i think
2017-09-04 01:56:43 +02:00
scrawl
6048c1fbdc LineSegmentIntersector: respect the 'cullingActive' flag when testing drawable bounding box 2017-09-03 14:15:36 +00:00
Julien Valentin
381c2150d4 Merge remote-tracking branch 'upstream/master' into osganimation 2017-09-01 20:03:05 +02:00
Julien Valentin
a73c20d7f5 update serializer with new properties 2017-09-01 19:13:01 +02:00
Julien Valentin
9560548722 add MorphTransformHardware serializer 2017-09-01 18:10:40 +02:00
Julien Valentin
a2b29c1afd Merge remote-tracking branch 'upstream/osganimation' into osganimation 2017-09-01 18:04:32 +02:00
Julien Valentin
78dd81a8b4 add void InfluenceMap::removeUnexpressedBones(Skeleton &skel) const;
a bit experimental but work well without further process on my test set
2017-09-01 17:48:28 +02:00
OpenSceneGraph git repository
0e5acda26e Merge pull request #338 from mp3butcher/osganimation
clean and bugfix
2017-09-01 16:46:38 +01:00
OpenSceneGraph git repository
7aeb455597 Merge pull request #337 from mp3butcher/osganimbugfix
fix a bug in how vertexattributes are filled
2017-09-01 15:50:47 +01:00
Julien Valentin
0d02dfbbbd remove utility classes BoneWeight and IndexWeight in order to avoid unnecessary symbols
(but decrease a bit clarity of the code)
2017-09-01 16:23:49 +02:00
Julien Valentin
8b74b04de0 cleanup 2017-09-01 15:19:42 +02:00
Julien Valentin
dee9dc2164 a functional cleanup 2017-09-01 01:43:00 +02:00
Julien Valentin
5aa96727e9 clean and bugfixes 2017-08-31 20:57:19 +02:00
OpenSceneGraph git repository
34270cdcaa Merge pull request #333 from mp3butcher/osganimation
osgAnimation: change animationdata owner from riggeometry to rigtransformimplementations
2017-08-31 14:32:39 +01:00
Julien Valentin
b790986f37 few cleanup 2017-08-31 13:49:27 +02:00
Julien Valentin
068a032dac revert s/VertexIndexWeight/IndexWeight/ 2017-08-31 13:30:24 +02:00
Julien Valentin
0926bb783d fix example 2017-08-31 13:29:42 +02:00
Julien Valentin
4c4f760d4a fix a bug in how vertexattributes are filled 2017-08-30 23:19:49 +02:00
Julien Valentin
f4675a5648 I found the damn bug in RigTransformHW 2017-08-30 23:01:21 +02:00
Julien Valentin
1f628235d4 rehabilit an init method to ensure morphing po setted before skinning po in case of rigeom source that are morphgeom 2017-08-30 20:36:34 +02:00
Robert Osfield
07a8d082e4 Added --shader filename command line parsing and associated set up of osg::Program to allow shaders to be passed into example to customize rendering 2017-08-30 17:43:29 +01:00
Robert Osfield
81f93e34b8 Added --interval value commnad line option for setting the Font::setGlyphInterval() to experimentation of clamping of glyph images to user specified intervals in the glyph texture 2017-08-30 16:22:25 +01:00
Robert Osfield
1289c4ee41 Added osgText::Font::s/getGlyphInterval(int) and GlyphTexture::s/getGlyphInterval(int) and internal support for clmapping positions of glyph images an defined intervals, defaults to 1. 2017-08-30 16:21:03 +01:00
Julien Valentin
86ad54f671 add parameter to XXXTranformHW to customize reserved texture attribs and vertex attribs 2017-08-30 17:07:11 +02:00
Julien Valentin
705695b41d add a guard (if dirty) on uniform update 2017-08-30 15:48:45 +02:00
Julien Valentin
8fad310ce1 readd VertexInfluence whenever it's bad named and kinda useless 2017-08-30 15:30:03 +02:00
Julien Valentin
6d1193ee70 readd buildVertexInfluenceSet for backward compat 2017-08-30 14:59:31 +02:00
Julien Valentin
fd9b8f103e cleanup 2017-08-30 14:26:15 +02:00
Julien Valentin
985d766f05 uncomment normalization in rigtransformxxx 2017-08-30 12:55:45 +02:00
Julien Valentin
0ebf540d65 add and comment out normlization in rigtransformXXX 2017-08-30 12:09:54 +02:00
Robert Osfield
7323bb776b Added --margin texel_width and --margin-ration ratio to control the spacing between glyphs in the font. 2017-08-30 10:50:26 +01:00
Robert Osfield
20ecd5c60d Added --test command line option that sets up all the sizes and font settings required for a useufl unit test. 2017-08-30 10:16:18 +01:00
Julien Valentin
fe99b568a0 refactor: remove totally VertexInfluence (renamed BoneInfluenceList) everywhere 2017-08-30 11:12:17 +02:00
Robert Osfield
f3bbb686d2 Removed debug messages 2017-08-29 17:32:14 +01:00
Robert Osfield
5566a025b5 Added TextSettings struct to manage values used to set up the text. with the addition of following command line parameters:
--outline // enable outlne
   --shadow // enable shadow
   --offset ratio // set the backdrop offset
   --text-color r g b a // set the text body color
   --bd-color r g b a // set the shadow/outline color
   --bg-color r g b a // window background color
   -o filename // write create subgraph to disk using specified filename
2017-08-29 17:19:26 +01:00
Julien Valentin
fae9729560 swap priority in BonePtrWeight comparator< yeild the same VG set 2017-08-29 17:41:38 +02:00
Julien Valentin
ce6a316bde cleanup 2017-08-29 17:41:26 +02:00
Julien Valentin
186691a9db remove virtual qualifier for deprecated method 2017-08-29 15:10:05 +02:00
Julien Valentin
21bcd61c92 add MorphTransformHW for RigGeometry sources that are MorphGeometry 2017-08-29 14:49:19 +02:00
Julien Valentin
059fc70337 set defaut implementation at creation 2017-08-29 14:49:11 +02:00
Robert Osfield
37487b0c0b Added --ortho command line option to toggle use of orthographic camera or default perspective one 2017-08-29 13:48:06 +01:00
Robert Osfield
c36e47188b Added argument parsing to viewer constructor 2017-08-29 12:21:14 +01:00
OpenSceneGraph git repository
5ccda08770 Merge pull request #334 from mathieu/ValidateProgramTooEarly
Under macOS the glValidateProgram reports too many errors
2017-08-29 10:51:06 +01:00
Mathieu MARACHE
e2f826b8fc Under macOS the glValidateProgram reports too many
false negatives (errors) about missing buffers, etc..

From the internet https://stackoverflow.com/questions/15335510/opengl-glvalidateprogram-error-on-mac-os-x :
« […] The purpose of glValidateProgram is not to use it as an added "check" step after linking the program, because the GL and application state is hardly ready for actually using that program at this point, probably it's even before we get around to initializing the default framebuffer (its bitdepth, its multisample buffers, etc), and that's what the error hints at.

An appropriate place to call glValidateProgram would be right before you make a real render call. »
2017-08-29 11:34:27 +02:00
Julien Valentin
0c9a624026 few refactoring and fixes 2017-08-29 04:08:55 +02:00
Julien Valentin
b3402d9344 readd the 2 methods in InfluenceMap just in case 2017-08-29 00:34:26 +02:00
Julien Valentin
9856cecb71 cleanup 2017-08-29 00:09:38 +02:00
Julien Valentin
4a626cea20 remove VertexInfluenceSet 2017-08-29 00:07:07 +02:00
Julien Valentin
350756e738 add 2 method to VertexInfluenceMap:
normalize and cullInfluenceCountPerVertex
2017-08-28 18:42:22 +02:00
Julien Valentin
5123614f89 comply with refactoring 2017-08-28 18:27:23 +02:00
Julien Valentin
925f1524cf total removal of the old path 2017-08-28 18:16:30 +02:00
Julien Valentin
28bb88a038 remove default order for BoneWeight and restore old sort func (behaviors differs) 2017-08-28 18:02:52 +02:00
OpenSceneGraph git repository
63e833a398 Merge pull request #332 from denyskoch/fix-boundingsphere-inequality-operator
Fix flawed BoundingSphere inequality operator
2017-08-28 16:28:30 +01:00
Julien Valentin
ad550acc60 clean unused 2017-08-28 17:13:48 +02:00
Julien Valentin
8707086914 fix the example 2017-08-28 17:13:23 +02:00
Julien Valentin
da1d2b67f7 remove old path and add few fixes 2017-08-28 17:01:03 +02:00
Julien Valentin
6d55d8d341 minor fixes
removed unused
2017-08-28 16:08:14 +02:00
Julien Valentin
2aab28149f reroot to rigtransform::prepareData old path to rig::buildvertexinfluence 2017-08-28 15:59:13 +02:00
Julien Valentin
7659b23f38 remove unused 2017-08-28 15:44:09 +02:00
Julien Valentin
3efaccb298 add prepareData for RigTransformHW 2017-08-28 15:41:14 +02:00
Julien Valentin
4b56a4d3be minor changes+fix 2017-08-28 15:40:04 +02:00
Julien Valentin
2b5ac5b4db add default constructor for IndexWeight with invalid indices 2017-08-28 15:27:46 +02:00
Julien Valentin
f899a8dde5 add prepareData for rigttransform software 2017-08-28 14:44:09 +02:00
Denys Koch
1d1bfa1b39 Fix flawed BoundingSphere inequality operator 2017-08-28 14:34:39 +02:00
Julien Valentin
e216833286 few refactoring 2017-08-28 14:23:15 +02:00
OpenSceneGraph git repository
1aeb27b54f Merge pull request #331 from mp3butcher/osganimation
Osganimation fix a bug introduced when readding transformsoftwareMethod
2017-08-28 13:18:37 +01:00
Julien Valentin
f995c9187e Merge remote-tracking branch 'upstream/osganimation' into osganimation 2017-08-28 13:34:06 +02:00
Julien Valentin
66aedbb0b3 fix a bug introduced when readding transformsoftwareMethod 2017-08-28 13:25:04 +02:00
Robert Osfield
5d55ffe6ee Merge branch 'osganimation' of https://github.com/mp3butcher/OpenSceneGraph into osganimation 2017-08-28 10:28:18 +01:00
OpenSceneGraph git repository
26d0d3f424 Merge pull request #330 from mathieu/ProgramFixFunctionAvailableCoreProfile
osg::Program::isFixedFunction() should'nt return true if fixed function unavailable
2017-08-28 10:02:27 +01:00
Mathieu MARACHE
1408c2664e osg::Program::isFixedFunction() should'nt return true fixed function is unavailable, even if _shaderList.empty() is true 2017-08-28 09:44:10 +02:00
Julien Valentin
6dc6bd5b92 fix a bug introduced when readding transformsoftwareMethod 2017-08-28 05:26:20 +02:00
Julien Valentin
f46fdb4d4e add a new prepareData method to the interface 2017-08-28 05:17:17 +02:00
Julien Valentin
2b2a8f3d2e MorphTransformHardware using TBO added 2017-08-28 04:51:52 +02:00
Julien Valentin
ed04e2735e readd virtual void transformSoftwareMethod() for retrocompatibity 2017-08-28 04:42:51 +02:00
OpenSceneGraph git repository
cf06256997 Merge pull request #327 from kornerr/master
Fix Emscripten build errors
2017-08-27 18:08:09 +01:00
OpenSceneGraph git repository
5efdcd5655 Merge pull request #328 from scrawl/group-docs
Fix docs for Group::addChild to match implementation
2017-08-27 18:07:21 +01:00
Julien Valentin
ca224c81dd replace VertexInfluence to BoneInfluenceList
and VertexIndexWeight to IndexWeight

fix in example
2017-08-27 05:21:37 +02:00
Julien Valentin
4f0256bcc3 remove unused code and remove a commented section 2017-08-27 01:36:21 +02:00
Julien Valentin
0729e883d8 update serializers 2017-08-26 23:17:54 +02:00
Julien Valentin
32aaeccee1 refactoring and fixes
only change in design: decouplage between MorphGeometry and MorphTransform technique
no real change in behavior (i hope)
2017-08-26 23:06:39 +02:00
Michael Kapelko
871d8c54ec Fix Emscripten build errors 2017-08-26 19:25:00 +03:00
scrawl
1cd1ab1c60 Fix docs for Group::addChild to match implementation
Checking for duplicates is only done if ENSURE_CHILD_IS_UNIQUE is defined, but this is never defined anywhere.
2017-08-26 11:30:55 +00:00
OpenSceneGraph git repository
2c6c2bde3c Merge pull request #326 from emminizer/glcore3_cmakefix
SETUP_EXE in CMake now uses same define for including the GLCORE head…
2017-08-25 14:49:38 +01:00
OpenSceneGraph git repository
1d24b2dc44 Merge pull request #325 from emminizer/msvc2015_exportfix
Removed inappropriate use of OSG_EXPORT on DefaultIndirectCommandDrawArrays and De…
2017-08-25 14:48:42 +01:00
Daniel Emminizer
a9f0793e69 SETUP_EXE in CMake now uses same define for including the GLCORE headers as SETUP_LIBRARY and SETUP_PLUGIN. Fixes Windows build errors for applications. 2017-08-25 09:04:05 -04:00
Daniel Emminizer
2e456eeddc No longer using OSG_EXPORT on DefaultIndirectCommandDrawArrays and DefaultIndirectCommandDrawElements, fixing compile errors in MSVC 2015. 2017-08-25 08:55:25 -04:00
OpenSceneGraph git repository
830133b1a8 Merge pull request #324 from mp3butcher/osganimation
Add extensions
2017-08-25 10:04:40 +01:00
Julien Valentin
c89b08ea1f Add extensions 2017-08-25 00:19:22 +02:00
Robert Osfield
68e0b25d32 Cleaned up warnings and removed assorts. 2017-08-24 15:13:14 +01:00
OpenSceneGraph git repository
07ea948f50 Merge pull request #322 from mp3butcher/MDI7
fix osggpucull to fit both new BIB and MDI
2017-08-24 13:55:56 +01:00
Julien Valentin
2d1aaedb9c fix osggpucull to fit both new BIB and MDI 2017-08-24 14:20:10 +02:00
Robert Osfield
be2f2d6595 Bumped SO version to reflect changes in ABI 2017-08-24 11:17:43 +01:00
OpenSceneGraph git repository
cf91bb42f0 Merge pull request #321 from LaurensVoerman/tgaMissingColormap
fix gcc/VC compile warnings, reject color mapped tga files with missing colormap.
2017-08-24 11:08:38 +01:00
Laurens Voerman
9ef4859f55 fix gcc/VC compile warnings, reject color mapped tga files with missing colormap. 2017-08-24 11:37:21 +02:00
OpenSceneGraph git repository
f99b786a6e Merge pull request #320 from mp3butcher/MDI7
MultiDrawIndirect
2017-08-24 10:33:44 +01:00
Julien Valentin
107b7be95b Merge remote-tracking branch 'upstream/master' into MDI7 2017-08-24 11:26:23 +02:00
OpenSceneGraph git repository
b89384d810 Merge pull request #318 from mp3butcher/osganimation
change the design of BufferIndexBinding to work with BufferData instead of BufferObject +matrix transpose
2017-08-24 09:53:32 +01:00
Julien Valentin
3de1ce062c comply with osg::BufferIndexBinding new design (a miss) 2017-08-24 10:29:19 +02:00
Julien Valentin
d49f0d67af change the design of BufferIndexBinding to work with BufferData instead of BufferObject
allow convenient BufferData abstraction +  serialization of BufferIndexBinding
2017-08-24 03:28:55 +02:00
Julien Valentin
3b03699fbc add a transpose method for 4x4
and a transpose3x3 to transpose only orthogonal part of a mat4x4
2017-08-23 23:49:36 +02:00
Robert Osfield
eefeb3bb93 Fixed underflow issue 2017-08-23 15:26:07 +01:00
Robert Osfield
3b69755117 Fixed comparison to properly handle texture coordinates being assigned 2017-08-23 14:51:18 +01:00
OpenSceneGraph git repository
90e27d3b7d Merge pull request #314 from LaurensVoerman/notify2
reduce the need to reallocate the std::ostream buffer behind osg::Notify
2017-08-23 14:48:04 +01:00
Robert Osfield
bb3b69962a Warning fixes 2017-08-23 14:39:35 +01:00
Laurens Voerman
682730fbe4 reduce the need to reallocate the std::ostream buffer behind osg::Notify (causing multitreading issues) by pre-allocating 4095 bytes. 2017-08-23 11:53:16 +02:00
OpenSceneGraph git repository
e4ed8490ac Merge pull request #315 from kornerr/master
Fix stat64 build issue with NDK 15 by definining it as stat for Android
2017-08-23 08:54:10 +01:00
Michael Kapelko
59d3b1ebac Fix stat64 build issue with NDK 15 by definining at stat for Android 2017-08-22 22:49:56 +03:00
Robert Osfield
1b65adeebc Updated ChangeLog 2017-08-22 12:04:18 +01:00
Robert Osfield
674c25fceb Added catch for controbutors list 2017-08-22 11:59:22 +01:00
Robert Osfield
0dbcfff679 Added name typo fix 2017-08-22 11:58:49 +01:00
OpenSceneGraph git repository
ad98bdd165 Merge pull request #311 from eligovision/master
Geometry::compileGLObjects function VAO fix
2017-08-22 09:22:41 +01:00
OpenSceneGraph git repository
6095c4f3d5 Merge pull request #312 from LaurensVoerman/vnc_plugin
ReaderWriterVNC.cpp fix g++ warnings
2017-08-22 09:21:24 +01:00
Laurens Voerman
3a50e2948b ReaderWriterVNC.cpp fix g++ warnings 2017-08-22 09:35:00 +02:00
Konstantin S. Matveyev
d1453a41c2 Geometry::compileGLObjects function VAO fix 2017-08-22 10:12:36 +03:00
OpenSceneGraph git repository
16bb0561ea Merge pull request #309 from mp3butcher/osganimation
add DrawElementTypeSimplifierVisitor constructor because default nodevisitor is TRAVERSE_NONE..
2017-08-22 08:01:40 +01:00
Julien Valentin
f97b1626b3 fix nodevisitor construction 2017-08-21 18:33:56 +02:00
Robert Osfield
af609dfb67 Revert commit 904619e219 as it was causeing build problems 2017-08-21 16:24:34 +01:00
Robert Osfield
50cd8850f8 Added handling of CPACK and automatically generated package files 2017-08-21 15:06:31 +01:00
Robert Osfield
8926f0e9c2 Using a PR from Sando Mani for requestioning a specific GL version as a base, cleaned up formattating, made the new code paths simpler and added clean up of memory 2017-08-21 11:40:45 +01:00
OpenSceneGraph git repository
70135d606e Merge pull request #307 from eligovision/master
[*] createTexturedQuadGeometry: fixed for GL3 spec
2017-08-20 19:53:41 +01:00
OpenSceneGraph git repository
dc005a0719 Merge pull request #308 from OpenMW/collada_valuetype_patch
Use osg::Quat::value_type instead of double in collada plugin
2017-08-20 19:52:31 +01:00
scrawl
fb214b62a1 Use osg::Quat::value_type instead of double in collada plugin
Note that although the value_type is currently always double, using the proper typedef will open the door to implementing a float Quaternion in the future (as I have done so in my own fork)
2017-08-20 15:56:40 +00:00
konstantin.matveyev
6841f37ccc [*] createTexturedQuadGeometry: fixed for GL3 spec: GL_QUADS -> GL_TRIANGLES 2017-08-20 18:01:49 +03:00
OpenSceneGraph git repository
55f5335f18 Merge pull request #306 from AnyOldName3/targa-type-one-support
Add support for type-1 (colour-mapped, uncompressed) targa images to …
2017-08-20 08:32:02 +01:00
AnyOldName3
67a0f815e4 Add support for type-1 (colour-mapped, uncompressed) targa images to the osgTGA plugin 2017-08-19 22:22:20 +01:00
OpenSceneGraph git repository
32f895bc5f Merge pull request #304 from eligovision/master
glClear should not be called with zero-mask in osgUtil::RenderStage::…
2017-08-19 17:20:40 +01:00
Robert Osfield
904619e219 Merged addition of "" around variable from 3.4 branch 2017-08-18 16:13:16 +01:00
Konstantin S. Matveyev
036add8e9e glClear should not be called with zero-mask in osgUtil::RenderStage::drawImplementation 2017-08-18 10:20:26 +03:00
Robert Osfield
bdbff4824b Fixed iterator comparison. 2017-08-18 08:11:57 +01:00
OpenSceneGraph git repository
fa61cca6ea Merge pull request #301 from LaurensVoerman/Submit_linkWithVariables
fix for visual studio trying to link "debug.lib" and "release.lib"
2017-08-17 13:55:13 +01:00
Robert Osfield
34b4e70015 Added version check for boolean, TRUE and FALSE settings 2017-08-17 10:52:59 +01:00
Laurens Voerman
c939f7f0fc fix for visual studio trying to link "debug.lib" and "release.lib" 2017-08-17 11:44:06 +02:00
Robert Osfield
af79ad451e Added remapping of CMAKE_BUILD_TYPE strings that don't have the correct case. 2017-08-16 17:51:58 +01:00
Robert Osfield
f3adcda6b7 Removed the GLclampd declaration and replaced its usage with GLdouble to standardize the OSG extension setup with current GL/GLES headers.
Added a float fallback from osg::DepthDangeIndex to suppprt GLES.
2017-08-16 14:20:00 +01:00
OpenSceneGraph git repository
bfbaecaf49 Merge pull request #300 from eligovision/master
Text3D character/glyph size fix
2017-08-16 11:30:14 +01:00
OpenSceneGraph git repository
2831fc8088 Merge pull request #299 from luzpaz/misc-typo-fixes
misc. typo fixes
2017-08-16 09:04:02 +01:00
konstantin.matveyev
237ab29ff8 Merge remote-tracking branch 'upstream/master' 2017-08-15 22:15:31 +03:00
konstantin.matveyev
b0ef9b0c42 Text3D character/glyph size fixed 2017-08-15 22:11:15 +03:00
luzpaz
2cd31f65e4 misc. typo fixes
mostly non-user-facing but some doxy.
2017-08-15 12:23:49 -04:00
Robert Osfield
7b2dbc603c Fixed warning 2017-08-15 16:35:23 +01:00
Uwe Woessner
f186f6b2d4 Extension to the PLY plugin to read files with textures. 2017-08-15 15:52:35 +01:00
OpenSceneGraph git repository
86d7a903a1 Merge pull request #298 from eligovision/master
Emscripten: EGL instead of SDL2 in GLExtensions.cpp
2017-08-15 06:39:02 +01:00
konstantin.matveyev
7e0a20b4ba Merge remote-tracking branch 'upstream/master' 2017-08-14 14:58:29 +03:00
konstantin.matveyev
8e8d5b2fe0 Emscripten: EGL instead of SDL2 in GLExtensions.cpp 2017-08-14 11:19:04 +03:00
Robert Osfield
c18be2fc41 Replaced local FindZLIB.cmake usage with CMake's own FindZLIB.cmake, and ZLIB_LIBRARY to ZLIB_LIBRARIES 2017-08-09 14:18:35 +01:00
OpenSceneGraph git repository
e606e0b4de Merge pull request #296 from openscenegraph/FullScreen
From Don Burns, add use of Xinerama to ensure full screen goes across all screens.
2017-08-09 14:08:59 +01:00
Robert Osfield
b46ccd0aa5 Disabled the building of deprecated serializations in convertity_scan 2017-08-09 08:58:25 +01:00
Anna Sokol
9d1234e866 In the attached GraphicsWindowWin32.cpp file, I changed order of the "else-if" for the TOUCHEVENTF_UP and TOUCHEVENTF_MOVE, I made it less intrusive then changing them into "if" events. I tested this on Windows 7 64-bit with a touch screen and a Windows 10 64-bit tablet.
Separately in the same file, I also needed to address the fact that the close button would not react on touch so I added to the top of the "handleNativeWindowingEvent" close button handling in case of touch events. Again this was tested on the same 2 devices.
2017-08-08 13:35:35 +01:00
Robert Osfield
0d128c3a1a Added link to ABI tracker 2017-08-07 16:32:44 +01:00
OpenSceneGraph git repository
fbb5dabdd5 Merge pull request #294 from mp3butcher/MDI6
add resize methods method in IndirectCommandArrays ..etc..
2017-08-06 15:30:27 +01:00
Julien Valentin
899a704eb7 update IndirectCommandArrays interfaces and default impl to use DrawElements like semantic 2017-08-05 18:03:27 +02:00
Julien Valentin
35eb53cc95 add MDI support 2017-08-02 22:10:02 +02:00
Julien Valentin
7f292c3fb5 add resize methods method in CommandArrays (it allows user to work without casting to the concrete class result of MDI.getCommandArray())
move getTotalDataSize in CommandArrays interfaces
comply with other DrawElementsXXX removing parameters in mdi constructors and add several method ( allow use of osgUtil::DrawElementTypeSimplifer on these)
2017-08-02 21:50:25 +02:00
OpenSceneGraph git repository
d4dda546d0 Merge pull request #293 from mp3butcher/MDI6
fix a bug in MDI serializer
2017-08-01 07:54:37 +01:00
Julien Valentin
3965b4e66e fix a bug in MDI serializer 2017-08-01 02:18:15 +02:00
Robert Osfield
fda30b36d1 Merged #pragmatic shader fix from OpenSceneGraph-3.4 branch. 2017-07-31 13:38:18 +01:00
OpenSceneGraph git repository
0df8e78391 Merge pull request #287 from mp3butcher/MDI6
correct a bug and make MDI example more conservative
2017-07-31 08:09:16 +01:00
Julien Valentin
9e9d3cd249 fix a bug : indices pre incremented should be post 2017-07-31 03:15:03 +02:00
Julien Valentin
3537460b0e Add arguments, command line usage and use DrawElementsUInt for classic case 2017-07-31 03:10:19 +02:00
Julien Valentin
aac146c7bc correct a bug and make it more conservative 2017-07-31 02:43:50 +02:00
OpenSceneGraph git repository
5b779ad410 Merge pull request #285 from mp3butcher/MDI6
add a very simple example for mdi with basevertex
2017-07-30 15:40:17 +01:00
Julien Valentin
d810d4a4c0 add a very simple example for mdi with basevertex 2017-07-30 10:28:56 +02:00
Robert Osfield
fc95045259 Updated version number, ChangeLog and AUTHORS file for 3.5.7 developer release 2017-07-28 17:17:25 +01:00
Robert Osfield
d1adb9acbc Added missing break statements 2017-07-28 14:34:59 +01:00
Robert Osfield
3bda71ef15 Improved readability and consistency with the rest OSG by adding/removing spaces and brackets where appropriate. 2017-07-28 14:32:56 +01:00
Robert Osfield
5a946e218f Improved the readability and consistency with the rest of the OSG by inserting/removing spaces and line spacing. 2017-07-28 13:30:36 +01:00
OpenSceneGraph git repository
3076779a14 Merge pull request #267 from kornerr/master
Add osgemscripten example
2017-07-28 10:27:47 +01:00
OpenSceneGraph git repository
af25f14d73 Merge pull request #278 from mp3butcher/MDI2
Mdi
2017-07-28 08:46:30 +01:00
mp3butcher
a45c4c8f39 set DIBO of the drawcommandarray directly in their interface constructor
it makes osggpu use case lighter + drawcommandarray can't exist without a BO
2017-07-27 12:27:55 +02:00
mp3butcher
104b2dfc72 Promote PrimitiveSetIndirect's VBO to a target explicited DIBO (in order to benefit from BOSet queue management) 2017-07-27 12:13:05 +02:00
OpenSceneGraph git repository
a38e46a30f Merge pull request #277 from mp3butcher/MDI2
PrimitiveSetIndirect cleanup + serializers
2017-07-27 10:26:43 +01:00
mp3butcher
7606159a78 add DrawIndirectBufferObject as State variable in order to minimize call to glBindBuffer(GL_DRAW_INDIRECT_BUFFER,X)
TODO: Promote PrimitiveSetIndirect's VBO to target explicited DIBO (in order to benefit from BOSet queue management)
2017-07-27 01:54:25 +02:00
mp3butcher
9b53775840 remove deprecated DrawIndirectBufferBinding 2017-07-27 01:40:04 +02:00
mp3butcher
8742ad8da6 fix some errors during renaming and cleanup code 2017-07-27 01:08:37 +02:00
mp3butcher
b26fa74e7e add untested serializers for PrimitiveSetIndirect 2017-07-26 23:38:20 +02:00
mp3butcher
f27c379b1e some renaming and harmonisations with osg metamodel convention 2017-07-26 23:36:55 +02:00
Robert Osfield
8145791e6f Merge branch 'MDI2' of https://github.com/mp3butcher/OpenSceneGraph into MultiDrawIndirect 2017-07-26 20:46:09 +01:00
mp3butcher
5be14bc2ba first commit for Indirect Draw integration in osg
users will have to implement interfaces for their custom drawcommandarrays
add a lot of new primitive set + few defines
integration is made in osggpucull
2017-07-26 21:20:28 +02:00
Robert Osfield
fcdd3750c2 Replaced FindOurDCMTK.cmake usage with FindDCMTK.cmake 2017-07-26 12:54:37 +01:00
Robert Osfield
e4b4d1aa59 Replaced local FindOurDCMTK.cmake with stock Cmake's FindDCMTK.cmake as the later is now feature complete and has full support for debug and release libraries. 2017-07-26 12:26:38 +01:00
Robert Osfield
9cdeabfbb6 Merged MSVC static build fix from OpenSceneGraph-3.4 2017-07-25 14:56:27 +01:00
Anna Sokol
c32d3eb926 Since version 2.5.1 freetype has supported the WOFF extension format.
In the attached ReaderWriterFreeType.cpp file I added the following line:

            supportsExtension("woff","web open font format");
2017-07-17 16:46:16 +01:00
OpenSceneGraph git repository
f2176a12a7 Merge pull request #270 from caishanli/patch-1
fix StatsHandler crash on windows
2017-07-17 07:53:48 +01:00
Cai Shanli
bdd6817cee fix StatsHandler crush on windows
change static_cast to dynamic_cast to avoid type cast error
2017-07-03 16:24:01 +08:00
Michael Kapelko
f992ec1440 Add osgemscripten example 2017-06-22 09:44:06 +07:00
Robert Osfield
0b5f45289d Updated SO version number to 149 to enable uint64 object length read/writing in the .osgb format 2017-06-19 15:55:42 +01:00
Robert Osfield
83d08b18f8 Added version checks for when writing out new 64bit object sizes 2017-06-19 15:45:35 +01:00
Robert Osfield
605b3619cd Replaced long long with uint64_t 2017-06-19 15:33:52 +01:00
OpenSceneGraph git repository
eab845a4c5 Merge pull request #264 from rickyviking/binaryStreamLargeBlock
BinaryStreamOperator: read and write block size as long long integer
2017-06-19 15:25:04 +01:00
Robert Osfield
9f3533632a Added ability for OSG serializers to get the file version number when writing out via the OutputStream object 2017-06-19 12:04:03 +01:00
OpenSceneGraph git repository
da7a0968be Merge pull request #265 from cxw42/array-classname
Make Array::className() support all Array::Type values
2017-06-19 08:50:00 +01:00
OpenSceneGraph git repository
883567851c Merge pull request #263 from cxw42/build-fix
Still build even if CPACK_GENERATOR is undefined
2017-06-19 08:43:54 +01:00
Robert Osfield
ce7593c799 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-06-19 08:26:24 +01:00
OpenSceneGraph git repository
9ba59eceaa Merge pull request #260 from blobfish/primitiveIndex
Intersections and primitive index
2017-06-19 08:12:47 +01:00
Chris White
eb99df894a Make Array::className() support all Array::Type's
Array::className() had fallen out of date with respect to Array::Type.
This commit updates it, and adds documentation and a debug message to
serve as a reminder for future additions of values to Array::Type.
2017-06-16 11:02:14 -04:00
Riccardo Corsi
eff73bad76 BinaryStreamOperator: read and write block size as long long integer on 8 bytes, to accommodate arbitrarily large block size.
When reading check of file version for backward compatibility.
2017-06-14 16:09:40 +02:00
cxw
dbff652aed Still build even if CPACK_GENERATOR is undefined
Without the quotes around `${CPACK_GENERATOR}`, Windows CMake, generating
for VS2013, would exit with an error because the `STREQUAL` only had one arg.
2017-06-10 22:05:19 -04:00
OpenSceneGraph git repository
ca20eb2cba Merge pull request #261 from cxw42/doxy-osgui
Added osgUI to Doxygen-generated documentation
2017-06-08 07:10:32 +01:00
Chris White
5812c267b1 Added osgUI to Doxygen-generated documentation 2017-06-07 07:50:55 -04:00
blobfish
f5bd280b51 osg: KdTree: count degenerates to keep original primitive index in sync 2017-06-04 17:29:57 -04:00
blobfish
bb804c2045 osg: KdTree: encode original primitive index into _vertexIndices 2017-06-04 17:29:57 -04:00
blobfish
b52bc2bcd1 osgUtil: LineSegmentIntersector: don't increment primitive index until after adding intersection 2017-06-04 17:29:57 -04:00
blobfish
47efc55621 osgUtil: PolytopeIntersector: don't increment primitive index until after adding intersection 2017-06-04 17:29:57 -04:00
blobfish
69e1df6b65 examples: osgkeyboardmouse: add primitive index to LineSegmentIntersector output 2017-06-04 17:29:57 -04:00
OpenSceneGraph git repository
f3c4234f92 Merge pull request #259 from jtorresfabra/fixes_kdtree
Fixes kdtree building
2017-06-02 09:29:05 +01:00
Jordi
8a2f1bc056 Fixes kdtree building 2017-05-31 13:33:37 +02:00
Robert Osfield
8e6a77d216 Added TimeMultiplier and LoopingMode to ImageSequence .osg serializer 2017-05-29 12:24:01 +01:00
Robert Osfield
79e764bd17 Improved support for Text with large numbers of glyphs 2017-05-25 12:38:54 +01:00
Robert Osfield
502acc19c9 Build fix 2017-05-25 09:54:11 +01:00
Robert Osfield
2fe039e349 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-05-25 09:37:30 +01:00
OpenSceneGraph git repository
ccd79d9db1 Merge pull request #258 from kornerr/master
Add x86_64 architecture to iOS simulator
2017-05-25 09:37:26 +01:00
Robert Osfield
badb914d46 Tidied up spacing 2017-05-25 08:56:53 +01:00
Robert Osfield
5f446e0022 Fixed naming of OSG_USE_DEPRECATED_API 2017-05-25 08:48:45 +01:00
Robert Osfield
20ac472d1f Moved OSG_USE_DEPRECATED_API from include/osg/Export to Cmake controlled include/osg/Config 2017-05-24 19:40:08 +01:00
Robert Osfield
8c54a49319 Replaced deprecated API usage 2017-05-24 19:39:36 +01:00
Robert Osfield
a60aed70b5 Replaced DimensionMask naming with more appropriate PrimitiveMask nameing. 2017-05-24 18:36:52 +01:00
Robert Osfield
a201b15648 Added support for PolytopeIntersector::setDimensionsMask. 2017-05-24 18:36:52 +01:00
Robert Osfield
6d46a35900 Aded --dim-mask mask and --dm mask command line option for setting the PolytopeIntersector::setDimensionsMask(). 2017-05-24 18:36:31 +01:00
Michael Kapelko
55d394490a Add x86_64 architecture to iOS simulator 2017-05-24 22:29:19 +07:00
Robert Osfield
47aaca5191 Updated ChangeLog for 3.5.6 dev release 2017-05-19 17:06:36 +01:00
Robert Osfield
90cda8ede2 Refactored COLLADA_BUILDNAME and COLLADA_BOOST_BUILDNAME to resolve case where CMAKE_VS_PLATFORM_TOOLSET is not set. 2017-05-15 14:53:27 +01:00
Robert Osfield
17d39e3db2 From Don Burns, add use of Xinerama to ensure full screen goes across all screens. 2017-05-12 16:26:07 +01:00
Robert Osfield
d02be06df9 Updated AUTHORS file for dev release 2017-05-11 16:32:13 +01:00
Robert Osfield
36f04a04ee Updated ChangeLog 2017-05-11 16:29:45 +01:00
Robert Osfield
9738d19343 Build fix. 2017-05-11 16:27:20 +01:00
Robert Osfield
36bd42b0dd Updated SO_VERSION to reflect API changes to KdTree 2017-05-11 16:10:47 +01:00
Robert Osfield
a74b4b94a9 Fixes/clean up of KdTree/LineSegmentIntersector/PolytopeIntersector 2017-05-11 15:29:31 +01:00
Robert Osfield
6e1866ac18 Added --points and --lines command line options that do a very simplistic conversion of geometry primitives to points or lines respectively, used to aid testing of intersectors 2017-05-11 15:29:31 +01:00
Robert Osfield
03f73d3aad Added --double and --float command line options to enable toggling between double and float precision in intersectors 2017-05-11 15:29:31 +01:00
Robert Osfield
1196e82587 Added missing header 2017-05-11 15:29:31 +01:00
Robert Osfield
40ca018e66 Introduced use of TempaltePrimitiveFunctor and TempaltePrimitiveIndexFunctor as a test of these template classes 2017-05-11 15:29:31 +01:00
Robert Osfield
bc0a402dac Improved indentation, making it consistent with the rest of the OSG headers 2017-05-11 15:25:10 +01:00
Robert Osfield
9ce657f413 Created TemplatePrimitiveIndexFunctor to enable easier handling of point, lines, triangles and quad index meshes 2017-05-11 15:25:10 +01:00
Robert Osfield
c9545970ac Removed redudent bool parameter from TriangleFunctor::operator(Vec3, Vec3, Vec3, bool) so it's now simply TriangleFunctor::operator(Vec3, Vec3, Vec3) as the bool was always false in recently OSG versions. 2017-05-11 15:25:10 +01:00
Robert Osfield
48a3fc30f3 Removed old style OpenGL methods from PrimitiveFunctor classes/templates as these are no longer used or required. 2017-05-11 15:25:10 +01:00
Robert Osfield
e7e372bad2 Added support for using new IntersectFunctor for non kdtree as well as kdtree PolytopeIntersector 2017-05-11 15:25:10 +01:00
Robert Osfield
a7d98f80dc Added ability to pass in command line arguments to the osgkeyboardmouse viewer constructor 2017-05-11 15:25:10 +01:00
Robert Osfield
770a52d354 Implemented the setting of all the PolytopeIntersector::Intersection values on hits detected by KdTree/Polytope intersection codes 2017-05-11 15:25:10 +01:00
Robert Osfield
e03d9f84c6 Moved the Polytope::contains(..) triangle test into PolytopeIntersector to enable customization and optimization. 2017-05-11 15:25:10 +01:00
Robert Osfield
e09dfb93f1 Added group intersection test that covers the window with 10000 tests, activated by pressing 'a'. I have added this to provide a reproducable intersection test for benchmarking. 2017-05-11 15:25:10 +01:00
Robert Osfield
0a651fef7c Added support for outputting the model, filename defaults to model.osgt, to override this use -o filename on command line, and to write the file press 'o' key. 2017-05-11 15:25:10 +01:00
Robert Osfield
8f5493e573 Implemented Polytope::contains(..) for triangle vertices and added support for using the results mask. 2017-05-11 15:25:10 +01:00
Robert Osfield
265efb85a1 Initial work on adding KdTree support for PolytopeIntersector. 2017-05-11 15:25:10 +01:00
Robert Osfield
b77301350b Added --kdtree command line option and associated invocation of KdTreeBuilder to enable benchmarking.
Added timing stats code.
2017-05-11 15:25:10 +01:00
Robert Osfield
728a7f2225 Merge branch 'MultiViewAutoTransform' 2017-05-11 14:35:50 +01:00
OpenSceneGraph git repository
9f9c605422 Merge pull request #252 from remoe/patch-2
Avoid call of SetupThreads in DatabasePager Constructor
2017-05-10 11:18:09 +01:00
OpenSceneGraph git repository
78d232edaf Merge pull request #254 from tomhog/topic-gles3-ios
Topic gles3 ios
2017-05-10 11:13:11 +01:00
OpenSceneGraph git repository
0cc2e1f848 Merge pull request #250 from cxw42/example-osggeometry
Added comments to make code easier to understand. Turned off lighting in examples/osggeometry
2017-05-10 10:54:55 +01:00
Chris White
1f05290982 Added clarifying comments in examples/osggeometry
Per reviewer feedback
2017-05-09 15:51:24 -04:00
Chris White
6df273a865 Turned off lighting in examples/osggeometry
This way you can see the image and the points even if you view them
close to edge-on.
2017-05-09 15:51:24 -04:00
Robert Osfield
8b2f61ec2a Addeed support for GLES shaders 2017-05-08 12:27:07 +01:00
Thomas Hogarth
2ce5238cf7 Added more plugins to iOS example, Textures now working on GLES3 (missed so if defineds) 2017-05-04 18:17:30 +01:00
Thomas Hogarth
fe0b53d7f5 Added more plugins and texture shader to iOS example, fixed a couple of missed if defines for GLES3 2017-05-04 00:24:46 +01:00
Remo E
36eb0e945f Avoid call of SetupThreads in DatabasePager
This solves a bug with some shared library configurations. Sometimes the DatabasePager Singleton is initialised before one can call other configuration options like "setNumOfDatabaseThreadsHint". But OSG initialise it here:

https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgDB/DatabasePager.cpp#L1555 

So this call is not needed?!
2017-04-28 16:51:34 +02:00
Robert Osfield
a95d66a587 Replaced dynamoc_cast<osg::CullStack*> with asCullStack() to improve performance of AutoTransform, screen size based LOD and PagedLOD. 2017-04-26 17:10:58 +01:00
Robert Osfield
92092a56ae Refactored AutoTransform so that it dynamically computes the rotation, scale and matrices during the cull traversal to enable usage in multi-view, multi-threaded applications 2017-04-26 11:50:35 +01:00
Robert Osfield
c5b22f341a Added ability to create windows for each view using -w command line hint. 2017-04-26 09:48:08 +01:00
Robert Osfield
3869714005 Added multiple view support to osgautotransform for testing multi-views 2017-04-25 20:26:26 +01:00
Robert Osfield
a4b0dc7426 Added missing Node::asAutoTransform() + NodeVisitor::apply(AutoTransform&). 2017-04-25 18:04:04 +01:00
Alexander Roan
3dc3dd3bd6 GLExtenstions: fix checking of isFrameBufferObjectSupported flag for GLES2 2017-04-24 10:19:58 +01:00
OpenSceneGraph git repository
7c926db2bd Merge pull request #249 from uhertlein/master
Fixes compiler warning regarding logic vs bitwise AND
2017-04-23 21:23:14 +01:00
Ulrich Hertlein
c5450394b0 RAII memory management for macOS image loading
- use std::vector instead of manual memory management
- removes dead/commented code
2017-04-23 21:38:38 +02:00
Ulrich Hertlein
b26e350e72 Updates the macOS build instructions in README.md.
- Removes obsolete instructions regarding x86_64 vs i386, Cocoa vs Carbon, etc
- Markdown formatting changes
2017-04-23 21:38:37 +02:00
Ulrich Hertlein
e723c6d63b Fixes compiler warning regarding logic vs bitwise AND 2017-04-23 11:52:05 +02:00
Farshid Lashkari
9bc93fb18e There is a small bug in how the FBX importer computes the rotation matrix for nodes. It applies the "RotationOrder" property to the local, pre, and post rotation values. However, the pre/post rotation values should always use a fixed XYZ order. The "RotationOrder" property should only apply to the local rotation value. I've attached the updated file with the fix. 2017-04-18 17:01:26 +01:00
Farshid Lashkari
2523dee7e0 Modified the FBX loader to support bump, specular, and gloss maps. I've attached a zip containing the modified files. 2017-04-18 16:40:56 +01:00
Farshid Lashkari
420d3065f4 When the "ZUp" option was added to the fbx loader, it broke the previous behavior of converting to the OpenGL axis system. I'm referencing the following commit:
c168887e5e

This commit inverted the value of the "fSign" variable, but did not update the previous code that used the variable. I've attached the change that restores the original behavior when not using the "ZUp"
2017-04-18 16:01:58 +01:00
Robert Osfield
d9b62b39e1 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-04-07 17:35:58 +01:00
OpenSceneGraph git repository
a7548794c0 Merge pull request #244 from LaurensVoerman/submit_osgtMissingTextureCrash
fix a crash when reading an osgt file with multiple references to a missing texture.
2017-04-07 17:34:22 +01:00
OpenSceneGraph git repository
004cbb4b78 Merge pull request #245 from LaurensVoerman/submit_dupeEnum
remove info message about GL_LINES_ADJACENCY_EXT / GL_LINES_ADJACENCY
2017-04-07 17:33:25 +01:00
Laurens Voerman
36fc30d8e7 avoid INFO message about duplicate enums with and without _EXT 2017-04-07 15:56:32 +02:00
Laurens Voerman
4bc855b610 fix a crash when reading an osgt file with multiple references to a missing texture. 2017-04-07 15:27:56 +02:00
jamie robertson
f16167c3e8 osgbindlesstext example fix : needed to add "viewer.realize()" before the line "viewer.getCamera()->getGraphicsContext()" in order to get a valid graphics context, before viewer.run() is called. 2017-04-07 07:15:30 +01:00
Robert Osfield
43891d6cc1 Removed unneccessary EXT usage 2017-04-07 07:11:57 +01:00
Jamie Robertson
0e69fe6bc6 VS build fix 2017-04-07 07:09:24 +01:00
Konstantin Matveyev
0f04d2f032 Added dynamic update of Text3D test 2017-04-06 10:51:47 +01:00
OpenSceneGraph git repository
977bd22e36 Merge pull request #243 from mp3butcher/moreExtensions
add Extensions
2017-04-05 17:39:05 +01:00
OpenSceneGraph git repository
4c1634c9d7 Merge pull request #242 from mp3butcher/LuaMatrix
few fixes for lua Matrix support..
2017-04-05 17:37:51 +01:00
mp3butcher
8d40323761 add Extensions 2017-04-05 18:11:50 +02:00
mp3butcher
0993edda11 forgot a lua_pop(_lua, 16) 2017-04-05 17:59:06 +02:00
mp3butcher
912f9e18cb few fixes for Matrix support..
but getElements still fails..
2017-04-05 17:57:08 +02:00
Torben Dannhauer
67ef816da0 Update to FindCollada.cmake to handle Visual Studio 2017 binaries 2017-04-05 12:01:55 +01:00
Robert Osfield
79461d47d6 Updated ChangeLog for dev release 2017-03-31 16:26:46 +01:00
Robert Osfield
b76e031b30 Experiment with transmitting large UDP massages 2017-03-30 18:21:02 +01:00
Robert Osfield
ad0434c415 Added --ifr-name name command line option to enable the broacaster to customize the ifreq.ifr_name 2017-03-30 17:02:37 +01:00
OpenSceneGraph git repository
a30e5df6f2 Merge pull request #238 from filnet/silence_thread_logging
openthread: silence some log output
2017-03-30 15:23:17 +01:00
Robert Osfield
a6baf00956 Reordered command line parsing and replace throw with cout. 2017-03-30 13:21:05 +01:00
Robert Osfield
e2d4ebbe55 Build fixes 2017-03-30 12:55:58 +01:00
Robert Osfield
a292d99308 Build fix 2017-03-30 12:45:25 +01:00
Robert Osfield
80a13f1ac7 Added --address and --port command line parameters to osgoscdevice example 2017-03-30 12:20:45 +01:00
Robert Osfield
c2684ca1f5 Improved the error warning message 2017-03-30 12:18:16 +01:00
Philippe Renon
b843fb19fc openthread: silence some log output 2017-03-30 11:29:53 +02:00
OpenSceneGraph git repository
56cbef8428 Merge pull request #237 from remoe/patch-1
Fix VS2013 build issue
2017-03-29 14:32:59 +01:00
Remo E
3f99ce540f Fix VS2013 build issue
Fix this build issue on VS2013:

```
\src\osg\State.cpp(99): fatal error C1017: invalid integer constant expression
```

I hope this works also on other platforms.
2017-03-29 15:28:09 +02:00
Robert Osfield
1f0515ceff Fix for GL3 2017-03-29 11:38:29 +01:00
Robert Osfield
aeb6005f3b Removed the build of examples as this may be causing timeout build failures 2017-03-29 11:04:03 +01:00
Robert Osfield
cb7140aa04 Fixed windings 2017-03-29 10:02:03 +01:00
OpenSceneGraph git repository
373204ef7f Merge pull request #236 from mp3butcher/ScriptBranch
add ScriptNodeCallback serializer
2017-03-29 09:27:58 +01:00
OpenSceneGraph git repository
545f561d87 Merge pull request #235 from mp3butcher/PrimSetSerilizer
add BufferData associate  as well as revisionassociate in PrimitiveSe…
2017-03-29 09:24:12 +01:00
Robert Osfield
1292724a27 Added Texture2D include to resolve VS build issue 2017-03-29 09:12:14 +01:00
mp3butcher
9d490bbf1c add ScriptNodeCallback serializer 2017-03-28 22:37:34 +02:00
mp3butcher
3142b682f2 remove spaces in the previsouly added macro 2017-03-28 22:19:32 +02:00
mp3butcher
fc3afbe449 oups forgot an associaterevisions 2017-03-28 22:14:44 +02:00
mp3butcher
0555bc4bc7 add BufferData associate as well as revisionassociate in PrimitiveSet Seriliazer 2017-03-28 20:48:35 +02:00
Robert Osfield
eb59590d77 Added handling of large shapes 2017-03-28 18:29:26 +01:00
Robert Osfield
9a786fd8be build fix 2017-03-28 18:03:16 +01:00
Robert Osfield
1691639d17 Fixed build 2017-03-28 17:45:54 +01:00
Robert Osfield
0b844bc72b Added StateSetManipulator to assist with QA. 2017-03-28 16:15:57 +01:00
Robert Osfield
58c52a4cd4 Added TextBase::getMatrix() accessor 2017-03-28 14:43:07 +01:00
Robert Osfield
25e6fbb2ff Fixed typo 2017-03-28 14:42:40 +01:00
Robert Osfield
4f6b6fc5f8 Updated AUTHORS.txt file and Contributors list for 3.5.6 dev release 2017-03-28 11:50:04 +01:00
Robert Osfield
10d87c40db Quiten down debug messages 2017-03-28 11:45:55 +01:00
Robert Osfield
1668bfb3e8 Improved the contributor filters 2017-03-28 11:45:05 +01:00
Robert Osfield
fba1680d24 Updated ChangeLog 2017-03-28 10:37:35 +01:00
Robert Osfield
27c86a4d85 Updated date 2017-03-28 10:33:02 +01:00
Robert Osfield
e8349b69ca Fixed warnings 2017-03-28 10:17:44 +01:00
Robert Osfield
13b5d247df Fixed typo 2017-03-28 09:41:07 +01:00
Robert Osfield
76afbc9bcf Fixed ac plugin's handling of rot primitive in .ac files 2017-03-27 20:30:14 +01:00
Robert Osfield
70e7cb886b Added serializers for BufferObject and BufferData 2017-03-27 20:02:33 +01:00
OpenSceneGraph git repository
11b3424984 Merge pull request #230 from mp3butcher/commitMaster
add new serializers
2017-03-27 15:05:59 +01:00
Robert Osfield
6308b497f2 Replaced macro based selection of which shaders to use by default with DisplaySettings::setShaderHint() and OSG_SHADER=HINT=GL2|GL3|GLES2|GLES3|NONE controls 2017-03-27 11:44:41 +01:00
mp3butcher
96db8033f2 add an include to osg/geometry 2017-03-26 16:26:43 +02:00
mp3butcher
46a37618ef add new serializers 2017-03-26 15:59:36 +02:00
Robert Osfield
ec5cbe18d5 Restructed the marco to resolve Windows build issues 2017-03-25 16:05:57 +00:00
Robert Osfield
1beddd3d29 Fixed file endings 2017-03-23 19:36:01 +00:00
Robert Osfield
b4152d9634 Added simple fallback from osg::Material::apply() when fixed function pipeline is disabled 2017-03-23 14:53:08 +00:00
Robert Osfield
7ccd25a4d5 Fixed missing initializer for _color and assignment of color to ShapeDrawable 2017-03-23 14:40:44 +00:00
Robert Osfield
9848c1d264 First pass at default shader for GLES2,GLES3 and GL3. 2017-03-23 11:09:49 +00:00
Robert Osfield
d70d00607f Removed no longer relevant line 2017-03-23 10:25:25 +00:00
Robert Osfield
717cb182ce Removed hardwaring to online write inine when writing to binary files to allow inline images in asci and binary files 2017-03-23 09:52:21 +00:00
Torben Dannhauer
53a10a7bd9 as preparation for the upcoming 3rdParty package for Visual Studio 2017, I updated Find3rdPartyDependencies.cmake to find also the newest Freetype 2.7.1 release. 2017-03-22 17:27:05 +00:00
Robert Osfield
e74f8f4bbe Added TextureBuffer serializer 2017-03-22 14:20:03 +00:00
OpenSceneGraph git repository
602a6beda8 Merge pull request #225 from MPursche/add_texture2dmultisample_serializer
Added serializer for Texture2DMultisample
2017-03-22 10:31:45 +00:00
Marcel Pursche
422587a285 Added serializer for Texture2DMultisample 2017-03-22 10:47:58 +01:00
Robert Osfield
48aa852f42 Replaced GL_QUADS and GL_QUAD_STRIP usage with indexed GL_TRIANGLES 2017-03-22 09:43:19 +00:00
OpenSceneGraph git repository
429aef3b08 Merge pull request #221 from tomhog/topic-gles3-ios
GLES3 support improvements on iOS
2017-03-21 17:56:39 +00:00
Robert Osfield
1778a2a6fb Made VAO the default for GL3 builds.
Improved the handling of DisplaySettings::getVertexBufferHint() values.
2017-03-21 15:38:52 +00:00
tomhog
423e14f92f Merge branch 'master' into topic-gles3-ios 2017-03-21 15:33:13 +00:00
OpenSceneGraph git repository
5d6322da2b Merge pull request #224 from MPursche/improved_debian_packages
Improved CPack configuration for building debian packages
2017-03-21 14:43:09 +00:00
Robert Osfield
a74872c6bf Refactored GlyphTexture so that it utlizes standard osg::Texture2D/osg::Image combinations rather than locally implemented per glyph subloading. 2017-03-21 13:10:45 +00:00
Thomas Hogarth
bd2d9a7fed Merged origin 2017-03-20 19:43:07 +00:00
Thomas Hogarth
630af80635 Adusted Font shaders to use gl3 path on gles3, iphone example using inbuilt shaders 2017-03-20 19:35:01 +00:00
Thomas Hogarth
b493657c47 Shaders now using vertex colors 2017-03-20 18:39:56 +00:00
Thomas Hogarth
74abb99b0e small compile fix for ios viewer example gles1 2017-03-20 18:39:56 +00:00
Thomas Hogarth
2ec6624816 updated ios build instructions in readme 2017-03-20 18:39:56 +00:00
Thomas Hogarth
7ba2e728cd GLES3 now working on iOS, tried to maintain support for have bother gles2 and gles3, allowed avfoundation to be added on iOS, improved iOS example cmake generation 2017-03-20 18:39:56 +00:00
Thomas Hogarth
3a6e28da9c More gles3 tweaks 2017-03-20 18:39:56 +00:00
Thomas Hogarth
76fe572934 Added conditionals for GLES3, added correct gl headers for GLES3 on iOS and Android to GL.in 2017-03-20 18:33:08 +00:00
Marcel Pursche
1bf303e566 Improved cpack configuration for building debian packages:
* Added configurable maintainer
* Added configurable dependencies and conflicts per package
* Added post install script to run ldconfig after package is installed
* Updated name of readme file in cpack configuration
2017-03-20 16:31:09 +01:00
Robert Osfield
6670a6e070 Improved support for stats, fonts and shadergen for GLES2, GLES3 and GL3 2017-03-20 14:07:14 +00:00
Robert Osfield
e0592b6d11 Added shader for GL3/GLES/GL2/GL2 2017-03-20 10:31:58 +00:00
Robert Osfield
4498945b98 Quited debug messages 2017-03-20 09:25:49 +00:00
Robert Osfield
266b57c821 Removed no longer required GL3 shaders as osgText itself now provides shaders 2017-03-18 18:09:12 +00:00
Robert Osfield
c7711fd2d4 Added support for GL3/GLES3, GL2,GLE2 shaders to osgText::Font/Text. 2017-03-18 18:08:12 +00:00
Thomas Hogarth
4578b32364 Shaders now using vertex colors 2017-03-18 17:35:00 +00:00
Robert Osfield
279cc82a01 Improved readability of code 2017-03-18 11:48:55 +00:00
Robert Osfield
2ef8f00e91 Fixed GL3 core profile and shandard shaders to work with new osgText 2017-03-18 11:48:55 +00:00
Robert Osfield
943beb220d Improved handling of osgText::Text with and wihout shaders 2017-03-18 11:48:55 +00:00
Robert Osfield
e6703e3cb0 Removed no longer supported code paths 2017-03-18 11:48:55 +00:00
Robert Osfield
feb0214ddc Introduced streamlined text rendering dispatch code. 2017-03-18 11:48:55 +00:00
OpenSceneGraph git repository
2cefcc8bfc Merge pull request #220 from rickyviking/addPenInputWin32
Added PEN input support to GraphicsWindowWin32 with the WM_POINTER*
2017-03-18 11:17:03 +00:00
Thomas Hogarth
896d9a4ee5 small compile fix for ios viewer example gles1 2017-03-18 07:46:14 +00:00
Thomas Hogarth
2841d78653 updated ios build instructions in readme 2017-03-18 07:32:17 +00:00
Thomas Hogarth
c7af72daae GLES3 now working on iOS, tried to maintain support for have bother gles2 and gles3, allowed avfoundation to be added on iOS, improved iOS example cmake generation 2017-03-18 06:53:32 +00:00
Thomas Hogarth
1deaac7508 More gles3 tweaks 2017-03-17 18:03:18 +00:00
Thomas Hogarth
eea3d559a7 Added conditionals for GLES3, added correct gl headers for GLES3 on iOS and Android to GL.in 2017-03-17 18:03:18 +00:00
Robert Osfield
44e303ad90 Added explict call to state.applyModelViewAndProjectionUniformsIfRequired() when required for better GL3/GlES2 support. 2017-03-16 15:46:51 +00:00
Riccardo Corsi
b3ccf02e06 Added PEN input support to GraphicsWindowWin32 with the WM_POINTER* framework available since Windows 8.
Fallback on existing WM_TOUCH implementation for actual touch inputs.
2017-03-16 15:32:05 +01:00
Robert Osfield
5f407b3cc4 Added experimental --shaders path into osgtext example to test out using shaders for text rendering. 2017-03-14 10:43:52 +00:00
Robert Osfield
2c2097ce24 Replaced GL_QUADS usage with GL_TRIANGLES to aid portability. 2017-03-13 17:46:51 +00:00
OpenSceneGraph git repository
ce0fbabb4e Merge pull request #207 from LaurensVoerman/submitOpenCascade
fix OpenCascade library list for use with shared libs; added list and…
2017-03-13 15:01:08 +00:00
OpenSceneGraph git repository
c364bbb19b Merge pull request #215 from LaurensVoerman/submit-SerializerParticle
Submit serializer particle
2017-03-13 14:25:33 +00:00
Laurens Voerman
75e6889366 fix OpenCascade library list for use with shared libs; added list and options for static lib 2017-03-13 12:54:02 +01:00
Robert Osfield
ffbc1167de Added lazy state updating for vertex array object binding/unbinding 2017-03-13 11:44:34 +00:00
Laurens Voerman
a2ce0a0e0f bugfix: read endbracket for fileversion 145 (introduced 25/8/2016) 2017-03-13 09:27:08 +01:00
OpenSceneGraph git repository
a6453ad877 Merge pull request #198 from scrawl/buildswitch
Add cmake options for disabling plugins from the build
2017-03-11 17:31:27 +00:00
OpenSceneGraph git repository
f1f6d23eeb Merge pull request #213 from marchelbling/bug/osg-fixes
Bug/osg fixes
2017-03-11 15:08:57 +00:00
Robert Osfield
61782d8f29 Build fixes 2017-03-11 12:31:19 +00:00
OpenSceneGraph git repository
75e4d85681 Merge pull request #211 from D-A-Heitbrink/master
Added support for unsigned 64 bit ints + some code for bindless textures
2017-03-11 11:58:20 +00:00
OpenSceneGraph git repository
8dd22d9178 Merge pull request #208 from LaurensVoerman/submitRWlas
rewrote las plugin to read in a single pass: more speed, better precision
2017-03-11 11:37:33 +00:00
OpenSceneGraph git repository
58b9f5208f Merge pull request #206 from LaurensVoerman/submitLAScmake
allow library names liblas.lib and liblas_c.lib;fix include dirs typo…
2017-03-11 11:36:31 +00:00
OpenSceneGraph git repository
fea86426ed Merge pull request #205 from LaurensVoerman/submitGTAcmake
GTA: use normal cmake search if PKG_CHECK_MODULES fails; fix win32 debug lnk
2017-03-11 11:35:36 +00:00
OpenSceneGraph git repository
36e0fd8f5a Merge pull request #204 from LaurensVoerman/submitFBX2017
added FBX SDK 2017.1 and try to add apple (clang) support.
2017-03-11 11:34:56 +00:00
OpenSceneGraph git repository
1d8efb1a3a Merge pull request #203 from scrawl/optimizer
MergeGeometryVisitor fix
2017-03-11 11:34:16 +00:00
OpenSceneGraph git repository
50649fb2a2 Merge pull request #202 from nicokruithof/master
Fixed typo
2017-03-10 17:47:02 +00:00
Robert Osfield
a4b1a4ce29 Fixed handling of VAO's Text with backdrop and per vertex colours 2017-03-10 17:06:04 +00:00
Robert Osfield
0eb0656d52 Improved handling of backdrops 2017-03-10 12:08:22 +00:00
Robert Osfield
5b78e334a9 Improved the management of the unbinding of VBO's and EBO's 2017-03-09 18:17:53 +00:00
Robert Osfield
445f2bfe21 Reordered operations to make code easier to follow 2017-03-09 18:16:04 +00:00
Robert Osfield
91564e36b0 Cleaned up VertexArrayState handling 2017-03-09 17:48:06 +00:00
Robert Osfield
7f3f995c56 Improved handling of VBO/VAO's in Text3D 2017-03-09 17:47:27 +00:00
Robert Osfield
2cad221d80 Cleaned out old code paths 2017-03-09 17:33:38 +00:00
Robert Osfield
96760970ed Added setDataVariance(DYNAMIC) to stats text labels that are dyanmically updated. 2017-03-09 17:01:33 +00:00
Robert Osfield
7868909f43 Improved the handling of array updates and support for VBO and VAO's. 2017-03-08 18:15:06 +00:00
Robert Osfield
854dac5340 Improved the checks against VBO+VAO usage and cleaned up setup. 2017-03-08 18:12:37 +00:00
Robert Osfield
9b32395772 Added --counter test 2017-03-07 13:35:03 +00:00
Robert Osfield
fee826412c Added --plain test to simply basic text testing 2017-03-07 09:13:29 +00:00
Laurens Voerman
15a90f63b8 fix bug in osgb/osgt/osgx readerwriter causing the osgParticle-SizeInterpolator and -ColorInterpolator to dissapear 2017-03-06 15:43:32 +01:00
Robert Osfield
26878fa7ab Fixed text background tessellation 2017-03-06 14:37:21 +00:00
Laurens Voerman
8743c18c5a rewrote las plugin to read in a single pass: more speed, compressed file (.laz) support and better precision. 2017-03-06 14:23:17 +01:00
Marc Helbling
e906465dcb Fix commented variable assertions in inventor writer 2017-03-06 14:08:27 +01:00
Marc Helbling
18826a9ebc Fix implicit ref_ptr conversions 2017-03-06 14:08:27 +01:00
Marc Helbling
4627821e79 Revert bad change in 3ds reader 2017-03-06 12:29:19 +01:00
Marc Helbling
a97cdebe11 Remove unused offset attribute in MergeArrayVisitor 2017-03-06 12:25:48 +01:00
Marc Helbling
c765b0b62d Add missing type for attribute merge 2017-03-06 12:25:23 +01:00
Robert Osfield
bb754b6f0a Moved all vertex array set up to start of Text/Text3D::drawImplementation(). 2017-03-04 17:20:54 +00:00
Robert Osfield
b88be0fbda Implemented better handling of VertexBufferObjects and ElementBufferObjects in osgText 2017-03-03 18:31:51 +00:00
Robert Osfield
59931d1591 Removed unneccessary mutable usage 2017-03-02 17:05:24 +00:00
Robert Osfield
1e36a12a17 Updated Attribute and PrimitiveFunctor implementations 2017-03-02 16:33:09 +00:00
Robert Osfield
a69216a79d Refactored osgText::Tex3D to use a single vertex and normal arrays and a combined set of primitive sets. Deprecated Text3D::RenderMode as it's no longer used. 2017-03-02 16:11:10 +00:00
Robert Osfield
4721651dbe Added NEW_APPROACH code path that merges the separate GlyphGeometry arrays and primitives into a single set of arrays and primitives 2017-03-02 11:12:55 +00:00
d-a-heitbrink
cfaf72bc56 removed some of the hard coded options in the main funct. 2017-03-01 18:12:46 -06:00
d-a-heitbrink
7b3fc0925c Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-03-01 16:12:49 -06:00
D-A-Heitbrink
69b8d01de6 Add files via upload 2017-03-01 15:33:19 -06:00
Robert Osfield
f233005988 Merged the decoration vertices with the same vertex arrays used for text glyphs 2017-03-01 16:43:05 +00:00
Robert Osfield
f4966a96d4 Replaced hardwired glDrawArrays calls with use of osg::DrawElementsUshort. 2017-03-01 11:51:27 +00:00
scrawl
23cad1eedd Update travis-ci to use the new more flexible BUILD_OSG_PLUGINS_BY_DEFAULT 2017-02-28 22:56:42 +01:00
scrawl
c1dd0eb348 Add CMake options to control which osgPlugins/ are built 2017-02-28 22:56:42 +01:00
Robert Osfield
256441906f Removed unused member variable 2017-02-28 17:12:58 +00:00
Robert Osfield
1290f1584a Removed old Text::GlyphQuads array code paths 2017-02-28 17:02:02 +00:00
Robert Osfield
138af70bd8 Merged the Text::GlyphQuads cooordinate arrays 2017-02-28 16:34:33 +00:00
Robert Osfield
e5685dfca5 Removed old code paths 2017-02-27 15:15:37 +00:00
Robert Osfield
80c96cd54f Added option for combining the GlyphQuad::backdropcoords into the GlyphQuad::coords. 2017-02-27 11:53:42 +00:00
Robert Osfield
0ec204f6e4 Added StateSetManipulator to osglogo. 2017-02-27 10:47:14 +00:00
Robert Osfield
8adbf322a0 Scaled back the primitives sets set up so they match the requirements of the osgText::Text accordinging to the BackdropType 2017-02-24 18:25:16 +00:00
Robert Osfield
a84a6bd309 Moved glyph quad setup into dedicated method 2017-02-24 17:08:48 +00:00
Laurens Voerman
ef01913b9a allow library names liblas.lib and liblas_c.lib;fix include dirs typo; link only liblas_c in plugin. 2017-02-24 16:21:20 +01:00
Laurens Voerman
f8ed554ddb use normal cmake search if PKG_CHECK_MODULES fails; fix win32 debug linking with SET(TARGET_LIBRARIES_VARS GTA_LIBRARY) 2017-02-24 16:09:13 +01:00
Laurens Voerman
0f899a2a1e added FBX SDK 2017.1 and try to add apple (clang) support (not tested - I have no apple) 2017-02-24 15:54:07 +01:00
Robert Osfield
cefecaec10 Removed unused lineNumber 2017-02-24 11:17:22 +00:00
Robert Osfield
aa621e1a4a Grouped GlyphQuad setup 2017-02-24 11:08:15 +00:00
Robert Osfield
4c032723ba Fixed indentation 2017-02-24 10:40:52 +00:00
Robert Osfield
93f28d4eee Moved to use of single vector of DrawElementsUShort for backdrops and foreground text quads 2017-02-24 10:07:01 +00:00
scrawl
c9621ff17a Add missing copy of callbacks when a Transform is replaced by Group 2017-02-24 07:41:19 +01:00
scrawl
7e2436aba9 Change the order of optimizations to allow for the possibility of merging Geometries that have just become siblings after the removal of redundant nodes 2017-02-24 01:09:09 +01:00
scrawl
ef431eec29 Fix unused parameter warning 2017-02-24 01:07:24 +01:00
scrawl
e0f7d3241a Fix MergeGeometryVisitor to work with a Group instead of Geode 2017-02-24 01:05:57 +01:00
scrawl
a918306a99 Use asDrawable()/asNode() over dynamic_cast in the Optimizer 2017-02-24 01:00:49 +01:00
Robert Osfield
22b8a5cc0f Added missing relaseGLObjects()/resizeGLObjects().
Reordered calls to make it easier to read and see patterns.
2017-02-23 18:36:35 +00:00
Robert Osfield
b5048d3b74 Cleaned up types 2017-02-23 18:14:36 +00:00
Robert Osfield
8ff17ddf52 Restructed and unified the position computation 2017-02-23 15:45:43 +00:00
Robert Osfield
7b3ecefcfc Removed the old code paths 2017-02-22 14:14:03 +00:00
Robert Osfield
f816436771 Removed the unncessary array. 2017-02-22 12:41:45 +00:00
Robert Osfield
04d23659b3 Added the option for changing the type of the GlyphQuads::Coords 2017-02-22 12:07:43 +00:00
Nico Kruithof
ec2cb81c65 Fixed typo
osg_ModeViewMatrix -> osg_ModelViewMatrix
2017-02-21 21:55:05 +01:00
Robert Osfield
f8dc5c4988 Fixed FadeText when using NEW_APPROACH 2017-02-21 17:47:54 +00:00
Robert Osfield
cd991eaa97 Refactored the computation of the transforms for the osgText::Text 2017-02-21 17:07:53 +00:00
OpenSceneGraph git repository
ad0e6a0f81 Merge pull request #201 from blobfish/moreManipSlop
osgManipulator: Constraint: snap_point_to_grid wants Vec3d instead of Vec3
2017-02-18 10:38:31 +00:00
blobfish
d3a925e675 osgManipulator: Constraint: snap_point_to_grid wants Vec3d instead of Vec3 2017-02-16 10:37:03 -05:00
Robert Osfield
378809f3a8 Added osgvolume command line option "--bg r g b a" to enable customization of the window background colour 2017-02-13 16:53:37 +00:00
scrawl
94061aa9fb Add CMake option to not build deprecated serializers 2017-02-07 20:23:14 +01:00
OpenSceneGraph git repository
71bf79cf6f Merge pull request #197 from scrawl/geodefix
More fixes for Geode/Drawable handling in visitors
2017-02-03 18:03:13 +00:00
scrawl
6deefe0646 Remove seemingly redundant handling of Geode in GLObjectsVisitor 2017-02-03 18:10:37 +01:00
scrawl
fdf6d55b9d Fix handling of in-scenegraph Drawables in osgShadow 2017-02-03 18:08:16 +01:00
scrawl
e38c3d0303 Fix handling of in-scenegraph Drawables in SmoothingVisitor, TriStripVisitor and GraphicsCostEstimator 2017-02-03 17:55:55 +01:00
scrawl
4e1a2d3246 Fix handling of in-scenegraph Drawables in ShaderGenVisitor 2017-02-03 17:51:03 +01:00
scrawl
e48aa118b6 Fix handling of in-scenegraph Drawables in MeshOptimizers 2017-02-03 17:48:18 +01:00
scrawl
9403a4c949 Fix unused parameter warning 2017-02-03 17:45:22 +01:00
scrawl
c901694290 Fix handling of in-scenegraph Drawables in DrawElementTypeSimplifier 2017-02-03 17:43:42 +01:00
scrawl
853418db94 Remove redundant handling of Geode in DisplayRequirementsVisitor 2017-02-03 17:42:21 +01:00
scrawl
a858b2a2cd Add a comment explaining some confusing code in UpdateVisitor and EventVisitor 2017-02-03 17:39:56 +01:00
scrawl
09ca132102 Remove redundant handling of Geode in SharedStateManager 2017-02-03 17:35:40 +01:00
scrawl
a13b66135f Fix handling of in-scenegraph drawables in osgUtil::Simplifier 2017-02-03 17:35:40 +01:00
OpenSceneGraph git repository
5592cb427b Merge pull request #196 from LaurensVoerman/travisCI
split travis-ci apple build into two jobs to avoid job time limit.
2017-02-03 14:27:01 +00:00
Laurens Voerman
7b67ef0c6f split travis-ci apple build into two jobs to avoid job time limit. 2017-02-03 10:01:15 +01:00
OpenSceneGraph git repository
e6822eb1a5 Merge pull request #193 from kjean667/multi_view_shared_context_fix
Bug fix to not crash when using shared context and adding / removing windowed views dynamically
2017-02-03 08:50:01 +00:00
Kjell Andersson
f5483b0ad6 Bug fix to not crash when using shared context and adding / removing windowed views dynamically.
The GLExtension object is now reused instead of creating a new when allocating a state on the same ContextID. The static map that stores the GLExtensions is only reset when all references to the extension object are released.
2017-02-02 11:46:16 +01:00
OpenSceneGraph git repository
2a7d72c203 Merge pull request #191 from LaurensVoerman/glExtentions
GLExtensions.cpp: Fixed a few typo's in old function names.
2017-01-27 15:15:39 +00:00
Laurens Voerman
9183f275f5 Fixed a few old function names.
Check extensions trough extermination string - not by function pointer value.
Added a few validContext tests to ensure no functions or isExterntionSupported bool is set for an non valid context.
Remove duplicates / merge some lines.
Removed "GL_APPLE_texture_2D_limited_npot" form isNonPowerOfTwoTextureMipMappedSupported.
2017-01-25 17:05:56 +01:00
Robert Osfield
23da167c27 Fixed linking bug caused by repeated Program::addShader()/removeShader() operations invalidating the internal attach/dettech lists. 2017-01-24 17:36:36 +00:00
OpenSceneGraph git repository
d1e162a61f Merge pull request #190 from scrawl/optimizer
Optimizer fixes
2017-01-24 09:27:07 +00:00
OpenSceneGraph git repository
00984d0e77 Merge pull request #189 from marchelbling/master
osgjs/gles updates
2017-01-24 09:15:26 +00:00
scrawl
f13fbff251 Remove CheckGeometryVisitor which was a no-op 2017-01-20 23:02:15 +01:00
scrawl
4a05caf4f7 MakeFastGeometryVisitor: fix handling of Geometries that are directly in the scene graph not attached to a Geode 2017-01-20 23:01:04 +01:00
scrawl
833f37ea57 StateVisitor: remove redundant code for Geode handling 2017-01-20 22:49:17 +01:00
scrawl
f229b19496 TessellateVisitor: fix handling of Geometries that are directly in the scene graph not attached to a Geode 2017-01-20 22:47:51 +01:00
scrawl
41cbf9a45e FlattenStaticTransformsVisitor: fix handling of Drawables that are directly in the scene graph not attached to a Geode 2017-01-20 22:43:58 +01:00
scrawl
ff1a9a195a StaticObjectDetectionVisitor: make use of apply(Drawable) visitor function 2017-01-20 21:48:45 +01:00
scrawl
764b2f60c6 TextureAtlasVisitor: fix handling of Drawables that are directly in the scene graph not attached to a Geode 2017-01-20 21:47:21 +01:00
scrawl
dc2689f779 TextureVisitor: remove redundant code for Geode handling 2017-01-20 21:47:13 +01:00
scrawl
4457df9a8a RemoveEmptyNodesVisitor: add missing isOperationPermissible check 2017-01-20 21:46:46 +01:00
scrawl
7611f95078 RemoveEmptyNodesVisitor: remove redundant code for Geode handling 2017-01-20 21:46:03 +01:00
Robert Osfield
33f7500a59 Quitened down verbose debug messages 2017-01-20 17:31:09 +00:00
Robert Osfield
e5b493289d Quitened down debug messages 2017-01-20 17:24:49 +00:00
Robert Osfield
ed596c3335 Quietened down some verbose debug messages 2017-01-20 17:07:55 +00:00
Marc Helbling
c84b667fa5 Updates osgjs from sketchfab
* updates uservalue serialization (avoid creating multie UserDataContainer for a same object)
* removes vec4ubarray specific serialization (serialization should not enforce the previous color transformation)
2017-01-20 15:17:16 +01:00
Marc Helbling
7cd7618e8c Updates gles from sketchfab
* fixes bbox issue for animated scenes
* fixes geometry split (perf + line/point primitive management)
* removes degenerated faces
2017-01-20 15:15:31 +01:00
Robert Osfield
10b6f7aa47 Fixed indentation of comment 2017-01-19 15:56:57 +00:00
Robert Osfield
255a86cbe2 Added public accessors 2017-01-17 10:52:26 +00:00
Robert Osfield
771efca5c6 Removed unused class 2017-01-16 17:18:58 +00:00
d-a-heitbrink
98e0b7e41c missing CMakeLists 2017-01-13 09:57:32 -06:00
d-a-heitbrink
3d2f4ea404 Added support for Bindless texture extension,
64 bit uniforms, 64 bit buffers
Added new bindless texture example
2017-01-13 09:56:42 -06:00
d-a-heitbrink
18369bed2d added code to deal with #extension for shader, added int64 and uint64 support 2017-01-13 09:33:49 -06:00
OpenSceneGraph git repository
fee45b7c46 Merge pull request #186 from hwiesmann/master
Addition of documentation for LOD and PagedLOD
2017-01-08 14:41:51 +00:00
Robert Osfield
1af1b4dfda Fixed smallTile test as it was checking against <=2^14 rather than <2^16 which is more conservative than required for a ushort container 2017-01-07 13:03:22 +00:00
Hartwig
5e0b3dacc6 Replaced tabs with spaces 2017-01-07 13:54:21 +01:00
Hartwig
2937268d53 Merge remote-tracking branch 'origin/master' into my_master 2017-01-07 10:39:29 +01:00
Hartwig
7c1098c843 Addition of documentation for LOD and PagedLOD
Documentation has been added for their default constructors. Furthermore, the consequences of different center modes have been explained. A comment regarding the setting of the radius has been fixed.
2017-01-07 09:20:56 +01:00
OpenSceneGraph git repository
3cccdaddab Merge pull request #184 from hwiesmann/master
BUG FIX - Wrong calculation of terrain normals in GeometryTechnique
2017-01-04 13:22:22 +00:00
Robert Osfield
b5c4f461bc Fixed unitialized variable access to premature calling of computeMatrix(). 2017-01-04 12:55:15 +00:00
Hartwig
192dcec5f9 Blending out of local functions
Some local functions are only needed for OS X compatibility. Define these functions only for OS X versions older than 10.6.
2017-01-01 16:33:37 +01:00
Hartwig
3c482467ea BUG FIX - Wrong calculation of terrain normals
The partial derivative for the x-coordinate has been wrongly calculated: only a single sided derivative was calculated.
2016-12-29 21:43:20 +01:00
OpenSceneGraph git repository
d36302cb0c Merge pull request #183 from rickyviking/master
Additional info when fail to load images
2016-12-23 17:23:07 +00:00
Robert Osfield
52fe86dcc9 From Hartwig Wiesmann, "ScalarsToColors returns a wrong color in case a value larger max is passed to getColor" 2016-12-23 17:16:16 +00:00
Riccardo Corsi
a526cab590 InputStream::readImage() : added info about which file failed to load when printing error message 2016-12-23 11:55:08 +01:00
OpenSceneGraph git repository
dc13d4d5dc Merge pull request #182 from LaurensVoerman/fileStats
added some info about dynamic drawables and transparent bin to Statistics
2016-12-21 17:16:30 +00:00
Robert Osfield
0052a650b8 From Torben Dannhauer, build updates for NVTT. 2016-12-21 17:02:05 +00:00
Robert Osfield
45e1523a09 From Torben Dannahauer, updates to track changes to Winddows 3rd party package 2016-12-21 16:29:38 +00:00
Robert Osfield
28799b1ff6 Refactored the minimum width of bars. 2016-12-21 16:11:39 +00:00
OpenSceneGraph git repository
2b8bcf5475 Merge pull request #180 from LaurensVoerman/stats_bars
improve stats display
2016-12-21 16:04:24 +00:00
Laurens Voerman
7a39857ea7 added some info about dynamic drawables and transparent bin to Statistics 2016-12-21 16:58:02 +01:00
OpenSceneGraph git repository
960672d093 Merge pull request #181 from LaurensVoerman/DebugFPS
DEBUG FPS counter in red and named "DEBUG Frame Rate:"
2016-12-21 15:55:50 +00:00
OpenSceneGraph git repository
bf3def9303 Merge pull request #179 from LaurensVoerman/ktx_write_support
ktx write support
2016-12-21 15:54:20 +00:00
Robert Osfield
43e506a843 From Torben Dannhauer, "When compiling OSG with DCMTK on windows, it throws an compiler error due to a missing ws2_32.lib in the linker settings." 2016-12-21 15:33:02 +00:00
Robert Osfield
b950c428a6 From Vladimir Chebaev, "Dynamic linking of fbx plugin and fbx SDK" 2016-12-21 15:13:49 +00:00
Laurens Voerman
a9657bf5e8 DEBUG FPS counter in red and named "DEBUG Frame Rate:" 2016-12-21 15:58:09 +01:00
Laurens Voerman
f567d4702d improve stats display 2016-12-21 15:47:04 +01:00
Laurens Voerman
c06c57e0db ktx write support 2016-12-21 15:21:44 +01:00
Robert Osfield
5b52f8ca67 Removed debug output 2016-12-21 13:46:18 +00:00
Robert Osfield
723849c57c From Andreas Ekstrand, "he attached ESRIShape.cpp contains a small fix in parsing of PointZ features, now correctly comparing with header content length which is defined in 16-bit words.
This should have been fixed in my old submission from 2012 but was probably overlooked due to an alternative way of comparing to a fix number for this feature type.

Without this fix, the plugin will only read one PointZ feature even if multiple features exist."
2016-12-21 11:41:36 +00:00
Robert Osfield
9478d27263 Changed Program::apply() to Program::compileGLObjects() to avoid the Program::apply() setting of setLastAppliedProgramObjects for affect current state. 2016-12-21 11:02:29 +00:00
Robert Osfield
ff8b5536a5 Added StateSet::setGlobalDefaults() to fix bug when osgViewer has stats on but no scene graph assigned 2016-12-21 09:10:50 +00:00
Robert Osfield
38c515a600 Fixed handling of #define's that are used as functions 2016-12-16 16:16:50 +00:00
OpenSceneGraph git repository
ca6578026a Merge pull request #174 from etlapale/obj_plugin_improvements
Improvements for the OBJ writer plugin
2016-12-13 11:42:57 +00:00
Émilien Tlapale
34fb582074 Uncommenting missing argument. 2016-12-13 11:56:06 +01:00
Robert Osfield
d57a67e31c Added header 2016-12-13 10:47:12 +00:00
Émilien Tlapale
d0fb365e25 Adding configurable precision for OBJ output. 2016-12-13 10:58:46 +01:00
Émilien Tlapale
f16853c7bb Support for stateset in groups for OBJ. 2016-12-13 10:57:42 +01:00
Robert Osfield
d6c245a2f3 Added create angle of 20 degrees to SmoothingVisitor to improve visual quality.
Added geometry.setUseVertexBufferObjects(true) to geometry set up for improved performance.
Refactored the color set up so that by default it assigns just a single color to the geometry to improve performance.
2016-12-12 10:23:50 +00:00
Robert Osfield
3432f02d5f Renamed the iges plugin to OpenCASCADE to make it clearer what the plugin is, and added file extension aliases for stp, step, igs and iges to the OpenCASCADE plugin to enable automatic loading. 2016-12-09 17:52:17 +00:00
Robert Osfield
61462dcf97 Added support for reading from STEP (.stp) files. 2016-12-09 17:29:55 +00:00
Robert Osfield
5f0f7b88cf Refined the list of libraries to link 2016-12-09 17:29:20 +00:00
Robert Osfield
2b1477234e Converted to unix line endings 2016-12-09 17:27:17 +00:00
OpenSceneGraph git repository
811ad9c8bc Merge pull request #172 from blobfish/manipSlop
osgManiputor: TranslateInLineCommand wants Vec3d instead of Vec3
2016-12-08 17:52:46 +00:00
blobfish
a41f498e1f osgManiputor: TranslateInLineCommand wants Vec3d instead of Vec3 2016-12-08 10:12:17 -05:00
OpenSceneGraph git repository
bb36fe7d3c Merge pull request #170 from crubel/PThreadPullRequest
Fixed compile time errors that occur when you have ALLOW_PRIORITY_SCHEDULING defined
2016-12-05 10:33:23 +00:00
Curtis Rubel
98827b1d49 Missed the printf define at the top of this file.
Put back this:
#ifdef DEBUG
# define DPRINTF(arg) printf arg
#else
# define DPRINTF(arg)
#endif

I think that should do it now...
2016-12-02 08:07:15 -05:00
Curtis Rubel
c829ecf08f Removed all OSGNOTIFY messages and put back all printf output as requested.
Sorry about this mixup, I was not aware that this particular directory was to be considered a separate project and must not rely on any dependencies from the rest of the OSG project.  All OSGNOTIFY messages have been removed and the previous printf statements have been put back.
2016-12-02 08:05:30 -05:00
OpenSceneGraph git repository
98f6984018 Merge pull request #171 from aluaces/iges_fix
Several tweaks for compiling OpenCascade plugin:
2016-12-02 08:04:10 +00:00
Alberto Luaces
b637d080d5 Several tweaks for compiling OpenCascade plugin:
* Remove unneeded XSDRAW.hxx header inclusion.
* Define WNT only on windows, because it is used for choosing between
  win threads or pthreads.
2016-12-01 23:39:56 +01:00
Curtis Rubel
fab6bff310 Fixed compile time errors that occur when you have ALLOW_PRIORITY_SCHEDULING
defined.  I also replaced all printf's with OSGNOTIFY to get this
more inline with the rest of OSG CGR
2016-12-01 16:36:20 -05:00
Robert Osfield
43b051b984 Teaking FindOpenCascade to help with linking of iges plugin 2016-11-30 20:10:22 +00:00
Robert Osfield
a9bc508dc4 From Abhishek Bansal, with ammendemts by Robet Osfield to get working with recent OpenCascade and usng CMake. 2016-11-30 19:11:15 +00:00
Robert Osfield
d4a4993285 Added GL_EXT_texture_border_clamp support for GLES 2016-11-30 17:18:33 +00:00
OpenSceneGraph git repository
5a96c1313b Merge pull request #169 from scrawl/stateset-fix
Fix flow control issue in StateSet::compileGLObjects
2016-11-26 11:45:07 +00:00
scrawl
1fffafb13a Fix typo in StateSet::compileGLObjects, causing compilation of attributes to not be executed unless checkForGLErrors is true. 2016-11-26 01:09:45 +01:00
Robert Osfield
b04271f93e Fixed crash in handling of an osg::Callback attached to a Drawable as update callback.
Added handling of osg::Callback when attavhed to a Drawable as a cull callback.
2016-11-23 18:19:59 +00:00
Robert Osfield
e89885a076 Added guards against division by zero 2016-11-15 17:36:21 +00:00
Robert Osfield
55f4778731 Added usage of GLExtensions::debugObjectLabel() to GLBufferObject::compile() 2016-11-15 14:52:59 +00:00
Robert Osfield
1abd99f084 Added support for glObjectLabel debugging 2016-11-15 14:35:47 +00:00
Robert Osfield
4ecf541cb6 Merge branch 'fredowski-master' 2016-11-15 11:16:53 +00:00
Robert Osfield
2f570ca3a9 Improved the indentation and case to make the code more consistent and readable 2016-11-15 11:16:03 +00:00
Robert Osfield
5aa897b5fd Merge branch 'master' of https://github.com/fredowski/OpenSceneGraph into fredowski-master 2016-11-15 11:13:37 +00:00
Robert Osfield
137b596943 Enabled sharing of main threads processor affinity to the next required thread for CullDrawThreadPerCamera and CullThreadPerCameraDrawThreadPerContext 2016-11-15 11:01:41 +00:00
OpenSceneGraph git repository
5ff6048db0 Merge pull request #156 from LaurensVoerman/Affinity2
unlock cpu's 32-63 on 64 bit windows
2016-11-15 10:41:12 +00:00
Robert Osfield
ddbb1cb064 Removed todo that is not required 2016-11-15 09:47:48 +00:00
Robert Osfield
c560e9a1ef Reduced public documentation generation to just the public headers 2016-11-15 09:29:09 +00:00
OpenSceneGraph git repository
33e28b0971 Merge pull request #164 from CodeDocs/codedocs
Use CodeDocs for Doxygen documentation
2016-11-15 09:28:25 +00:00
Robert Osfield
87a3648e68 To avoid noise in documentation replaced nested namespaced enum with enum with FILE_COPY_ wording prefixed into enum values. 2016-11-15 08:57:24 +00:00
Robert Osfield
80f75bcbdd Fixed doxygen warnings 2016-11-15 08:37:05 +00:00
Robert Osfield
36b2ddac2d Added usage of osg::ConfigureBufferObjectsVisitor to correct for incoherent buffer oject set up due to the adhoc way that the OpenFlight plugin sets up osg::Geometry. 2016-11-14 18:01:22 +00:00
Robert Osfield
5b375124cc Added osg::Geometry::configureBufferObjects() and ConfigureBufferObjectsVisitor visitor to help with setting up buffer objects in a coherent fashion. 2016-11-14 17:59:25 +00:00
Robert Osfield
99cb8ebacf Added more flexibility into the State::checkGLErrors() method, allowing calling code to pass in two strings.
Improved the StateSet::compileGLObjects() usage of checkGLErrors() to make the warning reports more meaningful.
2016-11-14 11:59:47 +00:00
Robert Osfield
e6052ef4b4 Added Dragger::applyAppropriateFrontFace(StateSet*) to make it easy to handle inverted matrices by toggling the FrontFace to sure the correct face is visible. 2016-11-11 17:18:13 +00:00
Robert Osfield
d16ca33f38 Fixed handling of Locator's with negative extents 2016-11-11 14:01:40 +00:00
Paul Novotny
1234619a48 Use CodeDocs for Doxygen documentation
Adds a configuration file (.codedocs) for building the Doxygen
documentation using CodeDocs.xyz. Also, adds a badge to the README.md
to link to the documentation.
2016-11-02 20:56:04 -04:00
Friedrich Beckmann
e506bb3075 added alternative to middle-mouse button in manipulator
I added CTRL + RIGHT-MOUSE-CLICK to the standard manipulator as
an alternative to MIDDLE-MOUSE-CLICK because a 3 Button Mouse
not always available, e.g. on MacOS. I tested this with the
osgAtlasSimbicon example.
2016-10-24 19:54:43 +02:00
Robert Osfield
b5c071eed9 Moved shader file loading to a help function 2016-10-20 09:59:26 +01:00
Robert Osfield
c32e6c01ed Fixed shader filename 2016-10-20 09:46:47 +01:00
Robert Osfield
fda7c838a1 Added osgshaderpipeline example that will server as a testbed for automatically mapping fixed function pipeline to shaders 2016-10-19 20:26:26 +01:00
OpenSceneGraph git repository
26a313d549 Merge pull request #159 from LaurensVoerman/Affinity3b
re-assign thread affinity at the end of setThreadingModel()
2016-10-17 16:36:42 +01:00
Laurens Voerman
d461149969 re-assign thread affinity at the end of setThreadingModel() 2016-10-17 09:50:48 +02:00
Robert Osfield
e17ad60c2d Added _color copy to the copy constructor 2016-10-14 18:00:40 +01:00
Laurens Voerman
16a282ccea unlock cpu's 32-63 on 64 bit windows 2016-10-14 17:19:50 +02:00
Robert Osfield
4e5f0fc3a5 Added a dedicated FindEGL.cmake script to help with locating the EGL.so library and header 2016-10-14 11:06:31 +01:00
Robert Osfield
afb046a196 Bumped OpenThreads version numbers to reflect changes in ABI 2016-10-13 17:43:29 +01:00
Robert Osfield
b10d30242d Fixed GLES build due to lack of GLclampd 2016-10-12 18:00:05 +01:00
Robert Osfield
1cc53246e9 Changed appending of \n to be to the version line. 2016-10-12 17:24:25 +01:00
Robert Osfield
9072f9653e Added OES variants of vertex array object functions 2016-10-12 16:10:40 +01:00
OpenSceneGraph git repository
953af3d1d9 Merge pull request #155 from LaurensVoerman/Texture0
add #define GL_TEXTURE0 for windows users previously provided by GLBeginEndAdapter
2016-10-12 13:41:57 +01:00
Laurens Voerman
1a664b19de add #define GL_TEXTURE0 for windows users previously provided by GLBeginEndAdapter 2016-10-12 13:29:58 +02:00
Robert Osfield
c92de93429 Altered the configureAffinity() scheme so that it places threads preferentially on even based number processors first, which should work better in case the processors available have hyper-threading 2016-10-12 10:08:56 +01:00
Robert Osfield
dbdd25742d Updated version number to 3.5.6 and SO version to 146 after VAO merge 2016-10-12 09:09:37 +01:00
Robert Osfield
0314fd593a Added VAO support to osgTerrain::GeometryPool 2016-10-11 20:11:39 +01:00
Robert Osfield
b6afce773a Removed unneccessary includes 2016-10-11 20:11:24 +01:00
Robert Osfield
38ff11f8c5 Renamed ArrayDispatchers to AttributeDispatchers to better reflect it's role 2016-10-11 15:14:14 +01:00
Robert Osfield
e14ee80282 Streamlined the dispatch and activation of attribute dispatchers 2016-10-11 11:29:29 +01:00
Robert Osfield
364c838ea1 Removed unused vertex and texcoord array dispatchers 2016-10-11 11:29:29 +01:00
Fabian Wiesel
b13bbe3bdb VAO id is a GLuint 2016-10-11 11:29:29 +01:00
Fabian Wiesel
1f562c003c Missed rename in VertexAttribArrayDispatch
The variable array is by initialisation a null-pointer, new_array is the new array
2016-10-11 11:29:29 +01:00
Robert Osfield
66873b8c6c Fixed build errors when OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION to OFF 2016-10-11 11:29:29 +01:00
Robert Osfield
007a19a027 Fixed warnings 2016-10-11 11:29:29 +01:00
Robert Osfield
0ee65c9d2f Removed unneccessary parameter 2016-10-11 11:29:29 +01:00
Robert Osfield
e11e45a2e3 Removed GLBeginEndAdapter as it is no longer needed 2016-10-11 11:29:29 +01:00
Robert Osfield
0f3e61146d Refactored osgText so that it no longer uses GLBeginEndAdapter 2016-10-11 11:29:29 +01:00
Robert Osfield
987513d309 Added --simple command line option and accompanying code to create a very simple text object for basic testing of osgText 2016-10-11 11:29:29 +01:00
Robert Osfield
aa0c8fdefd Added ApplyTextureModeProxy for temporarily applying a texture mode 2016-10-11 11:29:29 +01:00
Robert Osfield
53cdacd926 Refactored Text3D so that it no longer depends upon GLBeginEndAdapter 2016-10-11 11:29:29 +01:00
Robert Osfield
1914eb435b Added State::ApplyModeProxy to help with temporarily applying a mode 2016-10-11 11:29:29 +01:00
Robert Osfield
cfadbbda2b Removed no longer relevant comment 2016-10-11 11:29:29 +01:00
Robert Osfield
a471973eab Added missing export 2016-10-11 11:29:29 +01:00
Robert Osfield
5a4754deef Refactored osgParticle so that it natives support vertex arrays, vertex buffer objects and vertex array objects 2016-10-11 11:29:29 +01:00
Robert Osfield
cd3a5f8097 Added osg::convertToRGBA8(Vec4f) convenience function 2016-10-11 11:29:29 +01:00
Robert Osfield
10f1d84f7e Added explict setup of the stats graphing geometry so that it's VertexBufferObject is intialized to the correct size to prevent any need for later resizing 2016-10-11 11:29:29 +01:00
Robert Osfield
d4d32cbde7 Improved handling of the BufferObject::Profile::_size, utilizing it's intial value when it is non zero and larger than the arrays assigned to it. 2016-10-11 11:29:29 +01:00
Robert Osfield
8febae1546 Fixed VertexArrayState::bind*BufferObject(..) methods so they correctly handle dirtied buffer objects 2016-10-11 11:29:29 +01:00
Robert Osfield
a5e0398a29 Fixed typo in comment 2016-10-11 11:29:29 +01:00
Robert Osfield
96b0e42c42 Fixed typo in comment 2016-10-11 11:29:29 +01:00
Robert Osfield
ff779e58ab Added check against Array::Binding to decide whether to assign a VertexBufferObject to an array or not, only assigning it when Binding is BIND_PER_VERTEX 2016-10-11 11:29:29 +01:00
Robert Osfield
886b922596 Beginings of refactoring ParticleSystem so that it does uses vertex arrays rather than GLBeginEndAdapter 2016-10-11 11:29:29 +01:00
Robert Osfield
611b7afb07 Added OSG_EXPORT 2016-10-11 11:29:29 +01:00
Robert Osfield
93b2a24b0e Added command line parser to osgparticle examples viewer setup to make it easier to position window 2016-10-11 11:29:29 +01:00
Robert Osfield
663024a215 Removed redundent use of Geode to decorate the ParticleSystem 2016-10-11 11:29:29 +01:00
Robert Osfield
9800e1c201 Fixed line endings 2016-10-11 11:29:29 +01:00
Robert Osfield
c15f6d3e8c Made ordering of case clearer 2016-10-11 11:29:29 +01:00
Robert Osfield
56ed225f17 Removed Particle::Shape support for QUAD_TRIANGLESTRIP, HEXAGON, USER as these are unlikely to be used as their implementation prevents refactoring to use vertex array code paths 2016-10-11 11:29:29 +01:00
Robert Osfield
c637010c9d Refactored ImpostorSprite so that it no longer uses GLBeginEndAdapter 2016-10-11 11:29:29 +01:00
Robert Osfield
35e19b4f30 Added back in the osgimpostor example, cleaning up so that it no longer has any deprecated paths and adds stats and file output for debug purposes 2016-10-11 11:29:29 +01:00
Robert Osfield
037e8f24c6 Removed commented out debug message 2016-10-11 11:29:29 +01:00
Robert Osfield
7c432fbe11 Refactored osgSim::SphereSegment so that it no longer uses GLBeginEndAdapter 2016-10-11 11:29:29 +01:00
Robert Osfield
a1ab1a0ecc Added AdjustSphereSegmentCallback to provide '<' and '>' key controls over the azim and elev range of the sphere segment 2016-10-11 11:29:29 +01:00
Robert Osfield
a87a6f0851 Added StatsHandler to check performance 2016-10-11 11:29:29 +01:00
Robert Osfield
3d0f6d5d78 Removed unused header 2016-10-11 11:29:29 +01:00
Robert Osfield
1df27e4edb Replaced old Shape to Geometry conversion code as new convinience methods in include/osg/Shape provide these features 2016-10-11 11:29:29 +01:00
Robert Osfield
e5ab4355be Added osg::convertShapeToGeometry(...) convinience functions for creating osg::Geometry from osg::Shape descriptions. 2016-10-11 11:29:29 +01:00
Robert Osfield
83b5cabac9 Refactored ShapeDrawable so that it is subclassed from osg::Geometry rather than osg::Drawable.
Created a BuildShapeGeometryVisitor visitor that can create osg::Geometry for osg::Shape objects
2016-10-11 11:29:29 +01:00
Robert Osfield
3be951f279 Fixed crash when using vertex attribute arrays 2016-10-11 11:29:29 +01:00
Robert Osfield
b2873132be Added support for interleaved arrays 2016-10-11 11:29:29 +01:00
Robert Osfield
f842750342 Removed no longer used member variables 2016-10-11 11:29:29 +01:00
Robert Osfield
65884f296b Removed no longer used data structures 2016-10-11 11:29:29 +01:00
Robert Osfield
16da432be3 Moved FOG_COORD and SECONDARY_COLOR #define's from State header into VertexArrayState.cpp 2016-10-11 11:29:29 +01:00
Robert Osfield
164981f7a3 Replaced osg::State:set*Pointer() calls with VertexArrayState::set*Array() calls 2016-10-11 11:29:29 +01:00
Robert Osfield
359b136b5e Added check against State::useVertexBufferObjects(..) so that Display Lists are only used when VBO is OFF. 2016-10-11 11:29:29 +01:00
Robert Osfield
961bffcca4 Added automatic assignment of _markerObject to CompileSet. 2016-10-11 11:29:29 +01:00
Robert Osfield
94891778c4 Restructred the enabling of vertex array object support to allow one to set enable the default via osg::State.
Added OSG_VERTEX_BUFFER_HINT env var to osg::DisplaySettings with VERTEX_BUFFER_OBJECT/VBO, VERTEX_ARRAY_OBJECT/VAO and NO_PREFERENCE to allow one to foce on VBO or VAO usage.

Restructred BufferObject assigned in osg::Geometry

Added
2016-10-11 11:29:29 +01:00
Robert Osfield
d8fdf33be5 Cleaned up set up of osg::Geometry for stats 2016-10-11 11:29:29 +01:00
Robert Osfield
cf52b2db50 Removed unncessary checks 2016-10-11 11:29:29 +01:00
Robert Osfield
ee31921520 Streamlined State::_is*Supported variables 2016-10-11 11:29:29 +01:00
Robert Osfield
1d75089bf8 Build fixes when compiling wuth CMake options OPENGL_PROFILE set to GLCORE 2016-10-11 11:29:29 +01:00
Mathieu MARACHE
46c86f53ac remove a warning when compiling with GL3 core profile and macOS 2016-10-11 11:29:29 +01:00
Mathieu MARACHE
3745b958e5 compilation fixes when no OSG_GL_DISPLAYLISTS_AVAILABLE 2016-10-11 11:29:29 +01:00
Mathieu MARACHE
afe45f66d2 compilation fixes when no OSG_GL_FIXED_FUNCTION_AVAILABLE 2016-10-11 11:29:29 +01:00
Robert Osfield
e3c663bb02 Removed deprecated code paths and moved implementations into headers 2016-10-11 11:29:29 +01:00
Robert Osfield
bf28e2d037 Refactored the VertexArrayState's handling of vertex attribute aliasing 2016-10-11 11:29:29 +01:00
Robert Osfield
1f147f6bc6 Moved implementations from .cpp's to headers as inline methods to improve performance. 2016-10-11 11:29:29 +01:00
Robert Osfield
97df15b205 Improved naming of createVertexArrayState(..) method 2016-10-11 11:29:29 +01:00
Robert Osfield
98344157c0 Removed resetting of the pointer state. 2016-10-11 11:29:29 +01:00
Robert Osfield
83f73df814 Added State::useVertexArrayObject() member to streamline toggling on/off of VAO usage 2016-10-11 11:29:29 +01:00
Robert Osfield
a4e682bb28 Added support for clean up Vertex Array Objects 2016-10-11 11:29:29 +01:00
Robert Osfield
4131d2da34 Added intialization of the VAO in Geometry::compileGLObjects() and refined the invocation of updates to the VAO 2016-10-11 11:29:29 +01:00
Robert Osfield
078598872f Added lazy setting of arrays for osg::Geometry using vertex_array_object 2016-10-11 11:29:29 +01:00
Robert Osfield
4b4cd13d31 Implemented lighter weight setting of the CurrentVertexArrayState and introduced GlobalVertexArrayState. 2016-10-11 11:29:29 +01:00
Robert Osfield
7d83d735ad Implemented a different approach to vertex array object support to enable creation of a single global vertex array object as well as provide individual vertex array objects per Drawable when required. 2016-10-11 11:29:29 +01:00
Robert Osfield
4d8a29b987 Added ability to initializer GL vertex array object id with Geometry::compileGLObjects().
Improved the handling of buffer object state when not using VAO's
2016-10-11 11:29:29 +01:00
Robert Osfield
14d1483b06 Experimental support for OpenGL Vertex Array Object 2016-10-11 11:29:29 +01:00
Torben Dannhauer
d51036f57e From Torben Dannhauer, added search for new libcurl and libtiff names 2016-10-11 11:02:20 +01:00
OpenSceneGraph git repository
d794be88e7 Merge pull request #153 from scrawl/typo-fix
Fix typo in processor affinity API
2016-10-10 17:38:24 +01:00
scrawl
295742c0d7 Fix typo in processor affinity API 2016-10-10 18:02:38 +02:00
Robert Osfield
17328d313d From Torben Dannhauer, added freetype27 (2.7) to search list 2016-10-10 11:21:28 +01:00
Robert Osfield
d92a79b876 Fixed crash associated with setting the affinity on a null pointer 2016-10-08 15:58:33 +01:00
Robert Osfield
6142ea1d46 Updated AUTHORS for 3.5.5 2016-10-07 19:11:01 +01:00
Robert Osfield
39ed6235e8 Updated ChangeLog 2016-10-07 19:10:24 +01:00
OpenSceneGraph git repository
05ed7d1336 Merge pull request #152 from aluaces/spelling2
Some spelling fixes in comments.
2016-10-07 17:05:58 +01:00
Robert Osfield
299452cf84 Updated ChangeLog for release 2016-10-07 16:55:35 +01:00
OpenSceneGraph git repository
fb7b5fc0f7 Merge pull request #151 from LaurensVoerman/pdbInstall
fix error on pdb files building the install target in visual studio
2016-10-07 16:54:36 +01:00
Laurens Voerman
2764b52c02 remove CMAKE_BUILD_TYPE STREQUAL "Release" (cmake configure time varable) to select pdb install - select CONFIGURATIONS RelWithDebInfo Debug 2016-10-07 17:49:42 +02:00
OpenSceneGraph git repository
fc7616e090 Merge pull request #150 from LaurensVoerman/Readme
osg now requires cmake 2.8.0
2016-10-07 16:15:28 +01:00
Robert Osfield
2d0ccc3b40 Updated ChangeLog 2016-10-07 15:58:11 +01:00
Robert Osfield
548c9739ed Restructed how CPU affinity is set to fix build problems when local pthreads doesn't support setting affinity 2016-10-07 15:57:01 +01:00
Robert Osfield
36c793c4f6 UPdated ChangeLog for release 2016-10-07 15:40:50 +01:00
Laurens Voerman
d2dd24fc89 osg now requires cmake 2.8.0 2016-10-07 16:36:40 +02:00
Robert Osfield
7ba7b13aa0 Fixed VisualStudio warning
Added local implementation of asEventHandler()
2016-10-07 14:51:39 +01:00
Robert Osfield
268d89c426 Fixed VisualStudio warning
Added local implementation of asEventHandler()
2016-10-07 14:45:33 +01:00
Robert Osfield
028fefe6ec Updated README for 3.5.5 2016-10-07 13:57:42 +01:00
Robert Osfield
cbf21f7ef5 Update ChangeLog and AUTHORS file for 3.5.5 dev release 2016-10-07 13:56:46 +01:00
Robert Osfield
10d8ac7f65 Fixed extension string typo 2016-10-07 12:17:03 +01:00
Robert Osfield
dc6b55a5e9 Added support for checking GL_OES_texture_npot 2016-10-07 12:17:03 +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
77c5e96ccb Added DatabasePager::setProcessorAffinity(const OpenThreads::Affinity&) support to allow the database threads to have affinity to user controls sets of CPU cores. 2016-10-07 12:17:03 +01:00
Robert Osfield
171e4f0f29 Implemented setting thread affinity for threads that aren't OpenThreads threads, such as main thread 2016-10-07 12:17:03 +01:00
Robert Osfield
00aac43cdb Added missing export 2016-10-07 12:17:03 +01:00
Robert Osfield
b9869e137d First cut of OpenThrads::Affinity support for Win32. 2016-10-07 12:17:03 +01:00
Robert Osfield
bc44da49e6 Introduced new OpenThreads::Affinity class to wrap up specification of thread affinity.
Simplified the OpenThreads::SetProcessorAffinityOfCurrentThread/Thread::SetProcessorAffinity() to utilize the new Affinity class
2016-10-07 12:17:03 +01:00
Robert Osfield
0f8a5a86e2 Introduced OpenThreads::SetProcessorAffinityMaskOfCurrentThread(unsigned long cpumask) and Threads::setProcessorAffinityMask(unsigned long cpumask) to allow finer grained control over the CPU affinity. 2016-10-07 12:17:03 +01:00
Robert Osfield
cd56639e67 Added CullingActive support for Drawable serializer 2016-10-07 11:13:40 +01:00
Robert Osfield
8de4c76582 Fixed crash and double call bug in handle event callbacks attached to Drawable 2016-10-06 18:27:23 +01:00
Robert Osfield
96b180ddad Added a osgCmakeExample to illustrate a minimal CMakeList.txt to show how to build an OSG application using Cmake 2016-10-06 15:07:42 +01:00
OpenSceneGraph git repository
0a3b2402c8 Merge pull request #148 from LaurensVoerman/SmoothingVisitor
fix bug in SmoothingVisitor tripped by bunny.ply
after duplicating the vertices to allow for multiple normals the indices of the new mesh (with duplicated vertices) were used with the vertices of the old mesh, causing a vector subscript out of range error.
2016-10-06 14:14:02 +01:00
Laurens Voerman
6ad0f9badc fix bug in SmoothingVisitor tripped by bunny.ply 2016-10-06 14:23:46 +02:00
Robert Osfield
d13c2bf4cb Merge branch 'LaurensVoerman-Submissions_B' 2016-10-06 11:36:06 +01:00
Robert Osfield
bd85bc0cf3 Changed tabs to four spaces to avoid different editors rendering the indentation differently 2016-10-06 11:34:53 +01:00
Robert Osfield
f1e6ac709c Merge branch 'Submissions_B' of https://github.com/LaurensVoerman/OpenSceneGraph into LaurensVoerman-Submissions_B 2016-10-06 11:32:31 +01:00
Robert Osfield
197b4a0d30 Added GL_OES_geometry_shader and GL_OES_tessellation_shader checks 2016-10-06 10:48:29 +01:00
Laurens Voerman
cba84f74aa adaptations for cmake changes mid 2015 (SelectLibraryConfigurations.cmake) with SelectLibraryConfigurations.cmake
collada zlib debug library linking added
2016-10-06 11:19:01 +02:00
Alberto Luaces
7f3c92f492 Some spelling fixes in comments. 2016-10-05 18:10:46 +02:00
René Molenaar
48dbd61632 Fixed VisualStudio build 2016-10-05 16:31:23 +01:00
Robert Osfield
0fab759c1b Removed the unused debug header as it was causing building compile problems with the Debug build under Windows 2016-10-05 14:00:46 +01:00
OpenSceneGraph git repository
70e931fda2 Merge pull request #145 from LaurensVoerman/Submissions_A
added vc14 (Visual Studio 2015) and boost 1.58 support in FindCOLLADA.cmake
2016-10-03 08:45:23 +01:00
Laurens Voerman
c03414ac57 added vc14 (Visual Studio 2015) and boost 1.58 support in FindCOLLADA.cmake 2016-09-30 14:33:28 +02:00
OpenSceneGraph git repository
f705e39eb9 Merge pull request #142 from LaurensVoerman/Submissions12
fix a few minor warnings from Visual Studio 2015
2016-09-27 09:48:38 +01:00
Laurens Voerman
0619fe1cfa src\osgplugins\osgjs\Animation(9): warning C4099: 'WriteVisitor': type name first seen using 'class' now seen using 'struct' 2016-09-26 13:56:38 +02:00
Laurens Voerman
0ee744f7a0 fix Visual studio warning C4138: '*/' found outside of comment 2016-09-26 13:43:51 +02:00
Robert Osfield
1bdd2aceab Removed __sgi blocks as IRIX is no longer available 2016-09-26 10:03:32 +01:00
Robert Osfield
56a7208891 Removed Qt dependency examples, osgQt NodeKit and qfont plugin as these are now provided by the separate osgQt project 2016-09-26 09:31:22 +01:00
Robert Osfield
13fa75fc12 Removed qt threads 2016-09-26 09:22:10 +01:00
Robert Osfield
05f37bec53 Removed IRIX Sproc thead support as IRIX is load dead 2016-09-26 09:08:56 +01:00
Robert Osfield
2c39fa52b8 Removed IRIX Sproc threading support form OpenThreads as IRIX is long dead. 2016-09-26 09:06:28 +01:00
OpenSceneGraph git repository
3a4a7ef5fd Merge pull request #139 from aluaces/signedchar
Explicit signed char declarations for portability.
2016-09-24 16:16:23 +01:00
Alberto Luaces
01c712e851 Explicit signed char declarations for portability.
Some platforms (ARM, PowerPC, s390x) have "unsigned char" as the default
char type, and thus the build fails for certain parts of the code where
negative values are assigned to those kind of variables.
2016-09-24 12:33:37 +02:00
Robert Osfield
3f91c5d970 Changed the min CMake version to 2.8.0 2016-09-22 18:33:35 +01:00
OpenSceneGraph git repository
db10e80b7f Merge pull request #137 from LaurensVoerman/Submissions10
fix error in CmakeLists: CMAKE_CXX_COMPILER_VERSIO
2016-09-22 17:48:19 +01:00
Robert Osfield
c6813cf8e2 Replaced local static usage to avoid threading and mulit-context issues 2016-09-22 14:33:03 +01:00
Laurens Voerman
ba3ab1a7c1 fix error in CmakeLists: CMAKE_CXX_COMPILER_VERSIO -> CMAKE_CXX_COMPILER_VERSION 2016-09-22 09:09:46 +02:00
Robert Osfield
c31af086eb Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2016-09-20 17:25:35 +01:00
Robert Osfield
7e0c30b884 Refactored texture sharing code so that it modifies the RefAttributePair directly thus honouring the override flags and fixing a bug of loosing these override flags when sharing 2016-09-20 17:23:37 +01:00
Robert Osfield
b0df75e674 Cleaned up the spacing and const of various method parameters.
Added non const versions of StateSet::getAttributePair() and getTextureAttributePair()
2016-09-20 17:01:26 +01:00
OpenSceneGraph git repository
c0fc66d6a0 Merge pull request #134 from LaurensVoerman/Submissions10
Specialize -Wmaybe-uninitialized -Wextra and -Wno-misleading-indentation gcc warning flags to 4.6, 4.9 and 6.0 respectively
2016-09-20 14:40:28 +01:00
Laurens Voerman
3b029f5d3e short version with gcc warning flags depending on compiler version. 2016-09-20 10:23:15 +02:00
Laurens Voerman
65567fdeac Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph into Submissions10 2016-09-20 10:20:47 +02:00
OpenSceneGraph git repository
57f9257f32 Merge pull request #136 from LaurensVoerman/Submissions11
disable warning C4589 for MSVC
2016-09-19 19:39:01 +01:00
Laurens Voerman
37bd1c6b93 disable warning C4589 for MSVC 2016-09-19 16:40:59 +02:00
Laurens Voerman
c757fdb779 enable some more aggressive warning flags for gcc 4.7 and cmake version below 3 2016-09-16 17:12:41 +02:00
OpenSceneGraph git repository
dd0cd8f2db Merge pull request #130 from LaurensVoerman/Submissions7
VS2015 dae plugin fix a few declaration of 'X' hides previous
2016-09-15 07:53:10 +01:00
OpenSceneGraph git repository
b75546acaf Merge pull request #131 from filnet/master
StandardManipulator: use proper bit mask when clearing a relative flag
2016-09-15 07:50:51 +01:00
Philippe Renon
e367792f6d StandardManipulator: use proper bit mask when clearing a relative flag 2016-09-14 14:32:35 +02:00
Laurens Voerman
cf3c2b18e3 VS2015 fix a few warning C4456: declaration of 'X' hides previous local declaration 2016-09-13 17:07:28 +02:00
OpenSceneGraph git repository
3b1212fed5 Merge pull request #128 from LaurensVoerman/Submissions5
wrong Meta_Shape tag in ConvexHull
2016-09-12 16:22:54 +01:00
OpenSceneGraph git repository
22f96935fb Merge pull request #127 from LaurensVoerman/Submissions4
remove last Performer reference
2016-09-12 16:22:18 +01:00
Laurens Voerman
55b8c380d8 wrong Meta_Shape tag in ConvexHull 2016-09-12 16:49:35 +02:00
Laurens Voerman
743ecf3706 remove last Performer reference 2016-09-09 10:58:19 +02:00
Robert Osfield
489860fb87 Updated version number to 3.5.5 2016-09-06 09:31:16 +01:00
Robert Osfield
aae78b8a8b Updated ChangeLog formatting 2016-09-05 19:12:54 +01:00
Robert Osfield
beb617ad90 Updated ChangeLog, AUTHORS and README for 3.5.4 dev release 2016-09-05 17:57:27 +01:00
Robert Osfield
cb6e6ff2be Fixed warnings, deprecated another out of date method 2016-09-05 15:35:54 +01:00
Robert Osfield
ec344a85b4 Fixed warnings 2016-09-05 13:44:59 +01:00
Stuart Mentzer
2c4a5319bf Final version of FindFreetype.cmake that is based on the now-accepted CMake patches. This supports the new freetype include path structure and fixes the failure to find the debug library on Windows due to its name having a 'd' suffix. 2016-09-05 12:18:46 +01:00
Robert Osfield
a494cd71e8 Fixed typo 2016-09-05 07:59:15 +01:00
Robert Osfield
4a6fb5a49a Fixed warnings 2016-09-04 19:50:28 +01:00
Robert Osfield
fb4f7a025b Added local deprecated_osg::Geometry implementation from OpenSceneGraph-3.4 to keep build working now that deprecated_osg::Geometry has been removed from the core OSG. 2016-09-04 18:31:13 +01:00
Robert Osfield
19270d0833 Fixed warning 2016-09-02 19:09:13 +01:00
Robert Osfield
f4fbe6625a Merge branch 'LaurensVoerman-Submissions2e' 2016-09-02 18:26:37 +01:00
Robert Osfield
79ff8ba273 Merge branch 'Submissions2e' of https://github.com/LaurensVoerman/OpenSceneGraph into LaurensVoerman-Submissions2e 2016-09-02 18:26:11 +01:00
OpenSceneGraph git repository
c19b271586 Merge pull request #119 from LaurensVoerman/Submissions2c
Fixed clone osgVolume::Scalarproperty and osg::TextureBuffer crash
2016-09-02 17:47:37 +01:00
OpenSceneGraph git repository
14bdadaf86 Merge pull request #123 from LaurensVoerman/Submissions2f
Submissions2f
2016-09-02 17:44:57 +01:00
OpenSceneGraph git repository
8d827ced1b Merge pull request #117 from LaurensVoerman/Submissions2a
bugfix: wrong class name in META_Object macro for osg::Enablei /disable
2016-09-02 17:35:47 +01:00
OpenSceneGraph git repository
def6508308 Merge pull request #118 from LaurensVoerman/Submissions2b
fix colliding include guards and spurious #define OSGUI_EXPORT
2016-09-02 17:34:20 +01:00
OpenSceneGraph git repository
0873a69ff5 Merge pull request #124 from LaurensVoerman/Submissions3
RigTransformHardware fix: warn; don't crash if MAX_MATRIX not found
2016-09-02 17:28:40 +01:00
Laurens Voerman
92ca556243 fix the missing ")" in BasicAnimationManager copy constuctor 2016-08-29 17:00:00 +02:00
Laurens Voerman
1da43a5960 added copyconstructor for osgAnimation::BasicAnimationManager 2016-08-29 13:03:36 +02:00
Laurens Voerman
628f8fd9dc added call to copy constructor for virtual base classes in copy constructor of derived classes, removed these for abstract classes 2016-08-29 10:41:40 +02:00
Laurens Voerman
d0020b7dfc bugfix: osg::TextureBuffer::clone() crash 2016-08-29 10:01:48 +02:00
Laurens Voerman
0433d29d11 bugfix: osgVolume::ScalarProperty clone crash 2016-08-29 10:01:48 +02:00
Laurens Voerman
ca877a8424 fix colliding include guards and spurious #define OSGUI_EXPORT 2016-08-29 09:40:21 +02:00
Laurens Voerman
dd223002dd bugfix: wrong class name in META_Object macro for osg::Enablei osg::Disablei 2016-08-29 09:37:14 +02:00
Robert Osfield
2e6f0d7aab Quitened unused parameter warnings 2016-08-26 19:28:36 +01:00
Robert Osfield
0ad09d6dad Fixed unused variable warnings 2016-08-26 19:18:00 +01:00
Robert Osfield
322adc266c Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2016-08-26 18:00:52 +01:00
Robert Osfield
11ddd53eb4 Removed redundent Referenced::s/getThreadSafeReferenceCounting() and associated static and env vars as there are now inapprorpiate and no longer supported 2016-08-26 17:59:30 +01:00
Laurens Voerman
5c66ecfc99 RigTransformHardware fix: warn; don't crash if MAX_MATRIX not found 2016-08-16 14:33:48 +02:00
OpenSceneGraph git repository
2bdf56cb4b Merge pull request #114 from scrawl/const-cast
Remove an unneeded const_cast
2016-08-16 12:40:35 +01:00
OpenSceneGraph git repository
15ec7e2ae7 Merge pull request #115 from zakalawe/master
Attempt to fix broken DLL exports from osgDB
2016-08-16 12:39:57 +01:00
James Turner
ea9f479674 Attempt to fix broken DLL exports from osgDB
Only export the osgDB method implementations, instead of the entire
class, and hence avoid exporting symbols from the base class, which
then conflict with other compilation units when linking.

This avoids the need for /FORCE:MULTIPLE linker option with MSVC.
2016-08-15 22:21:44 +01:00
Robert Osfield
8f68da89d7 Fixed handling in osgUtil::IncrementalCompileOperation/CompileSet/StateToCompile when the _markerObject is NULL. 2016-08-15 12:59:21 +01:00
Robert Osfield
9d9025a6b4 Changed the default paramter for the osgUtil::StateToCompile to retain the OSG-3.4 ABI and fixed indentation. 2016-08-15 12:13:07 +01:00
Robert Osfield
06cb31a3d2 Added automatic assignment of _markerObject to CompileSet. 2016-08-15 11:46:48 +01:00
scrawl
0b450a5113 Remove an unneeded const_cast 2016-08-14 19:30:55 +02:00
Ravi Mathur
e9d6737ec4 Updates to the CMake build system for Mac OSX 2016-08-10 14:30:28 +01:00
Anish Thomas
2b9dfab1fc GLSL 1.3 support for vertex-attrib aliasing 2016-08-10 14:12:27 +01:00
Konstantin S. Matveyev
e6d4d99edb Fixed filename encoding bug 2016-08-10 12:58:38 +01:00
Robert Osfield
26bce07f2b Fixed handlinge of fgets returning a 0 length string 2016-08-10 12:00:18 +01:00
OpenSceneGraph git repository
f8c090ff7f Merge pull request #111 from hernando/master
Added missing GL enums to Texture::computeInternalFormatType
2016-08-10 11:32:15 +01:00
OpenSceneGraph git repository
0c938cab8a Merge pull request #112 from mathieu/feature/macOS_CoreProfile
macOS CoreProfile, contains requested parts of #92 previous PR concerning the osgsimplegl3 sample and the selection of the correct GL Profile when compiling with GL3 or Core Profile in GraphicsWindowCocoa.mm
2016-08-05 09:07:23 +01:00
Mathieu MARACHE
c77a7ecae9 Added usage of osgUtil::Optimizer to tessellate input geometry 2016-08-05 07:51:33 +02:00
Mathieu MARACHE
a54dc34752 Added CoreProfile selection if OSG_GL3_AVAILABLE defined 2016-08-05 07:49:22 +02:00
Juan Hernando Vieites
b3c242e270 Added missing GL enums to Texture::computeInternalFormatType 2016-08-04 17:03:51 +02:00
Robert Osfield
2550c95c32 Added GL_NORMALIZE usage to handle the case of the FlattenStaticTransform visitor not being applied to the scaled subgraphs causing lighting problems 2016-08-02 17:52:45 +01:00
OpenSceneGraph git repository
02cb58d3d9 Merge pull request #106 from rafagaitan/osgdb_curl
Added OSG_CURL_SSL_VERIFYPEER option to the curl plugin
2016-08-02 15:45:49 +01:00
OpenSceneGraph git repository
46fb6bd299 Merge pull request #109 from scrawl/renderbuffer_fix
Fix RenderBuffer not being attached
2016-08-02 15:27:39 +01:00
scrawl
5b70f208e3 Fix RenderBuffer not being attached (bug introduced with commit 55b3becb7c ) 2016-08-01 17:48:14 +02:00
Robert Osfield
2578fce085 Added FT_LOAD_NO_HINTING 2016-07-31 14:00:30 +01:00
Robert Osfield
1794374c78 Fixed build error reported on gcc 4.6.4/Ubuntu 12.04 32bit, issue #108 2016-07-31 11:06:51 +01:00
OpenSceneGraph git repository
953b150c17 Merge pull request #107 from marchelbling/fix_tangentspacegenerator_regression
OsgUtil::TangentSpaceGenerator, merge tangent space for index array
2016-07-31 10:49:23 +01:00
Cedric Pinson
e1c0b74454 OsgUtil::TangentSpaceGenerator, merge tangent space for index array 2016-07-19 14:48:28 +02:00
Rafael Gaitán
5e4543513b Added OSG_CURL_SSL_VERIFYPEER option to the curl plugin to allow connecting to secure servers without the certificate 2016-07-19 13:44:31 +02:00
Robert Osfield
f9172a000e Fixed bug in setting the ratio value 2016-07-18 20:06:26 +01:00
OpenSceneGraph git repository
0faebbef33 Merge pull request #105 from marchelbling/compiler-friendly-gles
Moves gles visitors implementation in cpp files
2016-07-13 09:46:19 +01:00
Marc Helbling
a44057b0df Moves gles visitors implementation in cpp files 2016-07-12 11:54:51 +02:00
Robert Osfield
fd0af1d9df Added Optimizer::BufferObjectVisitor and associated BUFFER_OBJECT_SETTINGS value to enable it via the OSG_OPTIMZIER env var.
The BufferObjectVisitor enbales vertex buffer objects usage on Drawable in the scene graph.
2016-07-11 09:52:07 +01:00
Robert Osfield
51f85f4c94 Added dirty of the vertex arrays to make sure they are uploaded when using VBO + VAO's 2016-07-11 09:46:50 +01:00
Robert Osfield
483982de3a Fixed coverity issue 2016-07-07 07:31:15 +01:00
Robert Osfield
f62a07beba Removed dead code 2016-07-07 07:27:37 +01:00
Robert Osfield
5ab9a1b420 Fixed potential memory leak 2016-07-07 07:16:56 +01:00
Robert Osfield
6d85404cf0 Added ref_ptr<> to quieten down Coverity 2016-07-06 20:57:53 +01:00
Robert Osfield
c820b611ed Removed dead code 2016-07-06 20:36:50 +01:00
Robert Osfield
f99408f254 Fixed possible memory leak 2016-07-06 20:34:41 +01:00
Robert Osfield
e5e89a3ac9 Added handling of null 2016-07-06 20:23:34 +01:00
Robert Osfield
8b3944f51c Changed dynamic_cast<> to static_cast<> as type is known based on getType() query.
Added missing break statement.
2016-07-06 20:21:53 +01:00
Robert Osfield
0ef196b84c Added null pointer check 2016-07-06 20:15:49 +01:00
Robert Osfield
b907a6e1a6 Fixed null pointer check 2016-07-06 20:13:36 +01:00
Robert Osfield
84eca67498 Added null pointer check 2016-07-06 20:08:03 +01:00
Robert Osfield
666a5def96 Fixed use of invalidated iterator 2016-07-06 20:04:13 +01:00
Robert Osfield
5c5cdbabf7 Added null pointer check 2016-07-06 19:58:23 +01:00
Robert Osfield
a898f2a7e1 Fixed TabPlaneDragger's handling of pressing the right mouse button whilst holding the left mouse button down, then releasing hte left mouse button. 2016-07-06 19:45:02 +01:00
Robert Osfield
74f1cc1ec4 Improved casting to address crashes when handling classes that use virtual inheritance. 2016-07-06 11:36:47 +01:00
Robert Osfield
c753a99a38 Added ability to assign callbacks from lua scripts 2016-07-06 11:36:25 +01:00
Robert Osfield
dba3fa00b9 Uodate README date 2016-07-05 19:22:15 +01:00
Robert Osfield
d8bac1d363 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2016-07-05 18:11:31 +01:00
Robert Osfield
8066a1da04 Added readObject() implementation. 2016-07-05 18:10:51 +01:00
OpenSceneGraph git repository
bb509879ca Merge pull request #103 from marchelbling/update_stl
Update stl.

    fixes magics color parsing
    adds support for incomplete binary stl files
2016-07-05 18:04:50 +01:00
Robert Osfield
ca4355974f Fixed warnings 2016-07-05 17:57:28 +01:00
OpenSceneGraph git repository
9cd52fc54e Merge pull request #102 from marchelbling/update_gles+osgjs
Update gles+osgjs.



This PR

    cleans some gles coverity defects (remaining should only be false positive that need to be sorted out cleanly)
    updates osgjs plugin to support serialization; the history of changes is squashed; details can still be found on cedricpinson fork if needed

As compressed animation channels are no longer part of the main repo, I added a compilation flag for the osgjs plugin. The commit is isolated and the flag is not activated by default.
I am yet to find a better solution to make this plugin entirely free from our specific code.

Note: this PR will not change the gles compilation issues. We only compile on OSX/ubuntu and did not encounter any issue with the plugin.
2016-07-05 17:49:03 +01:00
Marc Helbling
e4c31cdcbf Adds support for incomplete stl binary files
The logic is
* if a file is not ascii
* if its sizeis less than the expected binary size
then we can assume that the data is incomplete but still try to load it.
2016-07-05 17:09:45 +02:00
Marc Helbling
f4d0131967 Fixes magics color parsing
`fread` returns the number of objects read, not a byte-size.
2016-07-05 17:09:41 +02:00
Marc Helbling
67c301c236 Adds specific flag for compressed animation buffers 2016-07-05 16:52:17 +02:00
Marc Helbling
67b17fa801 Updates osgjs plugin for animation serialization 2016-07-05 16:48:53 +02:00
Marc Helbling
6fd972fa42 Fixes gles coverity defects 2016-07-05 16:32:00 +02:00
Robert Osfield
ab69edb506 Fixed typo 2016-07-05 12:57:41 +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
Robert Osfield
16d497ef80 Simplified DatabasePager::requires*() methods 2016-07-05 11:42:03 +01:00
OpenSceneGraph git repository
076503f247 Merge pull request #100 from filnet/checkneedtodoframe
streamline DatabasePager::requiresUpdateSceneGraph()
2016-07-05 11:27:44 +01:00
Robert Osfield
7635f1774f Added missing Plane and Quat handling 2016-07-05 07:41:23 +01:00
Philippe Renon
22d53357d3 split requiresUpdateSceneGraph() into requires update and requires redraw (wip) 2016-07-04 23:19:20 +02:00
Philippe Renon
e23a30652d streamline DatabasePager::requiresUpdateSceneGraph()
would trigger unnecessary redraws when there were pending file requests or active database threads

tested ok with and without IncrementalCompileOperation
2016-07-04 21:42:19 +02:00
Robert Osfield
935a5c4e22 Added version guard around new parameter serializer 2016-07-04 20:26:28 +01:00
Julien Valentin
36930dcd18 Added serializer support for RigTransforms 2016-07-04 20:19:58 +01:00
Robert Osfield
1fe2d6d31f Added templte methods and implementations for Vec2,3,4 for b,ub,s,us,i and ui. 2016-07-04 13:37:29 +01:00
Robert Osfield
82ab389fd6 Added Vec2,3,4 for b, ub, s, us, i, ui. 2016-07-04 13:36:28 +01:00
Robert Osfield
2ebe4813d6 Replaced seperate implementations with template implementations 2016-07-04 11:02:58 +01:00
Robert Osfield
6870c195d0 Replaced seperate getValue(Vec*) implementations with template based implementation 2016-07-04 10:53:06 +01:00
Robert Osfield
55e4d567c4 Added ValueObject pushValue handling for Vec2*, Vec3*, Vec4 for b,ub,s,us,i and ui. 2016-07-04 10:34:03 +01:00
Robert Osfield
9e0c46d55f Added Vec*b, Vec*s, Vec*i getValue(..) implementations 2016-07-04 10:14:47 +01:00
Robert Osfield
bc7bd7da9d Replaced pushVec(Vec2f etc.) implementations with template implementations. 2016-07-04 10:11:34 +01:00
Julien Valentin
50f6cf6a69 Added missing xzyw accessor to Vec4ub 2016-07-04 10:01:17 +01:00
OpenSceneGraph git repository
1f3559e0b2 Merge pull request #99 from filnet/gstreamer
fix FindGStreamer.cmake for msys2 mingw
2016-07-04 09:06:50 +01:00
Philippe Renon
89b9de8ab4 fix FindGStreamer.cmake for msys2 mingw 2016-07-03 17:43:39 +02:00
Robert Osfield
b7bf94b4c6 Added const 2016-07-02 14:45:10 +01:00
Robert Osfield
0f95ad5f9f Added initializers 2016-07-02 12:54:48 +01:00
Robert Osfield
e698ddb719 Introduced ref_ptr<> usage to avoid potential memory leaks 2016-07-02 12:52:20 +01:00
Robert Osfield
143d423d1f Added handling of return type 2016-07-02 12:39:06 +01:00
Robert Osfield
5beb15fa77 Added handling of return type 2016-07-02 12:37:22 +01:00
Robert Osfield
922c860814 Fixed types 2016-07-02 12:33:31 +01:00
Robert Osfield
39d439cea4 Added handling of return type 2016-07-02 12:31:08 +01:00
Robert Osfield
5128461c67 Added initializer 2016-07-02 12:29:07 +01:00
Robert Osfield
8250bdce15 Added initializer 2016-07-02 12:27:48 +01:00
Robert Osfield
5bfc7b9908 Fixed warning and quitened ones caused by 3rd party headers. 2016-07-02 12:13:08 +01:00
Robert Osfield
40d5d1712d Changed to an int comparison 2016-07-02 11:09:12 +01:00
Robert Osfield
7a63538fb9 Removed inappropriate use of Vec3us in osgAnimation as this relies upon nonexistant functionality in Vec3us and in general just doesn't make sense to attempt to use float point maths with a unsigned short. 2016-07-02 10:44:40 +01:00
Robert Osfield
2122980d0a Fixed number of processors setting 2016-07-02 10:14:06 +01:00
OpenSceneGraph git repository
9ae4a4fc27 Merge pull request #95 from marchelbling/tristripvisitor_index_option
Adds an indexMesh option to disable mesh reindexation
2016-07-01 18:07:16 +01:00
OpenSceneGraph git repository
d0b755e6cc Merge pull request #94 from marchelbling/gles_plugin_update
Updates gles plugin.

This PR updates the GLES plugin with latest Sketchfab changes:

    improves geometry splitting
    processes/cleans animation (for subsequent osgjs serialization)
    adds (yet another) normal smoother
2016-07-01 18:03:29 +01:00
OpenSceneGraph git repository
3c86aa8e01 Merge pull request #93 from marchelbling/osganimation
Updates to osgAnimation is mainly for the gles plugint to work correctly.

    adds Quaternion array
    reintroduces KeyframeContainer::linearInterpolationDeduplicate
    fixes MorphGeometry OSG serialization (target names)
2016-07-01 17:57:44 +01:00
Marc Helbling
da47f8a156 Adds an indexMesh option to disable mesh reindexation
This mainly breaks gles/osgjs when stripifying a MorphGeometry. It also
usually doesn't make sense to reindex an already indexed mesh.
2016-07-01 18:12:36 +02:00
Marc Helbling
9fbdaaae65 Updates gles plugin 2016-07-01 17:28:01 +02:00
Marc Helbling
43443928d0 Updates osgAnimation
This updates is mainly for the gles plugint to work correctly.

* adds Quaternion array
* reintroduces `KeyframeContainer::linearInterpolationDeduplicate`
* fixes MorphGeometry OSG serialization (target names)
2016-07-01 17:04:15 +02:00
Robert Osfield
7c0c98b504 Addd loop guard to prevent negative bit shift 2016-07-01 11:08:29 +01:00
Robert Osfield
ff50edfc57 Fixed types 2016-07-01 10:57:31 +01:00
Robert Osfield
9007ab7e1d Fixed types 2016-07-01 10:38:58 +01:00
Robert Osfield
96a442f3bc Fixed type 2016-07-01 10:35:18 +01:00
Robert Osfield
3b5dc50e30 Added intializers 2016-07-01 10:21:55 +01:00
Robert Osfield
243420c5d9 Added initializers 2016-07-01 10:13:14 +01:00
Robert Osfield
562619f794 Moved initializers 2016-07-01 09:59:21 +01:00
Robert Osfield
466337c148 Added initializers 2016-07-01 09:56:01 +01:00
Robert Osfield
d9dc8ca3b2 Added initializers 2016-07-01 09:54:58 +01:00
Robert Osfield
ca77f5223e Moved unused member variables to #if 0 blocks.
Added initiliazer
2016-07-01 09:52:35 +01:00
Robert Osfield
2842adeb98 Fixed indentation 2016-07-01 09:15:36 +01:00
Robert Osfield
ddb4a02098 Added initializer 2016-07-01 09:14:59 +01:00
Robert Osfield
7584fe0ba2 Added initializer 2016-07-01 09:13:21 +01:00
Robert Osfield
0f05a4ceaa Added intializer 2016-07-01 09:09:35 +01:00
Robert Osfield
64c4a35e9a Added initializers 2016-07-01 08:52:43 +01:00
Robert Osfield
ff5095e8d1 Added initializer 2016-07-01 08:49:55 +01:00
Robert Osfield
68b69b8021 Added initializer 2016-07-01 08:48:49 +01:00
Robert Osfield
8edbe1dc0d Added initiaizer 2016-07-01 08:43:32 +01:00
Robert Osfield
eff07fe61e Added initializer 2016-07-01 08:41:54 +01:00
Robert Osfield
22cb243bd9 Added initialziers 2016-07-01 08:40:25 +01:00
Robert Osfield
9f259731f8 Added initializer 2016-07-01 08:37:48 +01:00
Robert Osfield
c13ba702ee Added initializer 2016-07-01 08:36:54 +01:00
Robert Osfield
eab111a5f5 Replaced the old c style declaration of enum's as it was confusing Coverity 2016-07-01 08:35:08 +01:00
Robert Osfield
d3362f9a23 Added initializers 2016-07-01 08:19:51 +01:00
Robert Osfield
4668511c93 Added initializer 2016-07-01 08:16:39 +01:00
Robert Osfield
e81c48f974 Added initializers 2016-07-01 08:15:01 +01:00
Robert Osfield
82fabc94f9 Added initializer 2016-07-01 08:08:39 +01:00
Robert Osfield
91d60de028 Removed unused member variable and adding initializer 2016-07-01 08:06:42 +01:00
Robert Osfield
3c70d03d30 Added initializers 2016-07-01 08:03:03 +01:00
Robert Osfield
e9c4cbce5c Addded initializer 2016-07-01 08:00:49 +01:00
Robert Osfield
a7a8284786 Added initializer 2016-07-01 07:58:04 +01:00
OpenSceneGraph git repository
c919d64d25 Merge pull request #91 from bjornblissing/feature/DestructionOperation
CleanUpOperation added to Viewer
2016-07-01 06:40:52 +01: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
2ddcd14395 Added initializer 2016-06-30 14:17:51 +01:00
Robert Osfield
4d2bc269d9 Added initializers 2016-06-30 14:16:14 +01:00
Robert Osfield
3ae57e247f Added initializer 2016-06-30 14:12:01 +01:00
Robert Osfield
99458d061d Added initializers 2016-06-30 14:04:52 +01:00
Robert Osfield
ca721a8d05 Added initializer 2016-06-30 13:58:54 +01:00
Robert Osfield
b3765ac3cf Added handling of error condition 2016-06-30 11:31:02 +01:00
Robert Osfield
9e7d361a50 Added handling of error condition 2016-06-30 11:28:59 +01:00
Robert Osfield
6cd944e9c3 Added handling of error return value 2016-06-30 11:26:21 +01:00
Robert Osfield
d2579c0702 Added handling of error value 2016-06-30 11:24:50 +01:00
Robert Osfield
4ed8558178 Fixed handling of return values 2016-06-30 11:19:53 +01:00
Robert Osfield
75183eb3dd Fixed line endings 2016-06-30 11:19:24 +01:00
Robert Osfield
1b409fff8b Added handling of return value 2016-06-30 11:12:45 +01:00
Robert Osfield
cd4a51cf67 Added handling of return value 2016-06-30 11:11:00 +01:00
Robert Osfield
d4475e5b19 Added handling of return value 2016-06-30 11:03:40 +01:00
Robert Osfield
509c0380fa Added handling of return value 2016-06-30 11:00:38 +01:00
Robert Osfield
8f071e055f Added handling of false return 2016-06-30 10:58:17 +01:00
Robert Osfield
e5c0297167 Added handling of false return 2016-06-30 10:55:34 +01:00
Robert Osfield
876c4882a3 Fixed typo 2016-06-30 10:50:11 +01:00
Robert Osfield
72a80ee8cd Added handling of null dynamic_cast 2016-06-30 10:17:23 +01:00
Robert Osfield
ba3eaa83e0 Added handling of null dynamic_cast 2016-06-30 10:08:29 +01:00
Robert Osfield
e2730d0b5c Clean up clone 2016-06-30 10:03:51 +01:00
Robert Osfield
2a5098eacb Added handling of null pointer 2016-06-30 10:01:18 +01:00
Robert Osfield
be26725867 Added handling of null dynamic_cast 2016-06-30 09:59:27 +01:00
Robert Osfield
a469d60ed2 Added handling of null dynamic_cast. 2016-06-30 09:54:13 +01:00
Robert Osfield
576a265095 Added handlng of null dynamic_cast 2016-06-30 09:52:10 +01:00
Robert Osfield
cbba625b07 Added null pointer handling 2016-06-30 09:48:44 +01:00
Robert Osfield
314deedcf5 Added better null pointer handling 2016-06-30 09:46:27 +01:00
Robert Osfield
9e8d09bffc Improved error handling 2016-06-30 09:38:41 +01:00
Robert Osfield
6df325f651 Added handling of error return type 2016-06-30 09:29:32 +01:00
Robert Osfield
05d97aad28 Removed no longer used code 2016-06-30 09:09:54 +01:00
Robert Osfield
9b1107eb64 Improved check against number of bytes read 2016-06-30 08:27:49 +01:00
Robert Osfield
fec64f6d8c Added handling of NULL pointer case 2016-06-30 08:23:51 +01:00
Robert Osfield
7f335fd528 Added handling of possible zero divisor 2016-06-30 08:20:31 +01:00
Robert Osfield
1a10795198 Added handling of possible zero divisor 2016-06-30 08:16:29 +01:00
Robert Osfield
77812b32e0 Added handling of potential zero divisor 2016-06-30 08:14:48 +01:00
Robert Osfield
1c2aeb3138 Added handling of NULL 2016-06-30 08:13:01 +01:00
Robert Osfield
73cdc67367 Addd handling of NULL 2016-06-30 08:02:29 +01:00
Robert Osfield
de6eb1d97e Added handling of NULL 2016-06-30 07:59:51 +01:00
Robert Osfield
ac136d92e7 Added handling of NULL 2016-06-30 07:59:37 +01:00
Robert Osfield
1e0a187613 Added handling of out of memory 2016-06-30 07:50:40 +01:00
Robert Osfield
99a426d47d Added better handling of nulls 2016-06-30 07:50:14 +01:00
Robert Osfield
fa14b5263e Added initializer 2016-06-29 19:59:56 +01:00
Robert Osfield
a24cdb59de Fixed handling of null pointer 2016-06-29 18:01:29 +01:00
Robert Osfield
fb537e089b Cleaned up null pointer handling 2016-06-29 17:58:03 +01:00
Robert Osfield
274a197a82 Moved assignment to within safe block 2016-06-29 17:56:11 +01:00
Robert Osfield
d0bf7e8ce7 Added hanlding of null value 2016-06-29 17:51:32 +01:00
Robert Osfield
467054ba44 Added null pointer handling 2016-06-29 17:47:32 +01:00
Robert Osfield
625c559e8d Added null pointer handling 2016-06-29 17:43:37 +01:00
Robert Osfield
8589d59520 Added handling of null pointer 2016-06-29 17:35:20 +01:00
Robert Osfield
47842987c5 Added null pointer check 2016-06-29 17:33:45 +01:00
Robert Osfield
9fe0c23af4 Added better handling of null istream 2016-06-29 17:31:16 +01:00
Robert Osfield
3c1d3b981c Added null pointer handling 2016-06-29 17:29:28 +01:00
Robert Osfield
e3c48d9f45 Added handling of the possibility of null Options pointers 2016-06-29 17:06:48 +01:00
Robert Osfield
0876677fb2 Removed check against changed flag as check is aleady done outside the method so no need for a duplicate check 2016-06-29 16:07:39 +01:00
Julien Valentin
98b81821fb fix in StateSet.cpp
the State::DefineMap::changed flag is not resetted to false after currentDefines are updated
2016-06-29 16:05:14 +01: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
00b1173e70 Added osg::ScissorIndexed that wraps up glScissorIndexed function 2016-06-29 15:11:02 +01:00
Robert Osfield
412e9fc3dd Added osg::DepthRangeIndexed class to wrap up glDepthRangeIndexed functionality. 2016-06-29 12:28:28 +01:00
Laurens Voerman
af28adc01d Added osgshadermultiviewport example to test and demonstrate the new osg::ViewportIndexed class 2016-06-29 11:39:44 +01:00
Robert Osfield
54dbf438cc Fixed cast 2016-06-29 11:36:44 +01:00
Robert Osfield
e932c8e5e8 Added build of new osg::ViewportIndexed 2016-06-29 11:35:56 +01:00
Robert Osfield
e30b570b1f Revert "Fixed incorrect cast" as commit contained more changes than intended.
This reverts commit 2897ab13cb.
2016-06-29 11:34:20 +01:00
Robert Osfield
8d7d5d12a1 Added osg::ViewportIndexed that adds support for glViewportIndexed 2016-06-29 11:26:54 +01:00
Robert Osfield
2897ab13cb Fixed incorrect cast 2016-06-29 11:25:08 +01:00
Laurens Voerman
ec74518868 Added glViewerArray, glSissorArray, glDepthRangeArray etc. GL extension support 2016-06-29 09:53:04 +01:00
Robert Osfield
1df3cb9144 Fixed warnings 2016-06-28 19:49:48 +01:00
Robert Osfield
4223028ec1 Disabled -Wextra compile option for GCC + CLang as FBX headers generate lots of warnings we can't fix 2016-06-28 19:46:14 +01:00
Robert Osfield
b2e5e5b388 Revert "corrected syntax error in src/osgPlugins/fbx/ReaderWriterFBX.cpp"
This reverts commit 7a1324800f.
2016-06-28 18:39:12 +01:00
Robert Osfield
f4eb37ee08 Added initializer 2016-06-28 16:49:08 +01:00
Robert Osfield
418aa45a1b Added initializers 2016-06-28 16:47:11 +01:00
Robert Osfield
049d64dd20 Added initializer 2016-06-28 16:44:24 +01:00
Robert Osfield
56f6376de8 Added initializer 2016-06-28 16:42:33 +01:00
Robert Osfield
c6cd232f77 Added initializer 2016-06-28 16:40:57 +01:00
Robert Osfield
70f47cedc7 Replaced unsafe strcpy 2016-06-28 16:37:58 +01:00
Robert Osfield
847eea5b5d Replaced usage c string usage 2016-06-28 16:34:30 +01:00
Robert Osfield
96d3bd203f Replaced unsafe string usage 2016-06-28 16:33:13 +01:00
Robert Osfield
21354e62d4 Replaced unsafe c string usage with std::stringstream 2016-06-28 16:30:06 +01:00
Robert Osfield
55d6113375 Removed debug message 2016-06-28 16:25:21 +01:00
Robert Osfield
dc3d4cac53 Replaced unsafe c string usage with std::string 2016-06-28 16:11:14 +01:00
Robert Osfield
b5f880ba1d Replaced unsafe c string usage with std::string 2016-06-28 16:03:01 +01:00
Robert Osfield
7f1ba5f7df Replaced unsafe strcpy 2016-06-28 15:56:39 +01:00
Robert Osfield
26da8fc9ce Replaced unsafe c string usage with std::string 2016-06-28 15:52:35 +01:00
Robert Osfield
4f276d9d8e Fixed leak when open returns 0 2016-06-28 15:33:06 +01:00
Robert Osfield
07a0b52e6c Fixed leak when open returns 0 2016-06-28 15:31:55 +01:00
Robert Osfield
9aa8497fbf Removed line space 2016-06-28 13:44:20 +01:00
Robert Osfield
44255995e3 Cleaned up pointer checks 2016-06-28 13:44:00 +01:00
Robert Osfield
4e48fead44 Repplaced fscanf usage with ifstream to avoid safety issues 2016-06-28 13:38:35 +01:00
Robert Osfield
f7bbb4821b Added handling of failure to reclaim file 2016-06-28 09:32:38 +01:00
Robert Osfield
6937a8fcd3 Removed unneccessary close 2016-06-28 09:21:30 +01:00
Robert Osfield
9253ea845b Added better handling of reading of sizes 2016-06-28 09:11:39 +01:00
Robert Osfield
e062ddde20 Added initializers 2016-06-28 08:34:02 +01:00
Robert Osfield
931e3277b9 Fixed initializer 2016-06-28 08:32:35 +01:00
Robert Osfield
89c6fac40a Removed dead code 2016-06-27 17:38:32 +01:00
Robert Osfield
7778894767 Added missing break 2016-06-27 17:37:11 +01:00
Robert Osfield
055ec56068 Added message for unhandled mode types 2016-06-27 17:18:21 +01:00
Robert Osfield
a73b3ceb45 Fixed incorrect value 2016-06-27 17:15:28 +01:00
Robert Osfield
56955eea39 Removed logically dead code 2016-06-27 17:12:43 +01:00
Robert Osfield
aa0523f60a Removed logicaly dead code 2016-06-27 17:09:41 +01:00
Robert Osfield
63cb4b81a8 Replaced fgetc usage with custom handling that handles type and error values 2016-06-27 17:00:12 +01:00
Robert Osfield
194f3ac360 Fixed delete type 2016-06-27 16:31:11 +01:00
Robert Osfield
8e2b3291fb Removed unused local variable and move declaration to make it more readable. 2016-06-27 16:29:14 +01:00
Robert Osfield
207cb1436d Fixed override method inconsistency 2016-06-27 16:25:40 +01:00
Robert Osfield
a5fde3a369 Fixed override method inconsistency 2016-06-27 16:21:48 +01:00
Robert Osfield
9f67436b32 Fixed override method inconsistency 2016-06-27 16:20:56 +01:00
Robert Osfield
ec2d9ce67c Fixed override method inconsistency 2016-06-27 16:18:28 +01:00
Robert Osfield
0c80829bb8 Fixed override method inconsistency 2016-06-27 16:18:01 +01:00
Robert Osfield
6467e1ad08 Fixed override method inconsistency 2016-06-27 16:17:34 +01:00
Robert Osfield
4f7f94092c Fixed override method inconsistency 2016-06-27 16:16:03 +01:00
Robert Osfield
969deea75f Added initializer 2016-06-27 16:14:32 +01:00
Robert Osfield
ae53e0a212 Added initializers 2016-06-27 16:08:25 +01:00
Robert Osfield
41ee3104ee Removed dead code 2016-06-27 15:59:42 +01:00
Robert Osfield
d28e7588fa Added handling of return values 2016-06-27 15:59:04 +01:00
Robert Osfield
20866b8faa Added handling of null malloc 2016-06-27 15:22:55 +01:00
Robert Osfield
fbb42e0388 Added hanlding of return type 2016-06-27 15:22:46 +01:00
Robert Osfield
3999a16a1a Added handling of return value 2016-06-27 15:22:10 +01:00
Robert Osfield
5c25a3a0ea Added initializers 2016-06-27 15:06:54 +01:00
Robert Osfield
27595e9f02 Added initializers 2016-06-27 14:53:32 +01:00
Julien Valentin
c8a7ce4e52 Rolbacked RigGeometry with the hackyfix (I just add the compute boundcallback in the copy consturctor)
Modified headers of RigTransforms to comply with osg metamodel
2016-06-27 11:51:32 +01:00
Robert Osfield
4c149bd2e7 Added initializers and fixed float setting 2016-06-27 11:38:30 +01:00
Robert Osfield
73e4d6c176 Added intializer 2016-06-27 11:35:46 +01:00
Robert Osfield
62d1e7ac64 Restructed the cast 2016-06-27 11:33:55 +01:00
Robert Osfield
f749de1236 Removed redundent checks 2016-06-27 11:14:53 +01:00
Robert Osfield
27aeded9d9 Added initializers 2016-06-27 11:08:49 +01:00
Robert Osfield
eff60decc0 Cleaned up clone 2016-06-27 10:51:56 +01:00
Robert Osfield
4b3a719517 Added initializers 2016-06-27 10:39:58 +01:00
Robert Osfield
760794eff3 Added check against null 2016-06-27 10:30:15 +01:00
Robert Osfield
f65048410c Added initializer 2016-06-27 10:10:20 +01:00
Robert Osfield
29269ff15e Added initializers 2016-06-27 09:49:45 +01:00
Robert Osfield
f4149bd61e Added initializers 2016-06-27 09:49:04 +01:00
Robert Osfield
8fbf23f8c5 Added missing initializers 2016-06-27 09:40:48 +01:00
Julien Valentin
ce28b2e43e MorphGeometry fixes 2016-06-25 18:15:57 +01:00
Robert Osfield
40ccf503e4 Fixed warnings 2016-06-25 17:19:00 +01:00
Robert Osfield
45555c895d Fixed unsafe string handling 2016-06-25 16:33:09 +01:00
Robert Osfield
ca0fff8313 Added extern and export 2016-06-25 16:32:58 +01:00
Robert Osfield
1204c32430 Changed back to requiring osgDB namespace so it's clearer where function comes from. 2016-06-25 16:13:56 +01:00
Robert Osfield
94266eee50 Replaced strcpy with more robust osgDB::stringcopyfixedsize() usage. 2016-06-25 16:12:32 +01:00
Robert Osfield
ed59753741 Added namespace prefix 2016-06-25 16:10:56 +01:00
Robert Osfield
6d7d58fa12 Added osgDB::stringcopy and stringcopyfixedsize 2016-06-25 16:08:15 +01:00
Robert Osfield
bc6a8948cc Added null pointer check 2016-06-25 15:42:34 +01:00
Robert Osfield
3376bfbfc8 Added handling of when mesh->texcos is NULL 2016-06-25 15:40:30 +01:00
Robert Osfield
3609d84cef FIxed copy and paste error 2016-06-25 15:28:50 +01:00
Robert Osfield
3b54568e4b Added strncopy usage to avoid buffer overflow 2016-06-25 14:26:05 +01:00
Robert Osfield
025d58f32d Removed no longer used code 2016-06-25 14:19:52 +01:00
Robert Osfield
5f920b21ca Added initializers 2016-06-25 13:42:49 +01:00
Robert Osfield
aee1423e55 Added initializers 2016-06-25 13:36:18 +01:00
Robert Osfield
269eaff44e Added initializer 2016-06-25 13:33:27 +01:00
Robert Osfield
c882985fc5 Removed redundent pointer check 2016-06-25 12:39:50 +01:00
Robert Osfield
39317acd42 Changed return type to unsigned int to make it more compatible with serialization 2016-06-25 12:35:34 +01:00
Robert Osfield
949aca196d Refactored handling of StateAttiribute's that override the StateAttiribute::getMember() so that when they change their Member value they update the StateSet parents that own them to keep the StateSet's maps coherent. 2016-06-25 12:24:19 +01:00
Robert Osfield
f74eaae665 Changed key handling to use Qt enums rather than osgGA ones 2016-06-25 11:05:04 +01:00
Robert Osfield
26d2ed94f9 Fixed warning 2016-06-25 08:00:18 +01:00
Robert Osfield
5a8100a7f9 Fixed warning 2016-06-25 07:58:58 +01:00
Robert Osfield
ed0c9e2436 Fixed warning 2016-06-25 07:57:56 +01:00
Cedric Pinson
0ecb52ff82 Submitted with fixes by Julian Valentin 2016-06-25 07:49:56 +01:00
Robert Osfield
295da33cdf Fixed compute of numProcessors 2016-06-24 16:05:07 +01:00
Robert Osfield
9dffcaf36a Added default assingment of FrameStamp 2016-06-24 15:40:39 +01:00
Robert Osfield
23846f6478 Removed unneccessary pointer check 2016-06-24 15:36:00 +01:00
Robert Osfield
013857368e Added initializer 2016-06-24 15:34:52 +01:00
Robert Osfield
803fd8ac5d Restructed handling of LAST_POSITION 2016-06-24 15:33:24 +01:00
Robert Osfield
a1ac4dc906 Added initializer 2016-06-24 15:23:57 +01:00
Robert Osfield
70ff5f9ae4 Added initializers 2016-06-24 12:38:31 +01:00
Robert Osfield
8b527ac378 Added initializers 2016-06-24 12:34:20 +01:00
Robert Osfield
c05b7cffbb Added initializer 2016-06-24 12:28:36 +01:00
Robert Osfield
cda61d92b7 Added initializer 2016-06-24 12:26:16 +01:00
Robert Osfield
90f8c7c51b Added initializer 2016-06-24 12:24:28 +01:00
Robert Osfield
6db7d9e5d7 Added initializers 2016-06-24 12:14:37 +01:00
Robert Osfield
6bbd5299b6 Removed unused member variable 2016-06-24 12:12:50 +01:00
Robert Osfield
b9c3377d88 Added initializers 2016-06-24 12:11:09 +01:00
Robert Osfield
fe28b26171 Added initializers 2016-06-24 12:10:53 +01:00
Robert Osfield
0b55a21b97 Added initializers 2016-06-24 12:10:31 +01:00
Robert Osfield
688390113d Added initializers 2016-06-24 12:00:54 +01:00
Robert Osfield
601884131e Added initializers 2016-06-24 11:58:38 +01:00
Robert Osfield
0d427ed157 Added handling of null dynamic_cast 2016-06-24 11:52:54 +01:00
Robert Osfield
cdd1e3bf4c Added handling of null dynamic_cast<> 2016-06-24 11:50:54 +01:00
Robert Osfield
f8dd3bc4c5 Added handling null dynamic_cast 2016-06-24 11:50:07 +01:00
Robert Osfield
f42f6e4fb9 Added handling or null dynamic_cast 2016-06-24 11:49:14 +01:00
Robert Osfield
59bbb6ac77 Fixed copy and paste error 2016-06-24 11:39:22 +01:00
Robert Osfield
8d4ab16f2b Fixed copy and paste error. 2016-06-24 11:38:28 +01:00
Robert Osfield
ef93e42136 Added handling of dynamic_cast<> returning NULL 2016-06-24 11:31:15 +01:00
Robert Osfield
18fc7c28b0 Added handling of empty slides and layers 2016-06-24 11:29:25 +01:00
Robert Osfield
c2c532d2bb Added better handling of negative slideNum and layerNum values 2016-06-24 11:26:07 +01:00
Robert Osfield
5fae9a8b06 Added initializers 2016-06-24 11:20:55 +01:00
Robert Osfield
09f46f33da Added initializer 2016-06-24 10:51:34 +01:00
Robert Osfield
3d478670db Fixed float handling 2016-06-24 10:49:51 +01:00
Robert Osfield
91ea043209 Added handling of zero divisor 2016-06-24 10:46:51 +01:00
Robert Osfield
9639b10829 Fixed indentation and added check against NULL 2016-06-24 10:45:24 +01:00
Robert Osfield
09ddc022d6 Added restoring of std::cout format state 2016-06-24 10:32:11 +01:00
Robert Osfield
f55c7343e2 Added initializer 2016-06-24 10:25:17 +01:00
Robert Osfield
2ef68be262 Added initializers 2016-06-24 10:24:27 +01:00
Robert Osfield
29372d17cb Removed unused member variable 2016-06-24 10:22:45 +01:00
Robert Osfield
3bf7893665 Added intializer 2016-06-24 10:21:05 +01:00
Robert Osfield
6e7e286fa0 Fixed handling of when dynamic_cast<> returns NULL 2016-06-24 10:13:26 +01:00
Robert Osfield
9cdb65d5c7 Restructed to handle dyanmic_cast<> being NULL 2016-06-24 10:09:59 +01:00
Robert Osfield
bde5776a47 Added initializer 2016-06-24 10:06:31 +01:00
Robert Osfield
92baebe6c7 Added missing initializer 2016-06-24 10:05:30 +01:00
Robert Osfield
e696d1a0a3 Added initializer 2016-06-24 10:04:31 +01:00
Robert Osfield
fb9591d6bc Added handling of zero points 2016-06-24 10:02:39 +01:00
Robert Osfield
f47be656b4 Cleaned up pointer usage 2016-06-24 10:02:18 +01:00
Robert Osfield
c8d668b298 Added depecated message to redundent shape classes 2016-06-24 09:46:19 +01:00
Robert Osfield
0e21058d10 Added check against null 2016-06-23 17:58:35 +01:00
Robert Osfield
f3fbabd8b3 Fixed erronous type changes and inappropriate vector copy vs vector reference usage 2016-06-23 17:28:40 +01:00
Robert Osfield
1c787588ed Removed redundent check 2016-06-23 17:19:20 +01:00
Robert Osfield
07927084f2 Adde initializer 2016-06-23 17:17:05 +01:00
Robert Osfield
4c49d78166 Added initializer 2016-06-23 17:14:03 +01:00
Robert Osfield
91b029e81f Added initializer 2016-06-23 17:13:06 +01:00
Robert Osfield
96ded6e6bb Added initializers 2016-06-23 17:10:18 +01:00
Robert Osfield
e06253cf21 Added initializer 2016-06-23 17:08:04 +01:00
Robert Osfield
e9faa8890d Removed dead code 2016-06-23 17:04:30 +01:00
Robert Osfield
39860cfb71 Added minimum of 1 to make sure numProcessors is always valid 2016-06-23 16:53:12 +01:00
Robert Osfield
b8d1e4d2f6 Added minimum of 1 to make sure numProcessors is always valid 2016-06-23 16:52:16 +01:00
Robert Osfield
148d5e799e Added minimum usage to make sure that numProcessers is always 1 or greater 2016-06-23 16:50:35 +01:00
Robert Osfield
97c95ab491 Added check for null 2016-06-23 16:48:00 +01:00
Robert Osfield
130c02eb2e Restructed use of frameNumber to avoid multiple queries 2016-06-23 16:45:22 +01:00
Robert Osfield
72a4bc6394 Restructed check against null 2016-06-23 16:42:54 +01:00
Robert Osfield
79554fedf8 Added check for valid pointer 2016-06-23 16:40:58 +01:00
Robert Osfield
4c38068eb8 Added check before using pointer 2016-06-23 16:39:36 +01:00
Robert Osfield
eb4dcba21a Removed unused variable 2016-06-23 16:32:45 +01:00
Robert Osfield
b0285b0022 Added handling of return value 2016-06-23 16:32:30 +01:00
Robert Osfield
07137f4111 Fixed unitialized variables 2016-06-23 16:32:02 +01:00
Robert Osfield
5c9b66a48d Added initializer 2016-06-23 12:35:07 +01:00
Robert Osfield
1298ede4d5 Added initializer 2016-06-23 12:34:08 +01:00
Robert Osfield
ff38f84d04 Added initializer 2016-06-23 12:32:15 +01:00
Robert Osfield
8f7f6141e7 Added initializer 2016-06-23 12:30:36 +01:00
Robert Osfield
9c80078c07 Added initializer 2016-06-23 12:25:27 +01:00
Robert Osfield
e0d26ba1f5 Added copying of _syncSwapBuffers 2016-06-23 12:23:31 +01:00
Robert Osfield
1f73376476 Restructed the GLExtensions(..) constructor so that it now intializes all the variables to NULL if there is not a valid graphics context present 2016-06-23 12:19:59 +01:00
Robert Osfield
bc8452512f Added initializers and handling of null case 2016-06-23 11:03:38 +01:00
Robert Osfield
79f174aee4 Fixed return value 2016-06-23 10:52:16 +01:00
Robert Osfield
55b3becb7c Restructured to avoid NULL reference 2016-06-23 10:50:25 +01:00
Robert Osfield
5e73f0bb35 Removed dead code 2016-06-23 10:45:48 +01:00
Robert Osfield
46750d6b17 Removed dead code 2016-06-23 10:41:58 +01:00
Robert Osfield
e044fa0d70 Added handling of return value 2016-06-23 10:06:12 +01:00
Robert Osfield
57b999b310 Fixed check against null 2016-06-23 10:05:50 +01:00
Robert Osfield
07b6016c61 Added handling of return values 2016-06-23 10:01:19 +01:00
Robert Osfield
818843a6b6 Restructed the handling of a null compressor 2016-06-23 09:05:51 +01:00
Robert Osfield
1e4ea646ce Removed dead code 2016-06-23 08:55:52 +01:00
Robert Osfield
552c9b037f Moved initializer to constructors 2016-06-23 08:53:46 +01:00
Robert Osfield
ff3570bfa5 Added handling of return value 2016-06-23 08:53:14 +01:00
Robert Osfield
55d0e6918d Moved intializers into constructor. 2016-06-23 08:41:47 +01:00
Robert Osfield
954f782807 Added missing handling of return value 2016-06-23 08:28:25 +01:00
Robert Osfield
f197dd22cd Fixed possible divide by zero 2016-06-23 08:23:32 +01:00
Robert Osfield
12a81b656b Removed dead code 2016-06-23 08:20:27 +01:00
Robert Osfield
5fdf9829bb Removed dead code 2016-06-23 07:52:14 +01:00
Robert Osfield
14805dc8b9 Restructed setting of vertex array to avoid possible reference of null 2016-06-23 07:47:40 +01:00
Robert Osfield
20d1e4c9c5 Added initializer 2016-06-23 06:56:22 +01:00
Robert Osfield
1b6cc8e6b6 Added checks against null pointers and removed #if 0 block. 2016-06-23 06:51:34 +01:00
Robert Osfield
25e04b8463 Fixed typo 2016-06-22 15:53:37 +01:00
OpenSceneGraph git repository
55270779bf Merge pull request #87 from aluaces/patch-1
Fixed indentation for code snippet
2016-06-22 12:28:58 +01:00
Robert Osfield
2e65d37ddb Added missing initializer 2016-06-22 12:24:23 +01:00
Robert Osfield
c6378de489 Fixed loop for the wrong counter increment 2016-06-22 12:22:19 +01:00
Robert Osfield
5955d362a6 Added initializer 2016-06-22 12:10:49 +01:00
Robert Osfield
a5ec8b7eda Added initializers 2016-06-22 12:08:10 +01:00
Robert Osfield
1d7f75c490 Added initializer 2016-06-22 12:03:10 +01:00
Robert Osfield
f2704e0bf3 Removed dead code 2016-06-22 11:58:45 +01:00
Robert Osfield
f7afd3bab2 Added initializer 2016-06-22 11:51:04 +01:00
Robert Osfield
acaf9fd720 Added initializer 2016-06-22 11:48:30 +01:00
Robert Osfield
97acecdf66 Added initializer 2016-06-22 11:41:58 +01:00
Robert Osfield
8a83bd73bb Added missing initializers 2016-06-22 11:39:11 +01:00
Robert Osfield
471e556e91 Added initializers 2016-06-22 11:27:15 +01:00
Robert Osfield
67cc776696 Added default_value() template to help with creating templates that need to initialize members that are floats etc. 2016-06-22 11:26:11 +01:00
Robert Osfield
d5f18590fd Added intializers 2016-06-22 10:35:37 +01:00
Robert Osfield
9bebe4c607 Added initializers 2016-06-22 09:49:27 +01:00
Robert Osfield
0f8e09bde2 Removed info comment 2016-06-22 09:37:51 +01:00
Robert Osfield
9f4d123fff Fixed null termination 2016-06-22 09:33:18 +01:00
Robert Osfield
03b6cb024e Added initializers in case ply_get_element() doesn't overwrite the values. 2016-06-22 09:24:44 +01:00
Robert Osfield
011d60ec03 Fixed memory leak. 2016-06-21 17:04:22 +01:00
Robert Osfield
17bd80329a Fixed line endings 2016-06-21 17:03:33 +01:00
Robert Osfield
e64e70870d Changed the pointer arithmetic to be more explict and readable. 2016-06-21 11:45:19 +01:00
Alberto Luaces
bbbcdaf49a Fixed indentation for code snippet
Due to incorrect indentation, the code snippet was not being formatted correctly as code.
2016-06-21 11:23:33 +02:00
Robert Osfield
072eace1bf Removed the osgviewerGLUT as GLUT is terrible example of how to build a modern 3D graphics application. 2016-06-21 09:21:45 +01:00
Robert Osfield
7fedcad075 Reverted to C style for loop initialization 2016-06-21 08:14:00 +01:00
Robert Osfield
51b246d63a Fixed COVERITY reported overflow defect. 2016-06-20 19:06:01 +01:00
Robert Osfield
a185c2778f Restructed copy to avoid pointer artithmetic when only single float is being used to avoid Coverity reported defect. 2016-06-20 17:59:52 +01:00
Robert Osfield
04d387eecf Fixed line endings 2016-06-20 17:57:41 +01:00
Robert Osfield
26aa519803 Added string termination 2016-06-20 17:39:57 +01:00
Robert Osfield
5e3c5a18c6 Fixed string null termination defects 2016-06-20 17:35:25 +01:00
Robert Osfield
3d43b775d2 Addd explict setting of 0 string termination. 2016-06-20 17:05:10 +01:00
Robert Osfield
438332d39b Introduced local cursormap variable to make it clearer which containers are being worked upon. 2016-06-20 16:50:21 +01:00
Robert Osfield
87b963fb50 Removed no longer used Designer Workbench plugin.
It's code quality is poor and as there has been no sign that it's used in the community decided to remove it
rather than spend time trying to fix the mess it's in.
2016-06-20 14:06:21 +01:00
Robert Osfield
74cb7df3c0 Fixed potential memory leak 2016-06-20 14:04:38 +01:00
Robert Osfield
1573140165 Fixed potential memory leaks 2016-06-20 14:00:47 +01:00
Robert Osfield
ce7c37851b Fixed potential memory leak 2016-06-20 13:37:59 +01:00
Robert Osfield
7f99182c04 Moved the setUserData(new TileIdentifier(..)) so that all branches can utilize it. 2016-06-20 12:52:49 +01:00
Robert Osfield
949d71f2b6 Added missing initializers 2016-06-20 12:46:00 +01:00
Robert Osfield
f2297fd100 Added missing initializers 2016-06-20 12:40:46 +01:00
Robert Osfield
8f43268432 Added check to make sure undefined condition happens due to unitialized variables. 2016-06-20 12:27:47 +01:00
Robert Osfield
e09403a80c Added intializer for char[] to squash Coverity "defect". 2016-06-20 12:20:44 +01:00
Ralf Habacker
67e6f675e6 example_osgobjectcache: Add a check that we really get the correct nodes. 2016-06-20 11:39:25 +01:00
Ralf Habacker
7876c7915b clang 6.0 compile fixes. 2016-06-20 10:32:42 +01:00
Ralf Habacker
69929f596f Fix finding object cache entries. 2016-06-20 10:26:12 +01:00
Robert Osfield
5f38374b7a Build fixes for building with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF.
Added spacing to make code more readable.
2016-06-20 10:23:05 +01:00
Ralf Habacker
fff9cd7d38 Add osgobjectcache example. 2016-06-20 10:20:17 +01:00
OpenSceneGraph git repository
e499333036 Merge pull request #86 from spthaolt/master
corrected syntax error in src/osgPlugins/fbx/ReaderWriterFBX.cpp
2016-06-20 06:42:34 +01:00
Thao Le
7a1324800f corrected syntax error in src/osgPlugins/fbx/ReaderWriterFBX.cpp 2016-06-19 21:07:37 +07:00
Robert Osfield
5dcea9eb21 Replaced old slow path deprecated_osg::Geometry code 2016-06-17 15:39:19 +01:00
Robert Osfield
a8e4df5611 Replaced deprecated_osg::Geometry usage 2016-06-17 14:13:35 +01:00
Robert Osfield
b65be226b0 Converted code across to using non deprecated version of osg::Geometry 2016-06-17 13:04:41 +01:00
Robert Osfield
f22a39fbf0 Removed pfb plugin as the Perform dependency it relies upon has long since disappeared 2016-06-17 12:52:04 +01:00
Robert Osfield
7d34e8f441 Build fixes to reflect removal of deprecated_osg::Geometry 2016-06-17 12:49:44 +01:00
Robert Osfield
62fd0ef368 Removed old examples that relied upon deprecated functionality 2016-06-17 11:53:34 +01:00
Robert Osfield
8e26ebd23e Fixed coverity detected defect:
Incorrect values read from a different memory region will cause incorrect computations. In osgDB::​base64_decode_value(char): Out-of-bounds read from a buffer
2016-06-17 10:57:17 +01:00
Robert Osfield
5c89ae5a15 Fixed coverity defects, two missing checks for error condition and resource leak. 2016-06-17 10:51:53 +01:00
Robert Osfield
9f656212d5 Fixed memory leak 2016-06-17 10:42:02 +01:00
Julien Valentin
e236acfed5 Added OpenGL extensions related to shader subroutine 2016-06-17 10:35:25 +01:00
Robert Osfield
0836421a66 Merge branch 'coverity_scan' 2016-06-17 10:17:18 +01:00
Robert Osfield
aea83494c1 Removed deprecated_osg::Geometry and cleaned up the deprecated Geometry::set*Binding() calls 2016-06-17 10:12:11 +01:00
Robert Osfield
951c41cf9e Fixed indentation, replaced dynamic_cast<> with static_cast<> as we know the type and add check against null pointers 2016-06-17 09:48:21 +01:00
Robert Osfield
09df93813d Added missing check against null 2016-06-17 09:40:35 +01:00
Robert Osfield
83330fe9fb Added missing checks against viewer being valid and added missing break. 2016-06-17 09:33:56 +01:00
Robert Osfield
234d6cf431 Added if (texture) to fix bug when the dynamic_cast<> returns NULL. 2016-06-17 09:24:13 +01:00
Robert Osfield
f5465e82a1 Merge branch 'coverity_scan' 2016-06-17 09:15:37 +01:00
Robert Osfield
0696e49f2d Changed dyanmic_cast<> to static_cast<> as code is written in a way that the type is always known. 2016-06-17 08:53:38 +01:00
Robert Osfield
79c6ac38df Fixed logically dead code detected by Coverity 2016-06-17 07:52:41 +01:00
Robert Osfield
c85c006557 Removed logically dead code detected by Coverity 2016-06-17 07:46:39 +01:00
Jordi Torres
44609e903c Add coverity scan badge 2016-06-16 16:07:55 +02:00
Jordi Torres
dcc9b9f9be Modified coverity build command to avoid creating dirs 2016-06-16 12:55:27 +02:00
Julien Valentin
78b99c7143 Refactored osg::TextureBuffer to support assigning any type of osg::BufferData rather than just osg::Image as was previously required.
Refactored osgforest and osggpucull examples to take account of changes to TextureBuffer.

Added osg::DrawIndirectBufferBinding.
2016-06-15 19:05:35 +01:00
Jordi Torres
5a8d976356 Changes to travis.yml with the new token for coverity scan 2016-06-15 18:47:21 +02:00
Robert Osfield
7d66a57bc0 Fixed indentation 2016-06-15 15:38:52 +01:00
Robert Osfield
3cc6648938 Another attempt to resovle coverity_scan build issue 2016-06-15 11:42:01 +01:00
Robert Osfield
b61f29c7ef Another rev of .travis.yml to see if we can tease Coverity scan into action. 2016-06-15 10:49:55 +01:00
Robert Osfield
819ce6c0d1 Removed redundent _boundingBoxComputed 2016-06-14 18:27:27 +01:00
Robert Osfield
99bb4b8d17 How to debug tavis script when documentation is so spartan? 2016-06-14 17:18:22 +01:00
Robert Osfield
761dea8591 Another rev of .travis.yml to try and get things working 2016-06-14 17:13:39 +01:00
Robert Osfield
6471e760c8 As an experiment moved the coverity_scan code into the linux addons: block 2016-06-14 16:51:07 +01:00
Robert Osfield
9139e8acb8 Added {} brackets around OSG_DEBUG usage to avoid issues with marco's expanding if else. 2016-06-14 16:42:06 +01:00
Robert Osfield
8457990bb1 Removed deprecated register keyword usage 2016-06-14 16:40:15 +01:00
Robert Osfield
23513b5ab6 Fixed line endings 2016-06-14 16:39:29 +01:00
Robert Osfield
4115cfc8f9 Removed use of deprecated register keyword 2016-06-14 16:37:31 +01:00
Ralf Habacker
dfb8b71526 Fix 'Non-static class member "yy_lp" is not initialized in this constructor nor in any functions that it calls".
Coverity CID 126893:  Uninitialized members  (UNINIT_CTOR)
2016-06-14 12:43:44 +01:00
Ralf Habacker
85cd1c456f Identify files in object cache by filename and optional provided options.
Objects with the same filename may be different from others based on the provided
plugin options. Using filename *and* the provided options as object cache key
helps to avoid fetching the wrong object.
2016-06-14 12:27:33 +01:00
Robert Osfield
3816e4c76e Updated SO version number to reflect changes to API 2016-06-14 12:00:36 +01:00
Julien Valentin
2ac8379cfc osgDB Wrapper Associates Revision Tagging 2016-06-14 11:43:45 +01:00
Robert Osfield
dcac0c1611 Changed the build to run on 3 cores. 2016-06-14 09:44:50 +01:00
Robert Osfield
2db7694f57 Added first cut of Coverity Scan support 2016-06-14 09:30:00 +01:00
OpenSceneGraph git repository
a236f18b17 Merge pull request #83 from filnet/warnings
Fixed various compilation warnings on msys2
2016-06-14 08:52:54 +01:00
OpenSceneGraph git repository
69cc48b8f0 Merge pull request #82 from filnet/ffmpeg
msys2: fix ffmpeg pluging compilation error due to spurious stdint re…
2016-06-14 08:50:14 +01:00
Robert Osfield
ba1dd7c3cf Updated date. 2016-06-13 17:10:47 +01:00
Robert Osfield
4c5ca932c8 Added #include <string> in case other headers don't include it. 2016-06-13 16:24:01 +01:00
Philippe Renon
3d9aa3ef29 msys2: fixed ignoring #pragma warning 2016-06-11 17:45:37 +02:00
Philippe Renon
3bf6fb1778 msys2: fixed redefined include warnings 2016-06-11 17:45:36 +02:00
Philippe Renon
bc1185c41a msys2: fixed converting to non-pointer type 'long long int' from NULL 2016-06-11 17:45:35 +02:00
Philippe Renon
9f456a2722 msys2: fixed uninitialized variable 2016-06-11 17:45:19 +02:00
Philippe Renon
861b96e154 msys2: fix ffmpeg pluging compilation error due to spurious stdint related includes 2016-06-11 17:39:52 +02: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
157ee3dd7d Fixed unitialized member variable 2016-06-10 19:40:15 +01:00
Robert Osfield
732e770f87 Fixed unitialized member variable 2016-06-10 19:35:44 +01:00
Robert Osfield
34e65f15d0 FIxed unitialized member variables 2016-06-10 19:33:47 +01:00
Robert Osfield
12d4580ee5 Fixed memory leak 2016-06-10 19:27:46 +01:00
Robert Osfield
8fe37bdf63 Fixed memory leak 2016-06-10 19:25:07 +01:00
Robert Osfield
358a882031 Updated version number of to 3.5.4 2016-06-10 18:03:18 +01:00
Robert Osfield
07afdcd46c Fixed memory leak 2016-06-10 17:24:03 +01:00
Robert Osfield
e2fcc32d7c Fixed memory leak 2016-06-10 17:19:41 +01:00
Robert Osfield
afb6f3b62a Fixed memory leak 2016-06-10 17:09:34 +01:00
Robert Osfield
d221066d9a Fixed memory leak 2016-06-10 17:06:04 +01:00
Robert Osfield
d833a5be92 Fixed memory leak 2016-06-10 17:01:42 +01:00
Robert Osfield
df90ed5ed0 Added use of ref_ptr<> to fix memory leak 2016-06-10 16:59:19 +01:00
Robert Osfield
dc7cefb6f2 Fixed memory leak 2016-06-10 16:54:46 +01:00
Robert Osfield
917d065292 Added use of ref_ptr<> to fix memory leak 2016-06-10 16:44:50 +01:00
Robert Osfield
813c103232 Restructed to fix memory leak 2016-06-10 16:41:13 +01:00
Robert Osfield
5a6d4f69e1 Added use of ref_ptr<> to fix memory leak 2016-06-10 16:36:13 +01:00
Robert Osfield
4b3c7e47a5 Added ref_ptr<> usage to address memory leaks 2016-06-10 16:34:36 +01:00
Robert Osfield
79dd8111a5 Added missing intializers to address Coverity issue 2016-06-10 16:30:21 +01:00
Robert Osfield
615114c900 Added assert() to make it clear to Coverity that both prev and next won't be null 2016-06-10 16:16:29 +01:00
Robert Osfield
40725ad707 Fixed memory leak detected by Coverity 2016-06-10 15:53:58 +01:00
Robert Osfield
6d18b3d74e Fixed memory leak detected by Coverity 2016-06-10 15:49:24 +01:00
Robert Osfield
05a505fb1f Fixed "User after free" bugs reported by Coverity. 2016-06-10 15:24:19 +01:00
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
6a65b935fa Fixed uninitialized member variable. 2016-06-10 14:16:49 +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
Robert Osfield
12635b6571 Reordered paramter usage to fix coverity warning about parameter names not matching 2016-06-10 13:31:51 +01:00
Robert Osfield
af11e35fcb Fixed invalidated iterator bug pick up by Coverity. 2016-06-10 12:44:26 +01:00
Robert Osfield
69046511de Fixed iterator invalidation bug picked by Covertiy scan. 2016-06-10 12:03:48 +01:00
Robert Osfield
721e079211 Rewrote Window::setNextFocusable() to address a bug in the management of the search iterator. Covertiy reported bug "Undefined behavior may result; the program may crash or subtly misbehave.
In osgWidget::​Window::​setNextFocusable(): An invalid or past-the-end iterator is being used."
2016-06-09 12:08:47 +01:00
Robert Osfield
9ec4da47f5 Fixed "Using invalid iterator" bug in getTile() methods, detected by Covertity. 2016-06-09 11:41:14 +01:00
OpenSceneGraph git repository
1f240051c5 Merge pull request #80 from jtorresfabra/changeReadmeToMD
Changed Readme file to markdown
2016-06-09 11:29:03 +01:00
Jordi Torres
575f6f0cf3 Changed Readme file to markdown 2016-06-09 12:18:44 +02:00
OpenSceneGraph git repository
cef3db6e64 Merge pull request #79 from jtorresfabra/addTravisStatus
Added travis CI status label to github
2016-06-09 10:59:44 +01:00
Jordi Torres
aea8c2761c Added travis CI status label to github 2016-06-09 11:50:12 +02:00
Julien Valentin
ac26ba7e5b Shader subroutine related funcs added 2016-06-09 10:48:05 +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
OpenSceneGraph git repository
6db4ec5c08 Merge pull request #78 from LaurensVoerman/master
visual studio 2015 warning fixes:
2016-06-08 16:48:29 +01:00
Robert Osfield
01ae93619a Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2016-06-08 16:10:48 +01:00
OpenSceneGraph git repository
c18d344e09 Merge pull request #76 from jtorresfabra/travis-add
initial travis file, support for ubuntu trusty and osx builds
2016-06-08 16:10:39 +01:00
Laurens Voerman
09badeb19c Merge remote-tracking branch 'upstream/master' 2016-06-08 16:16:48 +02:00
Robert Osfield
121cbf09c5 Fixed unused parameter warning. 2016-06-08 13:50:20 +01:00
Robert Osfield
656649084d Fixed unused parameter warning. 2016-06-08 13:40:02 +01:00
Robert Osfield
9290aaad0f Fixed unused parameter warning. 2016-06-08 13:38:40 +01:00
Robert Osfield
018022fd9b Fixed unused parameter warning. 2016-06-08 13:37:17 +01:00
Robert Osfield
d55b64061b Fixed unused parameter warning. 2016-06-08 13:36:18 +01:00
Robert Osfield
4e04265212 Fixed unused parameter warning. 2016-06-08 13:35:46 +01:00
Robert Osfield
dbb88b5456 Fixed unused parameter warning. 2016-06-08 13:34:55 +01:00
Robert Osfield
69a0a7331c Fixed unused parameter warning. 2016-06-08 13:34:33 +01:00
Robert Osfield
ec0e30017c Fixed unused parameter warning. 2016-06-08 13:32:14 +01:00
Robert Osfield
d2129d4b9a Fixed unused parameter warning. 2016-06-08 13:30:09 +01:00
Robert Osfield
67361b8947 Fixed unused parameter warning. 2016-06-08 13:28:18 +01:00
Robert Osfield
4e39f98854 Fixed unused parameter warning. 2016-06-08 13:26:00 +01:00
Robert Osfield
1eaaaac340 Fixed unused parameter warning. 2016-06-08 13:25:02 +01:00
Robert Osfield
d022da5906 Disabled -Wextra as the warning it generates is bengin and fixing it would introduce warnings on other platforms 2016-06-08 13:22:54 +01: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
b72929d84b Fixed unused parameter warning. 2016-06-08 13:20:07 +01:00
Robert Osfield
0cb00424ee Fixed -Wextra warnings 2016-06-08 12:26:40 +01:00
Robert Osfield
59a1d79713 Fixed -Wextra warnings 2016-06-08 12:24:46 +01:00
Robert Osfield
94881d45a6 Fixed unused parameter warning. 2016-06-08 12:22:27 +01:00
Robert Osfield
8653c83342 Fixed unused parameter warning. 2016-06-08 12:22:12 +01:00
Robert Osfield
c7c1f6a27e Fixed unused parameter warning. 2016-06-08 12:21:51 +01:00
Robert Osfield
b67a331627 Fixed unused parameter warning. 2016-06-08 12:21:29 +01:00
Robert Osfield
6c8bcc5009 Fixed unused parameter warning. 2016-06-08 12:19:53 +01:00
Robert Osfield
d9ddf7c5be Fixed unused parameter warning. 2016-06-08 12:16:58 +01:00
Robert Osfield
6fab8cadd3 Fixed unused parameter warning. 2016-06-08 12:15:51 +01:00
Robert Osfield
0acb419cf5 Fixed unused parameter warning. 2016-06-08 12:14:35 +01:00
Robert Osfield
e6252256e0 Fixed unused parameter warning. 2016-06-08 12:10:00 +01:00
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
fff4b4ae65 Fixed unused parameter warning. 2016-06-08 11:02:51 +01: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
8bfe67b37b Fixed unused parameter warning. 2016-06-08 10:54:36 +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
782e867a7c Fixed unused parameter warning. 2016-06-08 10:34:40 +01:00
Robert Osfield
16645b1e25 Added -Wmaybe-uninitialized -Wextra warnings to GNU CXX build. 2016-06-08 10:21:57 +01:00
Robert Osfield
62f97923e0 Fixed unused parameter warning. 2016-06-08 10:19:57 +01:00
Robert Osfield
de80cac99f Fixed -Wextra warnings 2016-06-08 10:18:23 +01:00
Robert Osfield
5bdd65c300 Fixed unused parameter warning. 2016-06-08 10:17:47 +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
b1539418b3 Fixed unused parameter warning. 2016-06-08 09:46:58 +01:00
Robert Osfield
aef2574b8d Fixed -Wextra warnings 2016-06-08 09:46:09 +01:00
Robert Osfield
7bb0f437c1 Fixed unused parameter warning. 2016-06-08 09:44:39 +01:00
Robert Osfield
b51c8bed46 Fixed unused parameter warnings 2016-06-08 09:43:40 +01:00
Robert Osfield
f213868673 Fixed unused parameter warning. 2016-06-08 09:43:05 +01:00
Robert Osfield
6f68915425 Fixed unused parameter warning. 2016-06-08 09:38:22 +01:00
Robert Osfield
2955fc8bb2 Disabled the -Wextra warnin the warnings that can't be fixed due to optional code paths. 2016-06-08 09:37:43 +01:00
Robert Osfield
1a3a851f6e Fixed unused parameter warning. 2016-06-08 09:34:34 +01:00
Robert Osfield
d712784177 Disabled the -Wextra warning as resolve the warnings will create other warnings under other compilers 2016-06-08 09:33:56 +01:00
Robert Osfield
ef73d2449e Fixed -Wextra warnings 2016-06-08 09:20:16 +01:00
Robert Osfield
8ba7998623 Fixed -Wextra warnings 2016-06-08 09:07:32 +01:00
Robert Osfield
a16c34208f Fixed unused parameter warning. 2016-06-08 09:06:42 +01:00
Robert Osfield
ee30c7d0a5 Fixed -Wextra warningsw 2016-06-08 09:05:34 +01:00
Robert Osfield
b19c879485 Fixed unused parameter warning. 2016-06-08 09:04:01 +01:00
Robert Osfield
bfff44ac9d Fixed unused parameter warning. 2016-06-08 09:01:47 +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
Robert Osfield
10e27681dd Fixed "unreferenced formal parameter" warnings 2016-06-07 08:53:42 +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
27caa9c1b1 Removed redundent _EXT 2016-06-06 12:05:28 +01:00
Jethro Leevers
08a823d857 Added support for GL_LINE_STRIP_ADJACENCY_EXT 2016-06-06 11:59:56 +01:00
Robert Osfield
0a95fd875d Removed the use of register hint and cleaned up indentation 2016-06-04 18:40:37 +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
7dbb4b8c5f Updated AUTHORS file 2016-06-03 18:53:24 +01:00
Robert Osfield
8d55c5b8e9 Updated ChangeLog 2016-06-03 18:24:53 +01:00
Julien Valentin
71339906c0 Fixed little bug in DrawArraysLength (instancing not supported).
Corrected PrimitiveSet.cpp in order DrawArraysLength can be instanced.
It's the only pr missing code
if (_numInstances>=1)      glDrawXXXInstanced(...,_numInstances);
else glDrawXXX();
2016-06-03 17:57:04 +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
Björn Blissing
6c842a534e Last two files with fixes to the virtual inheritance warnings...
I have also attached the fix to the type shadowing problem in ConvexPolyhedron.cpp
2016-06-03 17:33:45 +01:00
Björn Blissing
abf34d2838 fix for the rest of the VS2015 virtual inheritance warnings. Same as for issues as for the Operation class. 2016-06-03 17:30:12 +01:00
Björn Blissing
e8f103afc9 VS2015 build fix 2016-06-03 17:22:28 +01:00
Jordi Torres
35705cedcf initial travis file, support for ubuntu trusty and osx builds 2016-06-03 13:41:19 +02:00
Björn Blissing
66a1e564d7 Fixed VS2015 compiler warnings 2016-06-03 11:30:48 +01:00
Robert Osfield
afe89e8d94 Added float variants of osg::PI etc. in the form osg::PIf
Converted osg::PI usage to osg::PIf in ShapeDrawable.cpp to address Windows build errors
2016-06-03 11:28:10 +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
7d7c0daa5e Added check against GCC version when adding the -Wshadow warning to OSG_AGGRESSIVE_WARNING_FLAGS so that it's only used in versions later than 4.9. 2016-06-02 20:00:42 +01:00
Robert Osfield
b1655dd17b Moved the REGISTER_WINDOWINGSYSTEMINTERFACE macro into the osgViewer namespace 2016-06-02 17:54:24 +01:00
Robert Osfield
9aef7d2954 Removed osgViewer:: prefix to addres build error 2016-06-02 17:50:53 +01:00
Juan Hernando Vieites
42af2d3597 The current implementation of readImageFromCurrentTexture doesn't consider the texture rectangle mode.
Find attached a version of the file that corrects this issue
2016-06-02 16:04:06 +01:00
Robert Osfield
4d2221bdb3 Fixed potential memory leak 2016-06-02 15:43:31 +01:00
Robert Osfield
f10e931f82 Fixed uninitialized variable. 2016-06-02 15:41:15 +01:00
Robert Osfield
700e38ba9d Added handling of failure to create ElementBufferObject. 2016-06-02 15:35:47 +01:00
Robert Osfield
9eb9186200 Removed debugging code 2016-06-02 15:23:38 +01:00
Robert Osfield
f16b805e0d Moved status check to quieten coverity warning 2016-06-02 14:56:43 +01:00
Robert Osfield
66ee7daac3 Added missing break 2016-06-02 14:53:11 +01:00
Robert Osfield
d858195d66 Removed debug message 2016-06-02 14:38:23 +01:00
Robert Osfield
9dee2ecf33 Fixed redundent checks and clean up clone usage 2016-06-02 14:36:38 +01:00
Robert Osfield
d6b6d10611 Added missing break 2016-06-02 14:33:32 +01:00
Robert Osfield
d038866649 Fixed method to match parent class. 2016-06-02 14:31:44 +01:00
Robert Osfield
09bad85522 Fixed method to match parent class. 2016-06-02 14:30:58 +01:00
Robert Osfield
203e5f7ef8 Removed redudent codepaths, standardizing on the most portable Texture2D path. 2016-06-02 14:22:25 +01:00
Robert Osfield
5c7e155a69 Removed redudent code paths 2016-06-02 14:18:12 +01:00
Robert Osfield
26e489f17d Cleaned up the cloning usage 2016-06-02 13:51:46 +01:00
Robert Osfield
2b3ecb4af8 Fixed unitialized variables 2016-06-02 13:23:34 +01:00
Robert Osfield
dd9bcf6013 Set default value of OSG_USE_REF_PTR_SAFE_DEREFERENCE of OFF to avoid the check overhead polutting all OSG applications. 2016-06-02 13:03:07 +01:00
Robert Osfield
c0b560175c Fixed typo 2016-06-02 12:43:09 +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
Robert Osfield
88a01aa09d Bumped version number for 3.5.3 dev release 2016-06-02 11:25:40 +01:00
Robert Osfield
045fa05b0d Restructed the control of OSG_AGGRESSIVE_WARNINGS_FLAGS to make it possible to edit them in ccmake/CMakeSetup.
Changed the name of OSG_USE_AGGRESSIVE_WARNINGS to OSG_AGGRESSIVE_WARNINGS to make sure it sits alongside the OSG_AGGRESSIVE_WARNINGS_FLAGS within ccmake
so that it's easier to see how the two variables are coupled.
2016-06-02 11:06:50 +01:00
Davide Raccagni
6428c33d30 Fixed version of CMakeLists.txt when you check BUILD_OPENTHREAD_WITH_QT and compile with Visual Studio 2015 2016-06-02 10:06:58 +01:00
Robert Osfield
a58f50e6fd Fixed line endings 2016-06-02 10:04:36 +01:00
Robert Osfield
5211c782d8 Added _LIBRARIES var to mix 2016-06-01 16:22:42 +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
5c5753682b Fixed line endings 2016-06-01 15:09:21 +01:00
Robert Osfield
d3c6dc6f34 Fixed doxygen warnings 2016-06-01 14:20:14 +01:00
Robert Osfield
99391a2cea Removed no longer supported doxygen settings 2016-06-01 13:41:17 +01:00
Robert Osfield
58bf998442 Fixed line endings 2016-06-01 13:40:06 +01:00
Robert Osfield
2be4e3c4d6 Fixed missing " 2016-06-01 12:50:38 +01:00
Robert Osfield
ebfbc3dd78 Added macosx10.11 to the list of supported OSX SDK's 2016-06-01 11:41:10 +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
Julien Valentin
5a4a5c3507 Added glDrawArraysIndirect, glMultiDrawArraysIndirect, glDrawElementsIndirect and glMultiDrawElementsIndirect extensions. 2016-06-01 10:01:44 +01:00
Stephan van Alste
e6d200abfb Do not install non existant pdb file in release build mode 2016-05-31 17:05:39 +01:00
Ralf Habacker
fc3e30ef25 Install msvc debug files along with the binaries 2016-05-31 17:02:33 +01:00
Ralf Habacker
c31baa96de Fixed bug not detecting unc pathes in osgDB::isAbsolutePath() 2016-05-31 16:14:51 +01:00
Alberto Luaces
68baf15806 defines for building on Hurd and BSD kernels 2016-05-31 12:58:57 +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
Pjotr Svetachov
1823341cce small optimization to the osgb/t serializers. 2016-05-31 11:27:30 +01:00
Nguyen Van Truong
60c3998143 I Use two touch screen in my App. I had a bug touch point in secondary screen ( the touch point not same mouse push point). 2016-05-31 11:05:02 +01:00
Robert Osfield
8336ce121e Fixed indentation 2016-05-31 10:54:38 +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
Jannik Heller
55e5d74a1c Fixed typo of method name 2016-05-30 13:44:54 +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
31592d206b Changed the RenderStageCache::RenderStageMap to use map<Referenced*, ref_ptr<RenderStage>> in place of map<CullVisitor*, ref_ptr<RenderStage>> to
avoid problems of dynamic_cast<> on an object that is being deleted.
2016-05-27 09:47:07 +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
8c7806eab3 From Philippe Renon and Robert Osfield, osgViewer::Viewer::checkNeedToDoFrame should return true when only the root node has an update callback.
Note, from Robert, I took Philippe modifications to Viewer.cpp and reformated them slightly to avoid a double check against getSceneData()!=0 and then rolled
the changes out to CompositeViewer::checkNeedToDoFrame() to ensure that both implementations work the same.
2016-05-26 17:49:06 +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
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
Robert Osfield
e8aa106184 Fixed shadows warnings 2016-05-25 13:58:06 +01:00
Robert Osfield
426fd3acb1 Fixed shadows warnings 2016-05-25 13:27:35 +01:00
Robert Osfield
89b061e318 Fixed shadows warning 2016-05-25 13:22:51 +01:00
Robert Osfield
1cc0f31e30 Fixed shadows warnings 2016-05-25 11:30:49 +01:00
Robert Osfield
9cb714cd39 Fixed shadows warning and an associated by in osgAnimation::Statshandler::changeYposition(..) 2016-05-25 11:20:13 +01:00
Robert Osfield
13dfd34ab6 Fixed shadows warnings 2016-05-25 11:11:11 +01:00
Robert Osfield
9ba599fe4c Fixed shadows warnings 2016-05-25 11:00:35 +01:00
Robert Osfield
831f406d17 Fixed shadows warnings 2016-05-25 10:26:35 +01:00
Robert Osfield
8f20bc9147 Fixed shadows warnings 2016-05-25 10:10:43 +01:00
Robert Osfield
92ffa85917 Fixed line endings 2016-05-25 10:09:18 +01:00
Robert Osfield
559f138152 Fixed shadows warnings 2016-05-25 09:56:40 +01:00
Robert Osfield
ff9617d210 Fixed RenderStageCache's handling of Observer functionality that was causing a crashing on exit in osgoit and osgprerender examples. 2016-05-24 20:46:44 +01:00
Robert Osfield
c36c0033fd Fixed shadows warnings 2016-05-23 20:02:36 +01:00
Robert Osfield
2056800017 Fixed shadows warning 2016-05-23 16:22:49 +01:00
Robert Osfield
4b61f4c95d Fixed shadows warnings 2016-05-23 16:20:59 +01:00
Robert Osfield
5260e3a35e Fixed build error introduced by c3f2711b09 2016-05-23 11:31:02 +01:00
OpenSceneGraph git repository
c3f2711b09 Merge pull request #73 from susnux/safeptr
add safety checking when dereferencing ref_ptr
2016-05-23 11:29:07 +01:00
Robert Osfield
c72516ceb0 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2016-05-23 11:24:50 +01:00
OpenSceneGraph git repository
b76538d6ea Merge pull request #72 from bjornblissing/feature/gitignore-visualstudio
GitIgnorePatterns for Visual Studio
2016-05-23 11:24:23 +01:00
Robert Osfield
ff01d9c663 Fixed shadows warnings 2016-05-23 10:52:55 +01:00
Robert Osfield
04214a4288 Fixed shadows warning 2016-05-23 10:36:00 +01:00
Robert Osfield
c15dfa7ddd Fixed shadows warning 2016-05-23 10:31:56 +01:00
Robert Osfield
d4815932dc Removed redundent local variable 2016-05-23 10:30:22 +01:00
Robert Osfield
33ec90376c Fixed shadows warning 2016-05-23 10:28:45 +01:00
Robert Osfield
776fa48cd4 Fixed shadows warnings 2016-05-23 10:22:16 +01:00
Rohan Budhiraja
475948f8a2 Added missing stdexcept header, fixes #61 2016-05-21 21:40:07 +02:00
rdiankov
da34da18ca add safety checking when dereferencing ref_ptr 2016-05-21 21:29:14 +02:00
Robert Osfield
ae3ba28fee Fixes shadows warnings 2016-05-20 13:38:34 +01:00
Björn Blissing
580ebbdbef GitIgnorePatterns for Visual Studio
Added patterns for visual studio generated files as well as for files
generated by CMake for windows only.
2016-05-20 14:12:09 +02:00
Robert Osfield
e900ecc4c7 Added -Wshadow tp OSG_AGGRESSIVE_WARNING_FLAGS for GNU compiler 2016-05-20 10:51:40 +01:00
Robert Osfield
bf343240e4 Merge branch 'AdriCS-master' 2016-05-19 18:54:11 +01:00
Adri
89a2ed7da4 Extra header include.
Removed an extra header include for <QGLWidget>
2016-05-19 18:53:15 +01:00
Robert Osfield
a81edcfba7 Added include/osgQt/Version and src/osgQt/__ to .gitignore 2016-05-19 18:51:58 +01:00
Robert Osfield
3db6aa255f Removed redundent #if OSG_USE_BOUND block 2016-05-19 17:38:50 +01:00
Jannik Heller
a5b05f77ea This submission removes the define / code path OSG_USE_BOUND that was never used. The class osg::Bound used by this code doesn't exist either. 2016-05-19 17:32:24 +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
037de9bd20 Fixed build error associated with change of type of getInterface() 2016-05-19 14:26:48 +01:00
Robert Osfield
10a89ae0c5 Win32 Build fixes
Removed the duplicate constructor and destructor
2016-05-18 19:31:03 +01: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
8863e03685 Replaced static ref_ptr<> with observer_ptr<> to avoid local static references hanging around. 2016-05-16 18:52:39 +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
dd10619192 Added GLES3 path for setting up with EGL 2016-05-06 20:15:18 +01:00
Robert Osfield
58ca08a7ca Added 3.4 press release to NEWS.txt 2016-05-06 17:49:01 +01:00
Robert Osfield
7b34ca0a39 Added using to quieten warning 2016-04-29 10:39:57 +01:00
Robert Osfield
6cfbaa61c0 Moved the IdentifierMap from global to into osg namespace and changed to static 2016-04-27 14:21:11 +01:00
Robert Osfield
cba48de3d3 Fixed copy _readBuffer bug. 2016-04-21 14:07:22 +01:00
Robert Osfield
eb50a15b52 Fixed ShaderComposer::releaseGLObjects(State*) const method as it's const was missing.
Rewrote the ShaderComposer::releaseGLObjects() const method to pass on the releaseGLObjects() calls to any associated Program or Shader objects.
2016-04-18 20:46:45 +01:00
Robert Osfield
84618896c2 From Vladimir Chebaev, fixed handling of outline orientiation 2016-04-14 17:55:19 +01:00
Robert Osfield
8c10323154 From Vladimir Chebaev, fixed handling of outline orientiation 2016-04-14 17:46:27 +01:00
Robert Osfield
91ca25d2b8 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2016-03-31 19:22:03 +01:00
Robert Osfield
d41d92e65d added assignment of mipmap levels from source image. 2016-03-31 19:21:25 +01:00
Robert Osfield
893628971a From Sherman Wilcox, added assignment of mipmap levels from source image. 2016-03-31 17:52:29 +01:00
Robert Osfield
e6a99b5ae5 Reversed the order of some sizedInternalFormats enum entries to sync with the change in serach direction that was checked in as an earlier revision. 2016-03-31 17:12:28 +01:00
Robert Osfield
459ae5ce64 Changed the default value paramter to be consistent with the non templated version of StateSet::setTextureAttributeAndModes(..) 2016-03-29 20:24:05 +01:00
Robert Osfield
cd3831b045 Added &nl; xml control character to allow one to put newlines into a single text string in Present3D presentations 2016-03-13 09:03:44 -02:30
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
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
faea95b5fb Added handling of auto stepping to ON_DEMAND handling. 2016-03-10 19:58:35 +00: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
1f5b7855eb Added basic support for OSG_RUN_FRAME_SCHEME ON_DEMAND env var and --run-on-demand, --run-continuous to Present3D 2016-03-10 11:24:21 +00:00
Robert Osfield
f5b5202296 From Joe Thompson, "OpenSceneGraph cannot be built with Visual Studio 2008.
The file osg-OpenSceneGraph-3.4.0\include\osg\Types
typedefs int8_t, int16_t, int32_t and int64_t
These are typedefed as signed __intX in several other places.
With VS2008, this causes an error "int8_t redifined, different basic types"
Explicitly declaring them signed fixes the error."
2016-03-02 09:18:26 +00:00
Robert Osfield
92ee6de05e Changed svn reference to git 2016-03-01 20:35:58 +00:00
Robert Osfield
02625801da Updated ChangeLog 2016-03-01 20:25:33 +00:00
Robert Osfield
cd00f7b558 Fixed the make tag-run and branch-run 2016-03-01 20:24:19 +00:00
Robert Osfield
7c61acef40 Updated ChangeLog and AURHORS file 2016-03-01 19:55:01 +00:00
Robert Osfield
a1aecc024e Refactored the make tag-test, tag-run, branch-test, branch-run and ChangeLog features of the CMakeLists build system so it now supports working off git instead of subversion 2016-03-01 19:44:32 +00:00
Robert Osfield
0d1c8286a2 Updated version number for 3.5.2 dev release 2016-03-01 15:33:16 +00:00
Robert Osfield
bb79e523d4 From Konstantin Matveyev, "Two classes (with wrappers) added to osgAnimation: UpdateVec2fUniform and UpdateVec4fUniform" 2016-03-01 15:09:12 +00:00
Robert Osfield
33b838e437 From Jannik Heller, "This submission makes the osgFX::Technique traverse as a normal Group if the visitor is not a cull visitor.
As for motivation behind the change, I think it makes more sense that way because only the CullVisitor cares about rendering. Say an intersection visitor or update visitor only needs to traverse the subgraph once, not once for each pass. For these visitors there is no point in traversing the subgraph more than once, since it's exactly the same graph. Another motivation is the performance improvement had when an intersection visitor tests against a multipass Technique."

 Note about mods by Robert Osfield, "Changed dyanmic_cast<> and check against getTraversalType() to utilize the new asCullVisitor() instead to improve efficiency."
2016-03-01 11:57:02 +00:00
Robert Osfield
707c1a32aa Within the #pragmatic shader composition code added platform specific line endings for WIN32 vs all other platforms to "\r\n" and "\n" respectively. 2016-03-01 11:45:20 +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
5d03bb9a2b From Jannik Heller, "This submission fixes a stuttering issue that may occur when occlusion query nodes are in view. The problem is that OSG retrieves the occlusion query result without first checking if it's available (GL_QUERY_RESULT_AVAILABLE). Thus, the driver has to sync with the GPU i.e. wait for all queued draw calls to complete. This is particularly bad in V-Synced situations where the driver may be using multi frame queueing techniques - coupled with the fact that OSG only runs an occlusion query every 5th frame, results in very unpleasant stuttering in some situations.
The change I made is to check GL_QUERY_RESULT_AVAILABLE before retrieving the query, to ensure that there won't be a stall. If the query result is not available yet, we'll leave it alone and try again in the next frame.

Had to make a few more changes than I'd liked, mostly because the TestResult mechanism wasn't designed for holding on to query objects for more than one frame. As well, I'm thinking that RetrieveQueriesCallback and ClearQueriesCallback could be merged together, if we wanted to go for more refactoring. For though now my strategy is to make as little changes as possible. Let me know what you think of the patch."
2016-03-01 10:37:41 +00:00
Robert Osfield
be98c884bd From Ognjen Kostic, "Some android phones have no support for OES_element_index_uint extension that is required if glDrawElements is to be called with GL_UNSIGNED_INT for element type.
In OSG 3.4, osgText::Text( ::_quadIndices) uses DrawElementsUInt that will fail on these devices and no text will appear - tested on Samsung Galaxy Trend 2 SM-G313HN.

When DrawElementsUInt is replaced with DrawElementsUShort it works, although I'm not sure if this can cause other problems with some fonts.

Fix:
- In include\osgText\Text, line 316:
        replace: "osg::ref_ptr< osg::DrawElementsUInt > _quadIndices;"
        with:    "osg::ref_ptr< osg::DrawElementsUShort > _quadIndices;"

- In src\osgText\Text.cpp, line 2094:
        replace: "_quadIndices = new DrawElementsUInt(PrimitiveSet::TRIANGLES);"
        with:    "_quadIndices = new DrawElementsUShort(PrimitiveSet::TRIANGLES);"
"
2016-03-01 10:21:14 +00:00
Robert Osfield
f73d1fb7ea Refactored the parsing of #pragma to address problems handling #pragma without () usage. 2016-02-29 15:06:36 +00:00
Robert Osfield
370cb7bc6e Fixed debug build 2016-02-24 16:01:00 +00:00
Robert Osfield
31fad1476f From Jannik Heller, osgParticle freeze on cull fix, ammended by Robert Osfield to make if statements a little more readable. 2016-02-23 10:12:31 +00:00
Robert Osfield
e8ac5af41b From Anish Thomas, "Underflow bug in BufferObject pool usage" 2016-02-22 09:19:51 +00:00
Robert Osfield
78aaf7955e From Bjorn Blissing, "I stumbled upon a strange ifdef-case inside Geometry.cpp
Currently the code looks like this:

Code:
    DrawElementsUByte* elems = new DrawElementsUByte(PrimitiveSet::TRIANGLES);
    elems->push_back(0);
    elems->push_back(1);
    elems->push_back(2);

    elems->push_back(2);
    elems->push_back(3);
    elems->push_back(0);
    geom->addPrimitiveSet(elems);
    geom->addPrimitiveSet(new DrawArrays(PrimitiveSet::QUADS,0,4));

The second condition looked really strange (note the ! sign), and results in pretty much all code paths uses the first code. The correct version should probably be that only people with GLES1 or GLES2 should use GL_TRIANGLES to simulate quads. And all others should use the native support for GL_QUADS.
"
2016-02-19 15:01:27 +00:00
Robert Osfield
09bde307de To the COLLADA_INCLUDE_DIR search paths added the directories:
/usr/local/include/collada-dom2.4
    /usr/local/include/collada-dom2.2
    /opt/local/include/collada-dom2.4
    /opt/local/include/collada-dom2.2
    /usr/include/collada-dom2.4
    /usr/include/collada-dom2.2

To enable recent versions of the DOM to be found in their new install locations.
2016-02-19 12:19:12 +00:00
Robert Osfield
58f940c0f1 Updated the AuthenticationDetails::HttpAuthentication enum to reflect current libcurl values 2016-02-18 19:53:36 +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
93b10f35c1 From Mourad Boufarguine, "This submission fixes typos in Uniform::getTypename() method in Uniform.cpp (missing "r" in usampler names)." 2016-02-18 09:25:48 +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
f6372f2fab Introduced a separate GLuint64 one variable to get around a 32bit build timer issue under Windows. 2016-02-17 15:59:13 +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
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
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
9bde2ef631 Added support for NodeMask to osg::Drawable serializers 2016-02-11 16:25:47 +00:00
Robert Osfield
3e0435febd From Jannik Heller , GL object deletion fix.
"This submission changes deleteGLObject calls to scheduleGLObjectForDeletion, to ensure that the actual deletion happens from the correct thread (the graphics thread). This fixes the leak I reported in http://forum.openscenegraph.org/viewtopic.php?t=15567 , and possibly also http://forum.openscenegraph.org/viewtopic.php?t=15564."
2016-02-05 20:29:22 +00:00
Robert Osfield
8cefa05e3a From "Jannik Heller", I just updated to the latest commit and noticed that drawable cull callbacks were no longer working. As it turns out there was a missing implementation of the asDrawableCullCallback() and asDrawableEventCallback(), after implementing these methods everything is working as expected. 2016-02-04 20:15:14 +00:00
Robert Osfield
aa17f5441a From Laurens Voerman,
"E:\osg\osgSvnGit\OpenSceneGraph\include\osg/Callback(286): warning C4099: 'osg::DrawableUpdateCallback' : type name first seen using 'class' now seen using 'struct' (E:\osg\osgSvnGit\OpenSceneGraph\src\osgUtil\RenderBin.cpp)
          E:\osg\osgSvnGit\OpenSceneGraph\include\osg/Callback(27) : see declaration of 'osg::DrawableUpdateCallback'

attached is a modified version of include/osg/Callback:
changing
- struct OSG_EXPORT DrawableUpdateCallback : public virtual Callback
- {
to
+ class OSG_EXPORT DrawableUpdateCallback : public virtual Callback
+ {
+ public:

and the same changes for DrawableEventCallback and DrawableCullCallback"
2016-02-04 19:53:13 +00:00
Robert Osfield
e00977f3c2 Added OSG_EXPORT 2016-02-04 19:40:14 +00:00
Robert Osfield
e1eaeced8c From Laurens Voerman, "While compiling with Visual Studio 12 (aka 2013 update 3) I get a these errors:
E:\osg\osgSvnGit\OpenSceneGraph\src\osg\PrimitiveSet.cpp(364): error C2039: 'min' : is not a member of 'std'
E:\osg\osgSvnGit\OpenSceneGraph\src\osg\PrimitiveSet.cpp(364): error C3861: 'min': identifier not found
E:\osg\osgSvnGit\OpenSceneGraph\src\osg\PrimitiveSet.cpp(372): error C2039: 'min' : is not a member of 'std'
E:\osg\osgSvnGit\OpenSceneGraph\src\osg\PrimitiveSet.cpp(372): error C3861: 'min': identifier not found
E:\osg\osgSvnGit\OpenSceneGraph\src\osg\PrimitiveSet.cpp(381): error C2039: 'min' : is not a member of 'std'
E:\osg\osgSvnGit\OpenSceneGraph\src\osg\PrimitiveSet.cpp(381): error C3861: 'min': identifier not found
E:\osg\osgSvnGit\OpenSceneGraph\src\osg\PrimitiveSet.cpp(436): error C2039: 'min' : is not a member of 'std'
E:\osg\osgSvnGit\OpenSceneGraph\src\osg\PrimitiveSet.cpp(436): error C3861: 'min': identifier not found

I suggest to replace std::min by osg::minimum, attached is a (zipped) modified version of src/osg/PrimitiveSet.cpp
applies to the git reposetory only (updated 1 Feb 2016 ae6bade641ee4d8436ef69e7a7a347be81195a47 )

"
2016-02-04 19:38:23 +00:00
Robert Osfield
dcadd69c5a Added releaseGLObjects(..) and resizeGLObjectBuffers(..) to osgShadow::ShadowTechnique's 2016-02-04 17:52:44 +00:00
Robert Osfield
f373bcf23d Added osg::resizeGLObjectBuffers(..) and osg::releaseGLObjects(..) functions to make it easier to call these methods on objects which ref_ptr<> or C pointers are held for. 2016-02-04 17:36:33 +00:00
Robert Osfield
5ff6fe7c68 Commented out debug message 2016-02-04 17:35:32 +00:00
Robert Osfield
f8306f145a Added NodeVisitor::g/setValueMap and g/setValueStack, and osg::PushPopObject and osg::PushPopValue helper classes for pushing/popping values to the NodeVisitor's ValueStack. 2016-02-04 13:12:33 +00:00
Robert Osfield
b4eb8d4597 Improved the speed of the ValueObject get/setting by utilizing typeid() and static_cast<> in place of original dynamic_cast<>'s 2016-02-04 13:10:28 +00:00
Robert Osfield
d8d37e3da7 Added new Identifer, ValueMap and ValueStack class to build 2016-02-04 13:07:55 +00:00
Robert Osfield
041ab29d1f Added osg::Identifer, osg::ValueMap and osg::ValueStack classes to provide a general purpose means for storing and retrieving values from map or stack containers.
Typical use will be for storing and passing values between nodes during traversals.
2016-02-04 13:04:40 +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
39b1f379dc Fixed check against Drawable::isCullingActive().
Removed old code intended to check the Geode parent of a Drawable to see if it's CullingActive is true as this was broken by the change osg::Drawable being derived from osg::Node rather than osg::Object.
2016-01-27 10:06:33 +00:00
Robert Osfield
bc33515360 Added C++ gitignore entries 2016-01-26 09:57:26 +00:00
Robert Osfield
e4a59bcd9d Added .gitignore to queiten down git status reports 2016-01-25 19:38:44 +00:00
OpenSceneGraph git repository
7455db439a Merge pull request #42 from podsvirov/topic-upgrade-doxygen-configuration
From Konstantin Podsvirov, "Corrects an incorrect parsing of header files
without an extension when used doxygen larger 1.8.3.1"
2016-01-25 14:18:58 +00:00
Robert Osfield
4deca2d38b From Jannik Heller and Robert Osfield, introduced ReadResult/WriteResult::statusMessage() method that creates a std::string from the stutus value and message string. 2016-01-25 12:23:04 +00:00
OpenSceneGraph git mirror maintainer
72cc10e309 Merge pull request #51 from scrawl/occlusionqueryfix_osg
From Jannik Heller, "Check for presence of occlusion query extension"
2016-01-25 11:05:40 +00:00
Robert Osfield
4b2912e096 From John Farrier, "Best I can tell, there is an enumeration for NEVER_CHECK_GL_ERRORS in CheckForGLErrors, defined in State. State.cpp does check to see if you want MORE error checking, but there is no way to turn OFF error checking. This change allows disabling of OpenGL error checking." 2016-01-25 10:45:07 +00:00
Robert Osfield
a83b390d55 From Patrick Neary, "In ShaderComposer::getOrCreateProgram(), tesselation control and evaluation shaders are processed but not added to the shader program." 2016-01-25 10:25:15 +00:00
Robert Osfield
b141c0f63e Changed the prototype from NULL to osg::DummyObject to address a bug in reading .osgt + .osgx where an image is written out but fails to read the file causes subsequent parts of the file to be mis-read 2016-01-22 10:09:00 +00:00
Robert Osfield
5cb486f7c5 Added osg::MultiDrawArrays which wraps up glMultiDrawArrays extension. 2016-01-22 09:47:49 +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
2e7cfe7efa From Ravi Mathur, OSX/Clang 7.0.0 build fix 2016-01-19 15:39:46 +00:00
Robert Osfield
e5a7c353ae From Jannik Heller, "This submission fixes a typo in the new GLObjectManager
sheduleGLObjectForDeletion(GLuint globj);

should be

scheduleGLObjectForDeletion(GLuint globj)"
2016-01-19 14:49:56 +00:00
Robert Osfield
b3e0f83c07 From Jordi Torres, "Added TriangleLinePointIndexFunctor to osg namespace" 2016-01-19 14:22:12 +00:00
Robert Osfield
84c202f2ab From Jannik Heller, "removed a const_cast that wasn't necessary" 2016-01-19 14:16:58 +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
baaf5712c4 Added missing OSG_EXPORT 2016-01-19 09:46:20 +00:00
Robert Osfield
3e92c1fc43 Added osg::Object::asStateSet() implementation and usage to avoid use of dynamic_cast<> 2016-01-18 20:05:20 +00:00
Robert Osfield
340615de55 Replaced dynamic_cast<*Callback> with as*Callback() implementation/usage. 2016-01-18 19:04:28 +00:00
Robert Osfield
48225171e0 From Jannik Heller, "This submission fixes a bug introduced in commit 5b17e3bc2a "Introduced CMake option OSG_PROVIDE_READFILE option...". The added overload for StateSet::setAttributeAndModes was ignoring the mode setting.
"
2016-01-18 13:10:14 +00:00
Robert Osfield
7409820a8f Added Simplifier::requiresDownSampling()/requiresDownSamplingImplementation() to make it possible for the
Simplfifer::ContinueSimplificationCallback to be able to decide whether up or downsampling is required,
removing the previous hardwards reliance on getSampleRatio<1.0.
2016-01-18 11:50:07 +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
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
scrawl
9aba89c88d Check for presence of occlusion query extension 2015-12-06 18:20:41 +01:00
Robert Osfield
c7f32e11f2 From Jordi Torres, Fix for missing header file in distribution
osg/TriangleLinePointIndexFunctor was not being installed because it was not added to the CMakeLists.txt
2015-11-23 13:15:05 +00:00
Robert Osfield
a1cfb037f4 Added support for copying include/osgViewer/config headers on make install. 2015-11-23 11:45:01 +00:00
Robert Osfield
bc794e3807 Refactored the signal handling to be thread safe 2015-11-23 11:01:47 +00:00
Robert Osfield
ead6924a78 Fixed typo 2015-11-23 08:54:09 +00:00
Konstantin Podsvirov
61885d2df0 Upgrade Doxygen configuration
This change corrects an incorrect parsing of header files
without an extension when used doxygen larger 1.8.3.1
2015-11-11 22:38:38 +03:00
Robert Osfield
208affb513 Updated ChangeLog for 3.5.1 dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15181 16af8721-9629-0410-8352-f15c8da7e697
2015-11-09 16:02:09 +00:00
Robert Osfield
44130fc527 Cleaned up OSX option selection code.
Updated version for 3.5.1 dev release


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15180 16af8721-9629-0410-8352-f15c8da7e697
2015-11-09 15:52:06 +00:00
Robert Osfield
0401ab4ce7 Fixed warning message.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15178 16af8721-9629-0410-8352-f15c8da7e697
2015-11-09 15:13:51 +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
a4600e46f9 From Jannik Heller, fix typo of OSG_COMPILE_CONTEXTS.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15176 16af8721-9629-0410-8352-f15c8da7e697
2015-11-09 10:43:15 +00:00
Robert Osfield
1ad8ba358e From Mathias Froehlich, "Avoid per frame X11 roundtrips"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15173 16af8721-9629-0410-8352-f15c8da7e697
2015-11-05 14:38:04 +00:00
Robert Osfield
2e9c4b1aed Restructed the setting of the RenderStage ClearColor/ClearMask to make the code more readable and to avoid double setting of the ClearMask.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15171 16af8721-9629-0410-8352-f15c8da7e697
2015-10-26 11:41:48 +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
85cdfff7a7 From Sebastian Messershmidt, "The uncommented pointer type QTimerEvent */*event*/ leads to a compiler error under visual studio 2010"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15167 16af8721-9629-0410-8352-f15c8da7e697
2015-10-23 11:07:21 +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
79fb9abbbf updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15151 16af8721-9629-0410-8352-f15c8da7e697
2015-10-09 08:44:45 +00:00
Robert Osfield
572bb61a2d Added osg::flushAllDeletedGLObjects to clean up of graphics context after the existing osg::deleteAllGLObjects() to catch any cases where delete doesn't flush GL objects.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15150 16af8721-9629-0410-8352-f15c8da7e697
2015-10-08 15:58:24 +00:00
Robert Osfield
27962a73ee Introduced usage of OSG_INIT_SINGLETON_PROXY into DatabasePager::prototype() and Registry::instance(), removing the InitRegistry proxy object in src/osgViewer/ViewerBase.cpp.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15147 16af8721-9629-0410-8352-f15c8da7e697
2015-10-05 10:58:32 +00:00
Robert Osfield
de4a430931 From Kristofer Tingdahl, "we had a minor shadow problem with the osg-3.4 that pollutes our continuous integration"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15143 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 15:20:25 +00:00
Robert Osfield
ef6f2dbcfd Added fix for case when Renderer is assigned to a Camera that has now View
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15141 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 11:15:04 +00:00
Robert Osfield
e878e53cab From Curtis Rubel, "I would like to submit the attached file for inclusion in future releases of
OpenSceneGraph and the OpenThreads library.

The changes in the file simply remove a few ifndef's that currently
do not allow Linux systems to fully utilize the PThread real-time
scheduling API.

Since Linux now fully supports the PThread scheduling API it would
be beneficial to have it available to use as necessary.  I have
been testing this change since OSG release 3.3.7 and have not seen
any ill affects.

The Priority scheduling api is further protected by another ifdef:

#ifdef ALLOW_PRIORITY_SCHEDULING

that only appears to be defined in the pthreads implementation as
well.  This would make it unlikely that anyone would be affected
by this unless they are intentionally wanting to run with priority
scheduling.  In which case on Linux they would need to make
these same modifications themselves to utilize it to its full extent.

Attached file is for the current trunk as of this date.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15140 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 10:11:52 +00:00
Robert Osfield
7aae720636 Refactored the way that FrameStamp is managed in osgViewer::Renderer to avoid thread conflicts
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15138 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 10:09:27 +00:00
Robert Osfield
f626d85c2b From John Hedström,"Texture2DArray support for the .osg serializer"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15136 16af8721-9629-0410-8352-f15c8da7e697
2015-09-24 14:14:37 +00:00
Robert Osfield
62764a56c5 Added support for serializing Camera::ImplicitBufferAttachmentRenderMask and ImplicitBufferAttachmentResolveMask properties.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15135 16af8721-9629-0410-8352-f15c8da7e697
2015-09-24 10:52:35 +00:00
Robert Osfield
57d0538f1e Quietened down debug messages
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15134 16af8721-9629-0410-8352-f15c8da7e697
2015-09-24 10:48:57 +00:00
Robert Osfield
80e5338194 Fixed line endings.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15132 16af8721-9629-0410-8352-f15c8da7e697
2015-09-24 09:29:03 +00:00
Robert Osfield
2fe4fc38bb Added missing OSG_EXPORT to fix Windows build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15131 16af8721-9629-0410-8352-f15c8da7e697
2015-09-23 10:41:54 +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
cb3396b0e5 From Jannik Heller, "I've hit what I believe to be a bug (or at the very least, an unintuitive behaviour) in the osg::Geometry copy constructor. I noticed it when using osg::clone on a Geometry with vertex buffer objects, and the copy flags DEEP_COPY_ARRAYS. To be precise, I add a Geometry to an osgUtil::IncrementalCompileOperation, then osg::clone the Geometry. I was getting reports from users of random crashes happening.
I believe the offending lines are in the osg::Geometry copy constructor:

    if ((copyop.getCopyFlags() & osg::CopyOp::DEEP_COPY_ARRAYS))
    {
        if (_useVertexBufferObjects)
        {
            // copying of arrays doesn't set up buffer objects so we'll need to force
            // Geometry to assign these, we'll do this by switching off VBO's then renabling them.
            setUseVertexBufferObjects(false);
            setUseVertexBufferObjects(true);
        }
    }

Toggling the vertex buffer objects off then on again actually touches not only the arrays controlled by DEEP_COPY_ARRAYS, but also the PrimitiveSets which are controlled by DEEP_COPY_PRIMITIVES. This means if the user has copyflags of only DEEP_COPY_ARRAYS, we are modifying arrays that belong to the original const Geometry& we are copying from. I believe this shouldn't be allowed to happen because we are using a const& specifier for the original Geometry.

In my case the osgUtil::IncrementalCompileOperation was trying to compile the geometry, while in the main thread a clone operation toggled the VBO's off and on, a crash ensues.

In the attached patch, you will find a more efficient handling of VBO's in the osg::Geometry copy constructor, so that only the Arrays that were actually deep copied have their VBO assigned, and no changes are made to Arrays that already had a valid VBO assigned. In addition, the DEEP_COPY_PRIMITIVES flag is now honored so that VBO's are set up correctly should a user copy a Geometry with only that flag.
"



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15129 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 15:35:24 +00:00
Robert Osfield
34794c5c27 From Laurens Voerman, "I found that using an ImageSequence with mode PAGE_AND_DISCARD_USED_IMAGES triggers the (3) imageThreads to run and never stop, even when no more work is to be done. This is due to a bug in the stop condition currently setting the thread to stop and wait for a signal only when no work needs to be done AND the databasepager is paused.
It should stop and wait for a signal on either of those two. Due to a few logical inversions it boils down to replacing || with &&

OLD _block->set((!_requestList.empty() || !_pager->_databasePagerThreadPaused));
NEW _block->set((!_requestList.empty() && !_pager->_databasePagerThreadPaused));//release the threads to run IF (work_to_be_done && not_paused)

This bug is present since svn rev 8663 (just before 2.6.0 release)


attached is a zip with the files:

OpenSceneGraph\include\osgDB\ImagePager



This file is valid for svn branch and stable 3.2 and 3.4
branches 2.6 - 3.0 have the same bug, but other differences in the file."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15125 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 15:04:58 +00:00
Robert Osfield
8b37ff25e7 From Laurens Voerman, "I crashed osgconv while compressing textures:
osgconv --compressed-dxt1 cow.osg cow.ive

due to different handling of the extentions in osg 3.4 and up.

attached is a zip with the files:

OpenSceneGraph\applications\osgconv\osgconv.cpp



This file is valid for svn branch and stable3.4."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15124 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:50:39 +00:00
Robert Osfield
aa96046632 From Julien Valentin, "Serializing custom geometry i ran into a crash due to a
setVertexAttribArrayList(array) with array containing NULL vertexAttrib.
I added a test in order to avoid it


Code:
void Geometry::setVertexAttribArrayList(const ArrayList& arrayList)
{
    _vertexAttribList = arrayList;

    dirtyDisplayList();

    if (_useVertexBufferObjects)
    {
        for(ArrayList::iterator itr = _vertexAttribList.begin();
            itr != _vertexAttribList.end();
            ++itr)
        {
if(itr->get())//ADDED
            addVertexBufferObjectIfRequired(itr->get());
        }
    }
}
"

and

"The bug i ran into is a crash reading osgt Geometry with null vertexattribs.
The only thing i added is a not nul check on array passed to setVertexAttribArrayList."

--------------------This line, and those below, will be ignored--

M    src/osg/Geometry.cpp


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15121 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:34:45 +00:00
Robert Osfield
d7cd5b1811 Updated SO version for svn/trunk.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15120 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:24:40 +00:00
Robert Osfield
0d72b85881 Fixed warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15119 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:24:11 +00:00
Robert Osfield
53a850c671 Fixed warning by removing redundent check
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15118 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:23:55 +00:00
Robert Osfield
0532c93c8c Corrected the Subload::generateTextureObject() return type to make it consistent with Texture::generateTextureObject(..)
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15117 16af8721-9629-0410-8352-f15c8da7e697
2015-08-14 15:25:08 +00:00
Robert Osfield
051ee49098 Updated shaders from OpenSceneGraph-Data with refactor of workaround to NVidia driver bug
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15110 16af8721-9629-0410-8352-f15c8da7e697
2015-08-12 10:18:09 +00:00
Robert Osfield
6a41ccf537 Added GL1 to the docs of the GL_PROFILE string
Updated the date of the 3.4.0 release in the README.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15100 16af8721-9629-0410-8352-f15c8da7e697
2015-08-12 06:39:57 +00:00
Robert Osfield
eba1cc6e4f Refactored workaround of NVidia nan lenght() bug.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15096 16af8721-9629-0410-8352-f15c8da7e697
2015-08-11 20:06:38 +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
b964c53445 Removed spaces
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15088 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:55:16 +00:00
Robert Osfield
5194d81a89 Fixed line endings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15085 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:40:36 +00:00
Robert Osfield
8ebe075722 Updated built-in shaders from OpenSceneGraph-Data vesion that introduce #pragma(tic) shaders that resolve the NVidia loop iteration bug.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15083 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:39:23 +00:00
Robert Osfield
a2013caa47 Quietened down #pragma(tic) shader composition messages
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15079 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:18:54 +00:00
Robert Osfield
aff6e112ec Added support for injecting GL_VENDOR strings into GLSL shaders via the new #pragma(tic) shader composition
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15078 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 17:42:05 +00:00
Robert Osfield
8ab27a20d2 Build fix for VS and installing Types
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15077 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 05:04:56 +00:00
Robert Osfield
7aa2c7c10f Changed GLint64 and GLuint64 setup to use int64_t and uint64_t resptectivly respectively to avoid issues with compiling against Qt5
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15071 16af8721-9629-0410-8352-f15c8da7e697
2015-08-09 09:42:31 +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
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
cd09242520 Added checks for the validity of chached coordinate arrays.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15060 16af8721-9629-0410-8352-f15c8da7e697
2015-08-06 15:03:05 +00:00
Robert Osfield
d205919881 Updated shaders from OpenSceneGraph-Data.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15059 16af8721-9629-0410-8352-f15c8da7e697
2015-08-06 10:09:29 +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
e4697ae7fc From Terry Welsh, "I downloaded the Android 3rdparty deps from here
http://www.openscenegraph.org/index.php/download-section/dependencies
but was not able to use them for a while. Attached are changes to
OsgAndroidMacroUtils.cmake that allow the deps to be found by cmake.

Specifically, all FIND_PATH commands require the
NO_CMAKE_FIND_ROOT_PATH option to actually find paths. This is odd
because if you inspect CMAKE_FIND_ROOT_PATH it appears to be empty. I
would expect it to have no effect at all.

I also needed to remove quotes from this line in order for headers to be found:

set(FREETYPE_INCLUDE_DIRS "${FREETYPE_DIR}/include
${FREETYPE_DIR}/include/freetype/config")

Assuming this script worked in the past, it seems like cmake behavior
may have changed at some point. I'm using cmake version 2.8.12.2."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15036 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 13:46:57 +00:00
Robert Osfield
42884e7600 From Jannik Heller, "Here is a patch for the S3TC capability check.
On a Intel HD graphics Linux system with Mesa 10.1.3, I found that osg's Extensions::isTextureCompressionS3TCSupported() returned false, even though S3TC compressed textures *are* in fact working. I tested this by loading and rendering various DXT1, DXT3 and DXT5 compressed textures in the OSG.

"glxinfo | grep s3tc" gives:
    GL_S3_s3tc

Note, if I install the package "libtxc-dxtn-s2tc0", I get in addition:

glxinfo | grep s3tc
    GL_EXT_texture_compression_s3tc
    GL_S3_s3tc

However, S3TC compressed textures worked correctly within the OSG even without libtxc-dxtn-s2tc0 installed.

I'm not sure what the differences between these extensions are, but based on the description at https://www.opengl.org/registry/specs/S3/s3tc.txt I would assume that both will work for OSG's purposes. The attached patch changes isTextureCompressionS3TCSupported() to accept either extension."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15035 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 13:44:39 +00:00
Robert Osfield
55d36b544b Warning fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15032 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 10:59:11 +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
d6828651d0 Compile fix for Mingw.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15029 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 10:27:11 +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
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
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
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
71c6d27b57 Added missing handling of lightnumber and associate lights
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15015 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 09:23:42 +00:00
Robert Osfield
b90bbdaebf Changed the GL_HEADER_HAS_GLINT64 and GL_HEADER_HAS_GLUINT64 to use cmakedefine to improve handling of when cmake doesn't find GLint64 and GLuint64.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15013 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 07:39:12 +00:00
Robert Osfield
7e3ac0e584 Fixed AUTHORS file
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15011 16af8721-9629-0410-8352-f15c8da7e697
2015-07-22 17:01:03 +00:00
Robert Osfield
cf35354bf7 Fixed contributors list
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15009 16af8721-9629-0410-8352-f15c8da7e697
2015-07-22 14:55:38 +00:00
Robert Osfield
e350a443d9 Updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15007 16af8721-9629-0410-8352-f15c8da7e697
2015-07-22 14:52:08 +00:00
Robert Osfield
ec8779ca6f Moved GL_ALPHA_TEST from AlphaFunc header to GLDefines header
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15002 16af8721-9629-0410-8352-f15c8da7e697
2015-07-22 14:03:24 +00:00
Robert Osfield
000c9af7c2 Added CMake test for presence of GLuint64 and GLint64 in OpenGL/GLES headers to better handle when/where GL defines the 64 bit typedefs
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15001 16af8721-9629-0410-8352-f15c8da7e697
2015-07-22 13:49:14 +00:00
Robert Osfield
7c4b5febcb Added check for validity of OpenFlight shininess value.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14998 16af8721-9629-0410-8352-f15c8da7e697
2015-07-21 14:21:49 +00:00
Robert Osfield
36352031ef Fixed typo
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14997 16af8721-9629-0410-8352-f15c8da7e697
2015-07-21 13:42:35 +00:00
Robert Osfield
492ac89613 Reduced debug message verbosity.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14993 16af8721-9629-0410-8352-f15c8da7e697
2015-07-20 13:23:07 +00:00
Robert Osfield
13a5608975 Changed the _MSC_VER check to <= 1700 to support VS2012.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14989 16af8721-9629-0410-8352-f15c8da7e697
2015-07-20 07:42:05 +00:00
Robert Osfield
0d120d208b Reinstated the TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14985 16af8721-9629-0410-8352-f15c8da7e697
2015-07-19 09:51:01 +00:00
Robert Osfield
6c83b2e3a9 From KOS, "'ve mentioned in the "osg-users" ML about build error with the newest GStreamer 1.5
Please, have a look at the attached patch.

CMakeModules/FindGStreamer.cmake"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14984 16af8721-9629-0410-8352-f15c8da7e697
2015-07-17 18:31:22 +00:00
Robert Osfield
afe911957c Updated ChangeLog and AUTHORS
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14977 16af8721-9629-0410-8352-f15c8da7e697
2015-07-17 09:04:30 +00:00
Robert Osfield
466a4a5d69 Added cmake version check to cmake_policy usage
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14973 16af8721-9629-0410-8352-f15c8da7e697
2015-07-17 08:21:06 +00:00
Robert Osfield
67fb0b3530 From Patrick Neary, "To the tiff plugin, add the capability to write tiff images with unsigned short data"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14969 16af8721-9629-0410-8352-f15c8da7e697
2015-07-17 08:12:38 +00:00
Robert Osfield
7a94ce8585 From Patrick Neary, "Added some lesser used tokens that we use from GL_ARB_texture_rg to computeFormatDataType(), and computeNumComponents() in src/osg/Image.cpp"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14967 16af8721-9629-0410-8352-f15c8da7e697
2015-07-16 19:17:01 +00:00
Robert Osfield
c7d4f7d2cb Updated ChangeLog and AUTHORS
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14965 16af8721-9629-0410-8352-f15c8da7e697
2015-07-16 16:06:43 +00:00
Robert Osfield
0f918ee5c9 From Cory Slep and Robert Osfield, "When using Open Scene Graph and Qt on Android, the resulting thread that an application developer’s Q*Application is run on is different than what Qt considers the “main” thread, which can cause subtle problems. This is because Qt loads native libraries in one thread, and later runs the application in a different thread. They delay running in the second thread as long as possible as they have a nontrivial bootstrapping process. The motivation for Qt having this second thread is to allow them to remain responsive to both Java and native events, and capture events that would otherwise be “missed”.
This gives arise to the requirement that a static initialization of a QObject cannot occur for the Android platform, as Qt incorrectly considers that first thread the “main” one before a client application has even begun executing in its second thread.

 

The HeartBeat in GraphicsWindowQt.cpp is a QObject static global initialized at load time, causing the above issue. This changeset changes it to be a singleton that is constructed upon first access to its “instance” method.

 

I have:

- added the static method “instance”,

- moved its constructor to be private, and

- changed the one place it is accessed to access it through the “instance” method.

"

Changes by Robert are to adopt QPointer<HeartBeat> rather than use a C pointer to ensure that the HeartBeat object will be cleaned up automatically rather than leaked.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14963 16af8721-9629-0410-8352-f15c8da7e697
2015-07-16 15:49:32 +00:00
Robert Osfield
b908ced20c Added check to catch cases where the backdrop coordinate cache is too small for the number of contexts being computed.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14961 16af8721-9629-0410-8352-f15c8da7e697
2015-07-16 11:01:35 +00:00
Robert Osfield
229477c35c Added initializers and reverted OSX workaround from 2013.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14959 16af8721-9629-0410-8352-f15c8da7e697
2015-07-15 10:00:55 +00:00
Robert Osfield
47fd0423ec Moved the cmake_policy(SET CMP0043 NEW) to work for all script paths that Qt5 usage could pass through.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14953 16af8721-9629-0410-8352-f15c8da7e697
2015-07-14 13:33:12 +00:00
Robert Osfield
d85d98e916 Added cmake_policy(SET CMP0043 NEW) usage when compiling against Qt5 as it was causing a warning we couldn't fix on the OSG side otherwise.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14952 16af8721-9629-0410-8352-f15c8da7e697
2015-07-14 13:26:40 +00:00
Robert Osfield
4f1504e125 Updated ChangeLog and AUTHORS.txt
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14950 16af8721-9629-0410-8352-f15c8da7e697
2015-07-14 08:42:36 +00:00
Robert Osfield
423105c299 Added _defineList into the osg::StateSet::compare() implementation to address issues with osgUtil::Optimizer ignoring defines.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14948 16af8721-9629-0410-8352-f15c8da7e697
2015-07-14 08:25:17 +00:00
Robert Osfield
c4fdc93053 Added Text::GlyphQuads::release/resizeGLObjects() and handling of inconsistent contextID sizes to avoid crashes when viewers and scene graphs aren't initialized correctly to the right number of contexts.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14947 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 16:09:45 +00:00
Robert Osfield
e94c3334f9 Standardize the call to setUpThreading() in CompositeViewer/Viewer::realize().
Standardize the call to scene->resizeGLObjects().


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14944 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 16:03:51 +00:00
Robert Osfield
1859e27501 From Terry Welsh, "fThis fixes problem where new glClipControl feature would not compile for GLES2 profile"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14943 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 08:48:46 +00:00
Robert Osfield
1477e046f6 Updated version number to 3.5.0 after 3.4 branch.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14941 16af8721-9629-0410-8352-f15c8da7e697
2015-07-03 06:51:09 +00:00
Robert Osfield
a39578826c Updated for 3.4 branch.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14937 16af8721-9629-0410-8352-f15c8da7e697
2015-07-03 06:28:05 +00:00
Robert Osfield
98ebacdcbb Fixed repeated name in SETUP_PLUGIN.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14936 16af8721-9629-0410-8352-f15c8da7e697
2015-07-02 11:58:49 +00:00
Robert Osfield
04f4b542bd Updated ChangeLog and AUTHORS file in prep for 3.4 branch.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14935 16af8721-9629-0410-8352-f15c8da7e697
2015-07-02 10:25:14 +00:00
Robert Osfield
f0ac1a16f9 Build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14934 16af8721-9629-0410-8352-f15c8da7e697
2015-07-02 08:57:08 +00:00
Robert Osfield
08893c7fcc Moved the defination of GL_MAX_VARYING_COMPONENTS to GL_3_0 block to avoid warnings of redefinition.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14933 16af8721-9629-0410-8352-f15c8da7e697
2015-07-02 08:52:55 +00:00
Robert Osfield
17dfbe99fc Updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14931 16af8721-9629-0410-8352-f15c8da7e697
2015-07-01 05:32:40 +00:00
Robert Osfield
74ddaeaf50 From Mathias Froehlich, added seriliazers for new osg::ClipControl
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14930 16af8721-9629-0410-8352-f15c8da7e697
2015-07-01 05:10:20 +00:00
Robert Osfield
2f7193ee4c Updated ChangeLog and AUTHORS files
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14929 16af8721-9629-0410-8352-f15c8da7e697
2015-06-30 09:51:05 +00:00
Robert Osfield
b4cd40cf7c From Mathias Froehlich, "Attached a new state attribute implementing the glClipControl that appeared with GL4.5."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14928 16af8721-9629-0410-8352-f15c8da7e697
2015-06-30 09:11:00 +00:00
Robert Osfield
5cd478e4bb Quitened down debug for ViewConfig argument parsing
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14927 16af8721-9629-0410-8352-f15c8da7e697
2015-06-30 08:39:33 +00:00
Robert Osfield
d3baf9d311 Build fix for GLDAL>=2
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14925 16af8721-9629-0410-8352-f15c8da7e697
2015-06-30 08:38:01 +00:00
Robert Osfield
fe09ebfbdb From Christian Kehl, added Vec2::set(const Vec2) method
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14924 16af8721-9629-0410-8352-f15c8da7e697
2015-06-26 09:40:37 +00:00
Robert Osfield
b5a3a58076 From Jannik Heller, fixed clearReferencesToDependentCameras() calls
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14922 16af8721-9629-0410-8352-f15c8da7e697
2015-06-19 09:51:30 +00:00
Robert Osfield
3bcfad833c Fixed handling of use GLObjectsVisitor for modifying scene graph state without compiling to OpenGL so that the visitor can be run safely without a graphics context being current.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14921 16af8721-9629-0410-8352-f15c8da7e697
2015-06-17 16:25:47 +00:00
Robert Osfield
6f00eb2548 Small tidy up to make script more readable.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14920 16af8721-9629-0410-8352-f15c8da7e697
2015-06-16 17:18:11 +00:00
Robert Osfield
4ec0e76c0b Added QT_QTCORE_INCLUDE_DIR entry to qfont plugin build to fix Qt4 build under Linux
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14919 16af8721-9629-0410-8352-f15c8da7e697
2015-06-16 17:17:50 +00:00
Robert Osfield
1e0d682979 From Jannik Heller, "I've added the check for Qt version mismatches into osgQt as suggested in http://forum.openscenegraph.org/viewtopic.php?t=14999.
When an application is built with Qt4, but osgQt was built with Qt5 (or vice versa), upon #includeing osgQt users will receive an #error aborting the build.

This at least provides a proper error message rather than a crash, while we are working on better fixes for the problem."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14918 16af8721-9629-0410-8352-f15c8da7e697
2015-06-15 19:59:01 +00:00
Robert Osfield
824cc95518 Experiment with how to define GLsizeiptr.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14917 16af8721-9629-0410-8352-f15c8da7e697
2015-06-15 13:51:29 +00:00
Robert Osfield
08d2d322d9 Upated version number
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14916 16af8721-9629-0410-8352-f15c8da7e697
2015-06-15 13:51:09 +00:00
Robert Osfield
75891924bb Removed old and unused windows code path to avoid confusion
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14915 16af8721-9629-0410-8352-f15c8da7e697
2015-06-12 20:23:15 +00:00
Robert Osfield
82c188c24a Updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14913 16af8721-9629-0410-8352-f15c8da7e697
2015-06-12 11:28:54 +00:00
Robert Osfield
1e78098967 From Farshid Lashkari, "I've modified some setter methods of TextBase to avoid unnecessary calls to computeGlyphRepresentation() if the value has not changed."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14912 16af8721-9629-0410-8352-f15c8da7e697
2015-06-12 08:04:42 +00:00
Robert Osfield
fc9848ff19 Reverted the typdef GLfloat GLdouble for Andoid as this was causing conflicts.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14910 16af8721-9629-0410-8352-f15c8da7e697
2015-06-11 08:44:26 +00:00
Robert Osfield
8aee04c780 Updated ChangeLog and AUTHORS file for 3.3.8 dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14909 16af8721-9629-0410-8352-f15c8da7e697
2015-06-10 18:22:09 +00:00
Robert Osfield
e69405f99a From Laurens Voerman, "attached is a zip with the files:
OpenSceneGraph\CMakeModules\FindOpenEXR.cmake

I introduced a bug in the previous submission pointed out by Dmitry Marakasov:
looking for IlmIlf instead of IlmImf (as the previous version did - but using variable OPENEXR_IlmIlf_LIBRARY)

For some reason google decided his message was spam, so I just noticed it, and I reply to confirm his remarks and attach a full file.

"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14908 16af8721-9629-0410-8352-f15c8da7e697
2015-06-10 16:48:28 +00:00
Robert Osfield
e76c91ed78 From Colin McDonald, "An earlier fix in OSG 3.2 has been inadvertently lost in 3.3.x. The glGenerateMipMap function is part of the GL_EXT_framebuffer_object extension. Just checking if the function is present before using it for texture mipmaps is not sufficient, as on remote X-windows displays the client side capability may be different from the display server. This can lead to mipmapped textures failing to render. I've restored a fbo extension check. I've also tided up the GL version checking a little."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14907 16af8721-9629-0410-8352-f15c8da7e697
2015-06-10 16:47:15 +00:00
Robert Osfield
d2e0081690 From Philippe Renon, "Fixed potential divide by zero in NodeTrackerManipulator : The divide by zero happens when throwing a NodeTrackerManipulator.
The infinite result trickles down and later causes NaN in culling.

The fix was to use getThrowScale() as done everywhere else."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14905 16af8721-9629-0410-8352-f15c8da7e697
2015-06-10 10:00:27 +00:00
Robert Osfield
11a55ea6de Added supoort for osg::CullSettings/Camera::InheritanceMaskActionOnAttributeSetting and InheritanceMask properties.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14904 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 16:49:20 +00:00
Robert Osfield
bd9bd3f8b2 Added namespace around typedef to avoid conflict issues
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14903 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 12:51:38 +00:00
Robert Osfield
7e05d2fd54 Introduce osg::Object::asNode(), asNodeVisitor(), asStateAttribute() and asUniform() to replace dynamic_cast<> usage in Callback.cpp.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14902 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 10:49:34 +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
03565e3bbe Updated AUTHORS and ChangeLog for dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14900 16af8721-9629-0410-8352-f15c8da7e697
2015-06-08 11:33:49 +00:00
Robert Osfield
4073910ce8 From Mike Connell, "Give ReadFileCallback access to parent location : These small changes to the database pager allow user code in the ReadFileCallback to safely determine where the file being loaded is destined to be inserted into the scenegraph.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14899 16af8721-9629-0410-8352-f15c8da7e697
2015-06-08 11:18:24 +00:00
Robert Osfield
ceabbdb8d9 Addressed race condition where SceneView::setLightingMode() was setting a shread Master Camera's StateSet.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14898 16af8721-9629-0410-8352-f15c8da7e697
2015-06-08 10:20:53 +00:00
Robert Osfield
f7f1487fca Fixed setReferenceTime() bug where a * eather than the correct / was being used. Bug and fix suggested Benjamin Richter.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14896 16af8721-9629-0410-8352-f15c8da7e697
2015-06-07 11:13:02 +00:00
Robert Osfield
1f0ba7aa4f Updated AUTHORS for dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14895 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:35:19 +00:00
Robert Osfield
32b60cd2d7 From Jannik Heller, Transform::computeBound() optimization.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14894 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:13:05 +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
23cd6d2ba3 From Jannik Heller, "In the attachment you will find a build fix for the latest trunk. osgAnimation failed to compile when using OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF ."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14892 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:00:17 +00:00
Robert Osfield
95f911e98c Removed export that was breaking windows build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14891 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 10:28:34 +00:00
Robert Osfield
fd46645ade From KOS, "New classes for osgAnimation presented: UpdateFloatUniform, UpdateVec3fUniform and UpdateMatrixfUniform (based on UpdateUniform template)
Classes operate like osgAnimation::UpdateMaterial for Material's diffuse component, but change Uniform."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14890 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 09:14:35 +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
9222506a2c Added doxygen comment for typedef
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14888 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 09:06:44 +00:00
Robert Osfield
e7244e654a Build fix for when Uniform::Callback isn't defined
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14887 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 08:38:18 +00:00
Robert Osfield
da73723949 From Konstantin Matveyev, serializer support for UniformCallback
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14886 16af8721-9629-0410-8352-f15c8da7e697
2015-06-02 10:25:13 +00:00
Robert Osfield
e3f0876e87 From Konstantin Matveyev, "I've changed osg::Uniform::Callback to osg::UniformCallback.
osg::UniformCallback inherits osg::Callback now.

I don't really now if this class should be inside osgWrappers/serializers
because StateAttributeCallback is not presented there, but i've included it in the patch.


Please see archive in the attachment.


PS
DEEP_COPY_UNIFORMS works for me.
"
Note from Robert Osfield, added typedef UniformCallback Callback for backwards compatibility.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14885 16af8721-9629-0410-8352-f15c8da7e697
2015-06-02 09:33:22 +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
ba9dfb2ff6 From Albert Luaces, typo fixes.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14883 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:40:20 +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
e0028bef6e From Jannik Heller, "This patch adds a missing initialization of osgParticle::ParticleProcessor::_frameNumber in the copy constructor.
I noticed this because valgrind was complaining about use of uninitialized memory."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14881 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 12:14:53 +00:00
Robert Osfield
120bf699b2 From Frashud Lashkari, "I was getting "Unsupported wrapper class..." error messages when attempting to load osgb models simultaneously from multiple threads. I believe the problem is caused by un-synchronized access to the global osgDB::ObjectWrapperManager class. I've attached a change that adds a mutex to the class and uses it when accessing the internal wrapper/compress maps. This appears to fix the issues I was having."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14880 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 12:07:04 +00:00
Robert Osfield
78a01ce2a5 From Jannik Heller, "I have added new functions Texture::generateAndAssignTextureObject mirroring the Texture::generateTextureObject functions.
I have left the Texture::generateTextureObject functions intact as I'm not sure if/how it's used outside the core OSG. If you feel that compatibility isn't important in that area feel free to drop it.

While testing the build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF I found a compile error in GlyphGeometry.cpp that was entirely unrelated to the changes I've made. The fix is included in the patch.

There is one thing left to fix and that is Texture2D::SubloadCallback:

        class OSG_EXPORT SubloadCallback : public Referenced
        {
            public:
                ....
                virtual TextureObject* generateTextureObject(const Texture2D& texture, State& state) const
                {
                    return osg::Texture::generateTextureObject(&texture, state.getContextID(), GL_TEXTURE_2D);
                }
                ...
         }"
         


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14879 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 10:50:44 +00:00
Robert Osfield
44c406e167 From Jannik Heller, build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14878 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 10:41:43 +00:00
Robert Osfield
f72b62a065 From Jannik Heller, fix for race condition in orphanded BufferObject handling.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14877 16af8721-9629-0410-8352-f15c8da7e697
2015-05-29 07:52:27 +00:00
Robert Osfield
4f423ff66b From Colin McDonald, "rc/osgUtl/MeshOptimizers.cpp won't compile on some systems due to a missing std:: namespace prefix."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14876 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:24:48 +00:00
Robert Osfield
906bb27fa0 From Farshid Lashkari, "attached a small change to osgUtil::SceneView that prevents unnecessary calls to glClear when the split stereo separation is 0."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14875 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:22:05 +00:00
Robert Osfield
0f35f31d72 From Thomas Hogarth, "Little fix for ClassInterface::getSupportedProperties, before if you set searchAssociates to false then it would return the same BaseSerialiser::Type for every entry in the PropertyMap as i was not being incremented on line 539. Fix attached."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14874 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:17:26 +00:00
Robert Osfield
ddda9a6a0d From We See, "I found a small bug in osgUtil::RenderStage::draw() (osg 3.3.7), which crashes osg. The problem was caused by an access to the object _camera without checking whether the object is valid. So I changed the line:
Code:
if (_cameraRequiresSetUp || (_cameraAttachmentMapModifiedCount!=_camera->getAttachmentMapModifiedCount()))

to

Code:
if (_cameraRequiresSetUp || (_camera.valid() && _cameraAttachmentMapModifiedCount!=_camera->getAttachmentMapModifiedCount()))
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14873 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:12:05 +00:00
Robert Osfield
01e87939a4 From Farshid Lashkari and Robert Osfield, "a small change to the CullVisitor class, which will use cloneType() on the root render stage when creating children render stages. This allows us to pass a custom RenderStage object to the SceneView and have it used for all sub-stages."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14872 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:09:25 +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
05841d7c00 Added use of ref_ptr<>
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14870 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 08:48:33 +00:00
Robert Osfield
95a507299b Changed the EventQueue::frame() event generation to use the generatePointerData/reprojectPointerData() methods in the same way that other events are handled.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14869 16af8721-9629-0410-8352-f15c8da7e697
2015-05-25 12:39:18 +00:00
Robert Osfield
d5b615a4e1 Added osgGA::GUIEventAdapter* returns from various EventQueue event generation methods.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14868 16af8721-9629-0410-8352-f15c8da7e697
2015-05-25 11:33:04 +00:00
Robert Osfield
2e11113072 Fixed memory error associated with reading over the end of container due to an unbounded while loop.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14866 16af8721-9629-0410-8352-f15c8da7e697
2015-05-21 14:11:32 +00:00
Robert Osfield
180ce288c3 Update ChangeLog and AUTHORS file
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14865 16af8721-9629-0410-8352-f15c8da7e697
2015-05-06 18:39:44 +00:00
Robert Osfield
89fd422c98 Changed the CMP0020 check to > 2.8.10
Updated SO version number


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14864 16af8721-9629-0410-8352-f15c8da7e697
2015-05-05 11:05:09 +00:00
Robert Osfield
5380aebfc1 From Christian Kehl, changes for making osgAndroid working with GLES1 enabled
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14862 16af8721-9629-0410-8352-f15c8da7e697
2015-04-30 14:04:51 +00:00
Robert Osfield
eb5791e5e2 From Dmitriy Ogalcev, fix for crash when calling setCursor from a non GUI thread
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14861 16af8721-9629-0410-8352-f15c8da7e697
2015-04-30 13:59:24 +00:00
Robert Osfield
8962838e6a Replaced attempt at passing NULL Matrix with two specialized methods.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14860 16af8721-9629-0410-8352-f15c8da7e697
2015-04-28 16:12:57 +00:00
Robert Osfield
e52b95e084 Renamed LineSegment::intersect(BoundingSphere/Box, double/float&, double/float&) methods to LineSegment::intersectAndComputeRations(..) to avoid confusion with the change in convention for
the old intersect(BoundingBox&, float/double&, float/double&) method as it was inconsitent with the rest of the OSG including the intersect(BoundingSphere) method in how the ratio for the
second intersection was measure from - original from the end point, but now made consistent with other places in the OSG so be based on ration from start to end of segment.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14859 16af8721-9629-0410-8352-f15c8da7e697
2015-04-27 19:31:13 +00:00
Robert Osfield
5be2e05b18 Refactoring GlyphGeometry Boundary class to facilate better bevel overlap detection
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14858 16af8721-9629-0410-8352-f15c8da7e697
2015-04-23 14:44:06 +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
7d66324e5d Removed unused method
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14856 16af8721-9629-0410-8352-f15c8da7e697
2015-04-23 09:49:16 +00:00
Robert Osfield
2b1abf1937 From Giampaolo Vigano, "please find attached a further fix for 3ds plugin: now reflection map works also with transparent objects (I also removed a redundant setting of BlendFunc)."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14855 16af8721-9629-0410-8352-f15c8da7e697
2015-04-22 14:25:34 +00:00
Robert Osfield
5237185e8c From Chris Denham, "I found a couple of memory leaks in 3DS reader plugin and I have attached corrected files. I have attached an example 3DS file I used to test the leaks/fixes using osgviewer for trunk at rev [14853] and the tagged version 3.2.1.
The first leak is in the lib3ds module (yeah, I know that probably should be corrected at http://code.google.com/p/lib3ds/ but I'm assuming that as no commits have happened there since 2011 that it may be better to fix the copy we have in the OSG of that project) The leak is caused by lib3d's use of realloc(ptr, 0) to free up memory allocations, but realloc, when ptr==NULL returns malloc(0) rather than NULL and thus leaks a zero byte allocation. The solution here was to adjust the 'lib3ds_util_reserve_array' function so that it realloc is not used to release a NULL pointer.

The second leak is in ReaderWriter3DS.cpp and arises when any of the created StateSet objects added to the StateSetMap don't subsequently get applied to a Node. The solution here was just to simply use the osg::ref_ptr around the raw StateSet pointer that was used in the locally defined StateSetInfo struct."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14854 16af8721-9629-0410-8352-f15c8da7e697
2015-04-21 17:29:15 +00:00
Robert Osfield
6a4a21afe3 Updated AUTHORS
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14851 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 10:41:45 +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
54b389a18a Build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14849 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 10:19:04 +00:00
Robert Osfield
1020e22c33 Moved uniform substitution to infront of vertex attribute substituion to make sure gl_Vertex usage is replaced when required.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14848 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 09:39:00 +00:00
Robert Osfield
14ef282297 From Tim Moore, "The order_by_primitive_mode comparer was not providing a strict weak
ordering, which was causing a crash in the sort() call in
VertexAccessOrderVisitor::optimizeOrder (gcc 4.9, Fedora 21)."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14846 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 09:08:56 +00:00
Robert Osfield
ed7629351f Updated dev release number
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14845 16af8721-9629-0410-8352-f15c8da7e697
2015-04-17 14:36:05 +00:00
Robert Osfield
f4196dfe64 Added implementations for the libraryName and className for the AntiSquish node.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14844 16af8721-9629-0410-8352-f15c8da7e697
2015-04-17 13:33:08 +00:00
Robert Osfield
3bc1102f11 Fixed CollectParentPaths visitor so that it sets the setNodeMaskOverride(0xffffffff) to make sure all parents are traversed to find parents, even ones that have their NodeMask set to 0x0.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14843 16af8721-9629-0410-8352-f15c8da7e697
2015-04-17 13:24:44 +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
3a2380932f Changed MSVC version test to <= to enable fallback for VS2010.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14841 16af8721-9629-0410-8352-f15c8da7e697
2015-04-16 11:19:50 +00:00
Robert Osfield
c61c3d5500 Fixed crash when AntiSquish node is the root of the scene graph.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14840 16af8721-9629-0410-8352-f15c8da7e697
2015-04-16 10:07:23 +00:00
Robert Osfield
4a734b314c Updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14839 16af8721-9629-0410-8352-f15c8da7e697
2015-04-15 18:34:16 +00:00
Robert Osfield
bf0425f628 Updated version number of dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14837 16af8721-9629-0410-8352-f15c8da7e697
2015-04-15 18:05:43 +00:00
Robert Osfield
eb893eba75 Added missing const to find VS2005 build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14836 16af8721-9629-0410-8352-f15c8da7e697
2015-04-15 17:12:52 +00:00
Robert Osfield
1909de938a Added check for changes to window size during GraphicsWindowWin32::init() to fix bug that occurs when the window manage resizes the window automatically on creation.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14835 16af8721-9629-0410-8352-f15c8da7e697
2015-04-14 18:16:32 +00:00
Robert Osfield
3add98180c From Philippe Renon, MingW build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14834 16af8721-9629-0410-8352-f15c8da7e697
2015-04-14 15:50:51 +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
166c49eedd From Konstantin Matveyev, "I've added GLES3 profile, which also enables GLES2 features (OSG_GLES3_AVAILABLE=true => OSG_GLES2_AVAILABLE=true).
If OSG_OPENGL_PROFILE="GLES3" =>
GraphicsWindowIOS will create gles3 context.
If failed, GraphicsWindowIOS will create gles2 context.
Multisampling also working.

"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14831 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 10:11:32 +00:00
Robert Osfield
a711fdba36 From Laurens Voerman, I have modified the FindOpenEXR.cmake to find the debug libraries, and to define a variable
(OPENEXR_LIBRARIES_VARS) with the variable names that might have a _DEBUG version defined.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14830 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 09:50:27 +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
Robert Osfield
16b19a0c30 Refactored AntiSquish::computeUnSquishedMatrix() method to use the parent node path of the AntiSquish node
to compute the required matrix rather than using the NodePath provided by the NodeVistor. This is required
as in osg::computeLocalToWorld() usage case the NodeVisitor pointer is NULL, so the correct matrix isn't possible to compute.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14828 16af8721-9629-0410-8352-f15c8da7e697
2015-04-09 18:42:08 +00:00
Robert Osfield
595a048319 Added WindowSizeHandler to osgmanipulator example
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14827 16af8721-9629-0410-8352-f15c8da7e697
2015-04-09 18:38:53 +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
ab2fc1be76 From Giampaolo Viganò, "you can find in the attached ZIP archive a fix for 3ds plugin transparent/diffuse textures and opacity maps and the support for reflection map"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14825 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 16:58:31 +00:00
Robert Osfield
abdb23e367 From Janik Heller, clean up of drawable/node usage
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14824 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 15:53:17 +00:00
Robert Osfield
31488eeba1 Removed unused ShapesToGeometriesVisitor.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14823 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 15:52:02 +00:00
Robert Osfield
6cff8650f2 Cleaned up handling of Drawables so it utilizes the Node inheritance properly.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14822 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 15:49:06 +00:00
Robert Osfield
814693ffc1 Build fix for VS2005.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14821 16af8721-9629-0410-8352-f15c8da7e697
2015-04-03 15:43:34 +00:00
Robert Osfield
4c84742664 Improved the doxygen comment for the new createImageWithOrientationConversion(..) function.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14820 16af8721-9629-0410-8352-f15c8da7e697
2015-04-03 13:34:13 +00:00
Robert Osfield
c753dbc3e6 Added automatic rotation of jpeg image based on EXIF rotation information provided in the header.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14819 16af8721-9629-0410-8352-f15c8da7e697
2015-04-03 13:29:31 +00:00
Robert Osfield
40a7f903ec Implemented an osg::createImageWithOrientationConversion(...) method to aid for changing orientation of images.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14818 16af8721-9629-0410-8352-f15c8da7e697
2015-04-03 13:19:32 +00:00
Robert Osfield
8fb08496ae Added reading of EXIF_Orientation tags when present in a jpeg file.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14817 16af8721-9629-0410-8352-f15c8da7e697
2015-04-02 16:11:22 +00:00
Robert Osfield
950d7bb60b From Wojciech Lewandowski, Windows build fixes, "These are the tweaks I had to make. JSON_Objects / json_stream headers attached. I am not sure how these will behave on VS 2010. Someone with VS 2010 should test it. Should be okay on VS 2008 and below + VS 2012 and above, though."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14816 16af8721-9629-0410-8352-f15c8da7e697
2015-04-02 10:12:22 +00:00
Robert Osfield
9aa8d641a0 From Lionel Largarde, "fix for the Image::computeNumberOfMipmapLevels method. The method did use the float version of the log function and the / operator.
It works for most of the input sizes, but fails for 8192, 32768...
For 8192, the method returns 13 instead of 14."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14814 16af8721-9629-0410-8352-f15c8da7e697
2015-04-01 09:37:44 +00:00
Robert Osfield
de415fbcf9 Fixed crash when using a subload callback, where the _images array is empty by _images[0] was still being accessed.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14813 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 19:31:34 +00:00
Robert Osfield
5229280901 Added --subload command line option and test subload callback for testing purposes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14812 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 19:29:02 +00:00
Robert Osfield
a7ba138dc7 Introduced osg::Camera::resize(..) method and associated enum thus:
enum ResizeMask
        {
            RESIZE_VIEWPORT=1,
            RESIZE_ATTACHMENTS=2,
            RESIZE_PROJECTIONMATRIX=4,
            RESIZE_DEFAULT=RESIZE_VIEWPORT|RESIZE_ATTACHMENTS
        };

        /** Resize, to the specified width and height, the viewport, attachments and projection matrix according to the resizeMask provided.
          * Note, the adjustment of the projection matrix is done if the RESIZE_PROJECTIONMATRIX mask to set and according to the rules specified in the ProjectionResizePolicy. */
        void resize(int width, int height, int resizeMask=RESIZE_DEFAULT);



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14811 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 16:23:43 +00:00
Robert Osfield
99f7bfab3b Introduced Camera::resizeAttachments(int width, int height) to resize all the Texture and Image assigned the the Camera attachments.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14810 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 15:08:13 +00:00
Robert Osfield
296c12a8e9 Refactor the RTT Camera resize code into a seperate Callback method in prep for this all being done by a single Camera API call.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14809 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 10:41:33 +00:00
Robert Osfield
307e70f13b Added Camera::dirtyAttachmentMap(), Camera::s/getAttachmentMapModified() value and usage of this in RenderStage as a new mechanism
for telling the rendering backend to update itself to reflect new values in the attachments such as new texture or image sizes.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14808 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 10:36:38 +00:00
Robert Osfield
06e6f368fc Added StatsHandler to osgtessellationshaders example to test out rendering bug associated with stats rendering.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14807 16af8721-9629-0410-8352-f15c8da7e697
2015-03-23 11:36:02 +00:00
Robert Osfield
890aea9537 Added event handle to alter the RTT Camera's dimensions to follow the windows resizes.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14806 16af8721-9629-0410-8352-f15c8da7e697
2015-03-20 17:58:34 +00:00
Robert Osfield
953828a817 Fixed resize dimensions of X11 window
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14805 16af8721-9629-0410-8352-f15c8da7e697
2015-03-20 15:49:12 +00:00
Robert Osfield
6854d2968f From Jannik Heller, "Fix for Qt4 multi-threaded crash. This patch adds the AA_X11InitThreads flag to the QApplication setup, meaning QT will call XInitThreads for us. This also bumps the required QT version to 4.8+, because the AA_X11InitThreads flag was introduced in that version. If that is not acceptable, we could add a QT_VERSION >= 0x040800 guard, or manually call XInitThreads() instead. Let me know what you think."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14804 16af8721-9629-0410-8352-f15c8da7e697
2015-03-20 11:48:21 +00:00
Robert Osfield
63a3595aab Added Texture wrap setting to CLAMP_TO_EDGE to fix rendering problem when running the default osgdistortion example
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14803 16af8721-9629-0410-8352-f15c8da7e697
2015-03-19 10:49:17 +00:00
Robert Osfield
d9f920ee37 Fixed VisualStudio warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14802 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 18:10:21 +00:00
Robert Osfield
31fd2456b6 From Konstantin Matveyev, "Added ComputeBoundingBoxCallback, ComputeBoundingSphereCallback and UpdateCallback implmenentations to serializers"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14801 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 14:50:34 +00:00
Robert Osfield
bf86b031e0 Updated ChangeLog and AUTHORS file for dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14800 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 09:40:31 +00:00
Robert Osfield
535b168d81 Fixed library wrapper
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14798 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 09:09:10 +00:00
Robert Osfield
c086bef5ed Added ComputeBoundingSphereCallback reference
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14796 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 08:25:49 +00:00
Robert Osfield
fb4a2d7128 From Konstantin Matveyev, "More "LibraryWrapper" fixes for osg and osgAnimation NodeKits
in the attachment (for 3.3.6 version :)

Fixes:

osg:
Unsupported associated class osg::UpdateCallback (osg_Drawable_UpdateCallback);
ComputeBoundingBoxCallback

osgAnimation:
Unsupported wrapper class osgAnimation::RigComputeBoundingBoxCallback
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14795 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 08:24:01 +00:00
Robert Osfield
b8cd439697 Changed to using osgDB::ofstream to work around Windows build issue
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14794 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 08:19:05 +00:00
Robert Osfield
728d5ead52 Removed unneccessary library link line.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14793 16af8721-9629-0410-8352-f15c8da7e697
2015-03-16 17:01:57 +00:00
Robert Osfield
6d47fe4d98 Removed the using namespace std and replaced with local std:: to make the code clearer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14792 16af8721-9629-0410-8352-f15c8da7e697
2015-03-16 14:16:52 +00:00
Robert Osfield
e6e39e7924 Refactored the command line setup to enable better control of set up.
Added WindowSizeHandler to allow for adjustment of window size.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14791 16af8721-9629-0410-8352-f15c8da7e697
2015-03-16 12:13:44 +00:00
Robert Osfield
7165182e35 From Konstantin Matveyev, "Last update in the osgAnimation::Animation ONCE mode bug fix"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14789 16af8721-9629-0410-8352-f15c8da7e697
2015-03-16 10:30:18 +00:00
Robert Osfield
a88fa6f7b7 Added --play-mode [ONCE, STAY, LOOP, PPONG] to help with testing.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14788 16af8721-9629-0410-8352-f15c8da7e697
2015-03-16 10:07:13 +00:00
Robert Osfield
58717d9279 From Konstantin Matveyev, "Small fix for OSG 3.3.6.119 in the attachment.
One line added in osg/LibraryWrapper.cpp

USE_SERIALIZER_WRAPPER(Callback)
"



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14786 16af8721-9629-0410-8352-f15c8da7e697
2015-03-13 08:12:26 +00:00
Robert Osfield
e2f208af54 Refactored how the callbacks for updating geometry are managed in MorphGeometry and RigGeometry to address bugs in serialization.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14784 16af8721-9629-0410-8352-f15c8da7e697
2015-03-12 17:11:11 +00:00
Robert Osfield
dd2de7f132 From Laurens Voerman, "attached is a zip with a modified version of:
OpenSceneGraph\CMakeModules\FindFBX.cmake

This version can find fbx sdk 2015.1 and will prefer it over older versions.

Tested with Visual Studio Express 2013 on 64bit windows 7"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14782 16af8721-9629-0410-8352-f15c8da7e697
2015-03-12 15:12:29 +00:00
Robert Osfield
d3e9c44440 From Mattias Helsing, add copyright notice from other osgjs header to the json_stream header
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14781 16af8721-9629-0410-8352-f15c8da7e697
2015-03-12 13:41:00 +00:00
Robert Osfield
3d144a0312 Added using namespace std and removed the std:: prefixes before the std::isfinte and std::isinf function calls to avoid problems with Android builds against older NDK's.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14780 16af8721-9629-0410-8352-f15c8da7e697
2015-03-12 13:37:08 +00:00
Robert Osfield
53859bb3de From Laurens Voerman, warning fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14778 16af8721-9629-0410-8352-f15c8da7e697
2015-03-11 17:47:08 +00:00
Robert Osfield
11f5039695 From Laurens Voerman, "The current version will not compile with SDL version 2, error
OpenSceneGraph\src\osgPlugins\sdl\JoystickDevice.cpp(42): error C2664: 'const char *SDL_JoystickName(SDL_Joystick *)' : cannot convert argument 1 from 'int' to 'SDL_Joystick *'
due to changes in the SDL api.

Tested with Visual Studio Express 2013; SDL 2.0.1"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14776 16af8721-9629-0410-8352-f15c8da7e697
2015-03-11 17:36:45 +00:00
Robert Osfield
75b9cd3627 Completed support for assigning 3D osg::Image to osg::Texture2DArray.
Improved the osgtexture2DArray example to add --mipmap and --packed command line options to help with testing.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14775 16af8721-9629-0410-8352-f15c8da7e697
2015-03-11 17:27:08 +00:00
Robert Osfield
b6acb1a8d3 Updated the comments to be more relevant
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14774 16af8721-9629-0410-8352-f15c8da7e697
2015-03-11 15:44:23 +00:00
Robert Osfield
c30be2355b Work in progress to allow osg::Texture2DArray to be set up with a single osg::Image containing 3D image data.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14773 16af8721-9629-0410-8352-f15c8da7e697
2015-03-10 18:15:02 +00:00
Robert Osfield
d97e01c520 Work in progress on new osgtexture2DArray example
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14772 16af8721-9629-0410-8352-f15c8da7e697
2015-03-10 18:07:17 +00:00
Robert Osfield
2a84719f4a From Cedric Pinson, gles and osgjs plugins that support conversion of OSG loaded models into a form that can be used with osgjs JavaScript library
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14770 16af8721-9629-0410-8352-f15c8da7e697
2015-03-09 11:27:26 +00:00
Robert Osfield
9e2c23c9d3 Update AUTHORS file for 3.3.6 dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14768 16af8721-9629-0410-8352-f15c8da7e697
2015-03-05 19:53:17 +00:00
Robert Osfield
6a860e5e82 Updated dev release number
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14767 16af8721-9629-0410-8352-f15c8da7e697
2015-03-05 19:33:17 +00:00
Robert Osfield
e5b533726e Updated ChangeLog for dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14765 16af8721-9629-0410-8352-f15c8da7e697
2015-03-05 19:26:08 +00:00
Robert Osfield
ed9502e017 Added check for newline at end of version line, and of it's not add a '\n'
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14761 16af8721-9629-0410-8352-f15c8da7e697
2015-03-05 10:53:28 +00:00
Robert Osfield
efb90a6a80 Updated SO_VERSION after changes to osgPresentation
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14760 16af8721-9629-0410-8352-f15c8da7e697
2015-03-04 18:39:04 +00:00
Robert Osfield
8c8b8f3305 Restructed the osgPresentation and present3D directories back to the structure that was present in OSG-3.2
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14759 16af8721-9629-0410-8352-f15c8da7e697
2015-03-04 18:36:44 +00:00
Robert Osfield
26d1679248 Removed the experiemental osgPresentation classes. These are only partially functional and not appropriate for the stable OSG-3.4 release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14758 16af8721-9629-0410-8352-f15c8da7e697
2015-03-04 17:42:30 +00:00
Robert Osfield
412a9154c3 Updated AUTHORS for 3.3.5 dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14756 16af8721-9629-0410-8352-f15c8da7e697
2015-03-03 15:26:15 +00:00
Robert Osfield
66aef5dfc9 Fixed ClusterCullingCallback parser problem due to osg::Callback not being included in inheritance list
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14755 16af8721-9629-0410-8352-f15c8da7e697
2015-03-03 14:59:37 +00:00
Robert Osfield
5346e7772a Restructed the checks in the CollectLowestTransformsVisitor::removeTransforms() to avoid benign case being flagged as warning.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14753 16af8721-9629-0410-8352-f15c8da7e697
2015-03-03 12:56:09 +00:00
Robert Osfield
ec6edf535d From Miha Ravselj, "Regarding previous submission it was only partial solution. After further testing I found similar bug also in ClearNode serializer.
//GLbitfield mask = GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT;
This line was problematic since it produced incorrect result when let's say COLOR flag is serialized
it should be null as in Camera serializer or in a proposed BitFlagsSerializer


This line of code caused that whenever only GL_COLOR_BUFFER_BIT bit was written and on value read GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT was restored instead of GL_COLOR_BUFFER_BIT only.

//GLbitfield mask = 0; //this resolves the issue same as in camera
Also same bit-wise comparison bug was also present in write method.
-------------------------------------------------------------------------------------

As you can see there are total 3 bit mask serializers in OSG and all 3 had bugs so I decided to add ADD_BITFLAGS_SERIALIZER and replace USER serializers in osg::Camera, osg::ClearNode and osgText::TextBase. I have made sure that bitflags serializer does not break backwards-compatibility since it uses same code as user serializer does in all 3 cases. (see tester.cpp on how compatibility test was performed)"



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14752 16af8721-9629-0410-8352-f15c8da7e697
2015-03-03 12:03:23 +00:00
Robert Osfield
4c4738eced Re-organized the #ifdef's to avoid usage of glPolyginMode under GLES
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14751 16af8721-9629-0410-8352-f15c8da7e697
2015-03-03 12:00:52 +00:00
Robert Osfield
925c37b783 Updated SO_VERSION to take account of API changes in osgDB
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14749 16af8721-9629-0410-8352-f15c8da7e697
2015-03-02 14:38:17 +00:00
Robert Osfield
58edd10d04 From Johannes Scholz, "Attached you find a patch for osgDB::OutputStream and osgDB::InputStream to include osg::Image::data() using Base64 encoding inside the ASCII OSGT, if WriteImageHint=IncludeData is set, only."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14748 16af8721-9629-0410-8352-f15c8da7e697
2015-03-02 12:11:43 +00:00
Robert Osfield
1d9e7f144b From Michael McDonnel, "The tessellation shader example has a small bug.The middle of the
geometry is clipped as soon as it is tessellated. The clipping is
probably caused by rounding errors because it is only in one spot. The
clipping disappears when the camera is moved, and reappears when it is
moved back. Expanding the the bounding box fixed the clipping bug."

Tweaked by Robert Osfield to expand it to a -1 to 1 unit box.
Actual clipping bug is not due to rounding errors but the shaders creating vertices outside the bounding box of the original input vertices


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14747 16af8721-9629-0410-8352-f15c8da7e697
2015-03-02 12:09:25 +00:00
Robert Osfield
0a83632f0a Fixed StateSet::Define names to match OpenSceneGraph-Data/shaders.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14745 16af8721-9629-0410-8352-f15c8da7e697
2015-03-01 15:20:37 +00:00
Robert Osfield
321750d72d From Jannik Heller, "I noticed the rotation in the OrbitManipulator depends on the framerate. To reproduce this issue, start the osganimate example, rotate the model with the left mouse button, then let go of the mouse button while still moving. You will notice that with V-Sync enabled, the model rotates slower.
The OrbitManipulator calculates a scale to counteract the framerate dependency, but it turns out this scale wasn't used for the rotation yet."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14744 16af8721-9629-0410-8352-f15c8da7e697
2015-03-01 11:08:58 +00:00
Robert Osfield
e3e1a55702 Updated version number after dev release.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14740 16af8721-9629-0410-8352-f15c8da7e697
2015-02-27 10:01:56 +00:00
Robert Osfield
e9f497aa1f Updated ChangeLog and Contributors to fix trailing spaces
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14738 16af8721-9629-0410-8352-f15c8da7e697
2015-02-27 09:47:58 +00:00
Robert Osfield
b59b0e0253 Fixed Windows warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14737 16af8721-9629-0410-8352-f15c8da7e697
2015-02-27 09:05:04 +00:00
Robert Osfield
d03b38dea8 Fixes for warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14736 16af8721-9629-0410-8352-f15c8da7e697
2015-02-27 04:29:30 +00:00
Robert Osfield
23b76599bd Fixed build with auto ptr conversion switched off
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14735 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 20:15:36 +00:00
Robert Osfield
f93a4f330a Updated AUTHORS
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14733 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 19:51:56 +00:00
Robert Osfield
6a30705870 From Bradley Baker Searles, "We had someone replace a DDS texture with a GL_RGB/GL_UNSIGNED_SHORT_5_6_6 image, which would trigger a crash in Image.cpp while flipping the mipmap chain. The code was trying to flip the mipmaps using the rowStep for the full-size image (we have "dds_flip" set in the osgDB::ReaderWriter::Options in the osgDB::Registry)."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14732 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 19:14:28 +00:00
Robert Osfield
9dffd49241 From Bradley Baker Searles, "Small patch attached to handle DDS flip when s=4. Currently it will omit flipping and generate a warning: "Vertical flip was skipped. Image dimensions have to be multiple of 4."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14729 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 18:06:06 +00:00
Robert Osfield
77f662f9f7 From Julien Valentin and Alberto Luaces, added support for transform feedback extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14728 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 17:49:36 +00:00
Robert Osfield
63acee9ee3 Update AUTHORS file
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14727 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 17:18:31 +00:00
Robert Osfield
d1c93f6bad Fixed typo
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14725 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 14:16:22 +00:00
Robert Osfield
11ff450231 Regenerated AUTHORS.txt to fix missing special characters
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14724 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 13:52:12 +00:00
Robert Osfield
9362339242 Updated AUTHORS file
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14723 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 19:59:01 +00:00
Robert Osfield
32831b1ef8 Updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14722 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 19:52:00 +00:00
Robert Osfield
5f1b41a84f From Aitor Moreno, "Attached you will find the modified file without the lines which raises the exception. "
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14721 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 19:38:43 +00:00
Robert Osfield
1db6def2c4 From Jamie Robertson, "I've been using osgSim::ScalarBar to display fixed range color values (e.g. red from 1-2, green from 3-4 etc), by setting the _numColors the same as the number of actual colors in the ColorRange.
Currently if you do this you get strange looking results as the colors are calculated for values in the centre of each color step, so if your steps are large, the colors are interpolated sigificantly (see screen grab of red, green and blue colors for illustration).

I've attached a fix which just uses the original color values whenever _numColors equals the number of actual defined colors in the ColorRange. I doubt anyone would want interpolated colors in these circumstances."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14720 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 19:31:20 +00:00
Robert Osfield
47202acc24 From Dmitry Marakasov, "While packaging osg-3.3.3 I've discovered that gstreamer detection is
broken:

-- Could NOT find GStreamer (missing:  GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_GSTREAMER-APP_INCLUDE_DIRS GSTREAMER_GSTREAMER-APP_LIBRARIES GSTREAMER_GSTREAMER-PBUTILS_INCLUDE_DIRS GSTREAMER_GSTREAMER-PBUTILS_LIBRARIES) (found version "1.4.5")

though all required modules are installed.

There are two problems: first, module names are spelled incorrectly in root
CMakeLists.txt (e.g. gstreamer-app instead of app), so variables expected
for them are e.g. GSTREAMER_GSTREAMER-APP_INCLUDE_DIRS instead of
GSTREAMER_APP_INCLUDE_DIRS.

Second, gstreamer base component is detected as GSTREAMER while checked
later as GSTREAMER_BASE. I've uncommented the detection as
GSTREAMER_BASE, but obviously that should be revisited and only one
detection left. With this patch, gstreamer is detected properly and
the plugins is successfully built and installed."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14719 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 19:25:34 +00:00
Robert Osfield
30a62bc4ad From Jonathan Greig, "I was testing out the example and it works fine as a standalone example, but I found that it didn't work as expected when adding the class to some existing code I have to test it out. The osg widget was appearing but it didn't appear to be updating. After tweaking it to pass on the parent QWidget pointer from my code, it worked as expected. I added the WindowFlags to the attached file for good measure. If you look at the Qt Documentation for QWidget ( http://doc.qt.io/qt-5/qwidget.html#QWidget ), you'll see that is exactly where I got this from. When subclassing a widget as such, you should allow the user to pass in the parent at least, considering that has a major effect on how or if Qt may clean up the memory."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14718 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 19:19:37 +00:00
Robert Osfield
47db2da8b4 From Andreas Henne, Support for GL3 core profile in osgText
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14717 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 18:56:29 +00:00
Robert Osfield
7d50c8e634 From Michael McDonnell, "I have changed the code so that the plus key increases both the inner
and outer tessellation. The minus key decrease both the inner and
outer tessellation. You can still use the arrow keys to control inner
and outer tessellation separately."

From Robert Osfield, clean up the code to fix warnings and make the coding style more consistent with the rest of the OSG.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14716 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 16:59:43 +00:00
Robert Osfield
e7d41377be Fixed handling of NULL entries in osg::Geometry TexCoordArrayList and VertexAttribArrayList.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14715 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 14:55:59 +00:00
Robert Osfield
213efd20ad Fixed matrix setup.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14714 16af8721-9629-0410-8352-f15c8da7e697
2015-02-24 11:06:05 +00:00
Robert Osfield
bd3f390b2f Fixed image allocation operations.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14712 16af8721-9629-0410-8352-f15c8da7e697
2015-02-23 20:28:28 +00:00
Robert Osfield
594b3064c0 From Miha Ravšelj and Robert Osfield, fix for serializer bug in osgText::TextBase and osg::Camera
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14711 16af8721-9629-0410-8352-f15c8da7e697
2015-02-23 11:43:21 +00:00
Robert Osfield
685a270c18 From Arjun Ramamurthy, fix for use of StatsHandler in multipleviews/windows
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14709 16af8721-9629-0410-8352-f15c8da7e697
2015-02-23 11:07:03 +00:00
Robert Osfield
1320c923ca Changed the toggle of defines so that it works with assumed defaults now set up by the GeometryPool so that when toggling it doesn't have a delay in what the user would expect
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14708 16af8721-9629-0410-8352-f15c8da7e697
2015-02-20 15:12:57 +00:00
Robert Osfield
72c4f3a8ba Removed redudent shaders, and updated remaining shaders to match OpenSceneGraph-Data/shaders
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14705 16af8721-9629-0410-8352-f15c8da7e697
2015-02-20 15:04:56 +00:00
Robert Osfield
afbf20eba9 First step of refactoring the osg::Program management in osgTerrain::GeometryPool for better performance by placing default osg::Program and shader defines on a single StateSet below the osgTerrain::Terrain
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14704 16af8721-9629-0410-8352-f15c8da7e697
2015-02-20 15:02:43 +00:00
Robert Osfield
5c023d1f76 Moved osgTerrain::GeometryPool from osgTerrain::DisplacementMappingTechnique to the osgTerrain::Terrain
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14703 16af8721-9629-0410-8352-f15c8da7e697
2015-02-18 10:52:52 +00:00
Robert Osfield
e5d51da1b3 From Sebastian Messerschmidt, "Attached you find a version of the ReaderWriterDDS with info outputs set to OSG_INFO instead of OSG_NOTICE. The old version spams the console for each loaded DDS file."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14701 16af8721-9629-0410-8352-f15c8da7e697
2015-02-18 10:23:14 +00:00
Robert Osfield
4cb5bce66a Added support for DefineList to StateSet::merge(..)
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14700 16af8721-9629-0410-8352-f15c8da7e697
2015-02-17 20:42:12 +00:00
Robert Osfield
3e2305d815 From Stephan Wenglorz, "the attached fix corrects a small bug in OperationThread::setDone(bool), calling it had the opposite effect of what was intended, i.e. setting done to false actually finished the thread. The effect was that VPB threads would exit before starting osgdem when a task had been enqueued, because they initially set done to false."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14699 16af8721-9629-0410-8352-f15c8da7e697
2015-02-17 19:40:58 +00:00
Robert Osfield
8546e911fc Removed GL_ usage in defines
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14697 16af8721-9629-0410-8352-f15c8da7e697
2015-02-17 19:22:37 +00:00
Robert Osfield
441dbe6b02 Removed commented out lines
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14696 16af8721-9629-0410-8352-f15c8da7e697
2015-02-17 19:21:29 +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
6bddbdf074 Improvements to the #pragma(tic) shader composition support
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14694 16af8721-9629-0410-8352-f15c8da7e697
2015-02-13 12:50:43 +00:00
Robert Osfield
77b8962bcc Deprecated the old ShaderComposition example code so that it's now only invoked if you add a --old to the osgshadercomposition command line.
Introduced a new shader composition example based on the new #pragama and #define based GLSL shader/osg::StateSet::setDefine() functionality now built into the core OSG.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14692 16af8721-9629-0410-8352-f15c8da7e697
2015-02-13 10:56:59 +00:00
Robert Osfield
a40260a5a5 From Farshid Lashkari, "I've attached a fix for some internal glu functions so that they use size_t for computing allocation sizes instead of GLint. I encountered some large images that were triggering integer overflows with the current code."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14690 16af8721-9629-0410-8352-f15c8da7e697
2015-02-13 07:45:49 +00:00
Robert Osfield
66210a6aca Fixed warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14689 16af8721-9629-0410-8352-f15c8da7e697
2015-02-11 19:21:27 +00:00
Robert Osfield
9fa3defb0e Added reassignment of the #version line to the first entry in the source list.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14688 16af8721-9629-0410-8352-f15c8da7e697
2015-02-11 16:41:31 +00:00
Robert Osfield
4a9f4aae9d Added GL #define for Windows build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14687 16af8721-9629-0410-8352-f15c8da7e697
2015-02-11 09:41:15 +00:00
Robert Osfield
a676d5d37b Windows build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14686 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 21:13:16 +00:00
Robert Osfield
06f186dc07 Added GL_LINES_ADJACENCY_EXT variants back into ObjectWraper to enable backwards compatibility.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14685 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 18:01:02 +00:00
Robert Osfield
ea7dbabda1 Change for new Program API
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14684 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 17:53:29 +00:00
Robert Osfield
b38c6258bf Added support for new #pragam(atic) shader composition to new displacement mapping technique
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14683 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 17:20:26 +00:00
Robert Osfield
b90503fdf5 Introduced new shader composition approach that utilizes #pragma requires(), #pragma import_defines() and #ifdef in GLSL to enable multiple different versions of shaders based
on defines passed in from osg::StateSet::setDefine(..).



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14681 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 17:04:02 +00:00
Robert Osfield
bb637e73f3 Fixed typo.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14680 16af8721-9629-0410-8352-f15c8da7e697
2015-02-04 15:11:00 +00:00
Robert Osfield
1debc21bb2 Removed unncessary _EXT
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14679 16af8721-9629-0410-8352-f15c8da7e697
2015-02-03 16:36:19 +00:00
Robert Osfield
bbb54cedc7 Commented out the experimental V8 and Python plugins as these plugins only existed as a proof of concept test linkage with these dependenices, and have no functionality beyond this.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14678 16af8721-9629-0410-8352-f15c8da7e697
2015-02-02 09:53:55 +00:00
Robert Osfield
a9804d7e19 Replaced _EXT defines with GL-3.2 versions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14677 16af8721-9629-0410-8352-f15c8da7e697
2015-01-27 15:07:53 +00:00
Robert Osfield
045caf1086 From Javier Taibo,
"I have found a "bug" in the new audio decoding code (actually I think the bug is in ffmpeg, but anyway it should be wise to protect the OSG plug-in about it). I am attaching a security check in FFmpegDecoderAudio.cpp.

If anybody is curious about the problem, it happens sometimes when decoding an AAC audio stream. It eventually includes a PCE block inside the AAC audio frame and then ffmpeg audio decoding function signals a "new_frame" with 1024 samples, but a null pointer instead of the audio data. It can be easily detected because in these cases number of channels is 0. Maybe this is the intended behaviour for ffmpeg, but I find it quite weird.
"

" It seems that libav does not have a channels attribute in AVFrame structure. This new version should do."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14676 16af8721-9629-0410-8352-f15c8da7e697
2015-01-23 17:15:20 +00:00
Robert Osfield
4bcf4cf7bb Changed osgFX::MultiTextureControl so that it uses an osg::FloatArray internally to enable sharing with osg::Uniform.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14675 16af8721-9629-0410-8352-f15c8da7e697
2015-01-23 13:51:09 +00:00
Robert Osfield
22cf4c18c3 Added MultiTextureControl event handling of shift 012 i.e. ')', '!', '"' and 'A' to toggle full on for each of the respective or all texture units.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14674 16af8721-9629-0410-8352-f15c8da7e697
2015-01-23 13:50:12 +00:00
Robert Osfield
f5faf615ef Added #define GL_SEPARATE_ATTRIBS and correcte GL_INTERLEAVED_ATTRIBS
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14673 16af8721-9629-0410-8352-f15c8da7e697
2015-01-22 16:49:00 +00:00
Robert Osfield
51b19d2d8b From Alexey Pavlov, "Export fix for Windows platform"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14672 16af8721-9629-0410-8352-f15c8da7e697
2015-01-22 16:41:34 +00:00
Robert Osfield
e330e9309c Added GL_INTERLEAVED_ATTRIBS for windows build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14671 16af8721-9629-0410-8352-f15c8da7e697
2015-01-22 15:08:26 +00:00
Robert Osfield
4a668d53c5 Fixed warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14670 16af8721-9629-0410-8352-f15c8da7e697
2015-01-22 15:07:50 +00:00
Robert Osfield
d5f2c34f24 From Andreas Henne, OpenGL core profile fixes required for OSX.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14669 16af8721-9629-0410-8352-f15c8da7e697
2015-01-21 15:35:19 +00:00
Robert Osfield
7fbeeefea8 Added TextureWeights uniform support and controls to osgFX::MultiTextureControl to support usage with shaders.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14668 16af8721-9629-0410-8352-f15c8da7e697
2015-01-21 11:09:29 +00:00
Robert Osfield
3ab06c54bf Re-enabled texturing and fixed runtime warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14667 16af8721-9629-0410-8352-f15c8da7e697
2015-01-20 18:01:10 +00:00
Robert Osfield
51afa2c1df Added hardwired geometry shaders
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14666 16af8721-9629-0410-8352-f15c8da7e697
2015-01-20 17:58:56 +00:00
Robert Osfield
a0f1442aae Updated shaders
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14664 16af8721-9629-0410-8352-f15c8da7e697
2015-01-20 17:40:46 +00:00
Robert Osfield
98f5fca9c2 Added key osgTerrain::GeometryPool methods virtual to make it easier to override the shaders
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14662 16af8721-9629-0410-8352-f15c8da7e697
2015-01-20 15:23:06 +00:00
Robert Osfield
0a4efa35c3 Changed the reset of the GLExtensions::Set() in the State destructor so that it checks to see if the local _glExtensions pointer has been set up and taken ownership of the GLExtensions::Set() value
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14661 16af8721-9629-0410-8352-f15c8da7e697
2015-01-20 11:24:31 +00:00
Robert Osfield
3eca5765c9 Added GeometryPool::s/getUseGeometryShader() hint, and OSG_TERRAIN_USE_GEOMETRY_SHADER env var for setting the default value.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14660 16af8721-9629-0410-8352-f15c8da7e697
2015-01-19 11:29:55 +00:00
Robert Osfield
249c0ff208 Added support for using geometry shaders to align the quad diagonals with the local terrain
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14658 16af8721-9629-0410-8352-f15c8da7e697
2015-01-16 11:03:11 +00:00
Robert Osfield
3e3d7e4dc1 Added a local Vec3Array cache to the HeightFieldDrawable to facilitate efficient intersection testing
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14656 16af8721-9629-0410-8352-f15c8da7e697
2015-01-12 10:31:58 +00:00
Robert Osfield
ed57c8718c Added ability to populate a local vertex cache for when one computes final vertex position in a vertex shader but still want to the Primitive functors to work with the transformed positions.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14655 16af8721-9629-0410-8352-f15c8da7e697
2015-01-12 10:30:50 +00:00
Robert Osfield
d409ffcb91 From Javier Taibo, "I have found that since version 1.1, FFMPEG changed the way audio streams are retrieved, from packed to planar format. SDL interprets packed audio, as is used in the osgmovie example. To make the audio work when the OSGffmpeg plug-in is compiled against recent FFMPEG versions, FFmpegDecoderAudio must check for planar formats and in these cases request the samples as packed. This way all works as before. It can be checked with osgmovie example application.
$ osgmovie --audio movie.avi.ffmpeg
  FFmpegImageStream::open audio failed, audio stream will be disabled: unknown audio format

  With the attached FFmpegDecoderAudio.cpp, audio sounds correctly.

  I am also attaching a modified version of FindFFmpeg.cmake that allows to set as FFMPEG_DIR the ffmpeg compiled in the source directory structure. It should not break anything as it only adds some additional search paths.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14654 16af8721-9629-0410-8352-f15c8da7e697
2015-01-07 14:14:55 +00:00
Robert Osfield
bf794165d5 From Farshid Lashkari, "small change to osg::Image::readImageFromCurrentTexture to allow reading data from compressed cubemap textures."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14653 16af8721-9629-0410-8352-f15c8da7e697
2015-01-07 10:36:34 +00:00
Robert Osfield
134b2e506f Cleaned up GL_TEXTURE_BUFFER_*ARB usage as include/osg/GLDefines now provides the non ARB variants
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14652 16af8721-9629-0410-8352-f15c8da7e697
2015-01-06 17:23:26 +00:00
Robert Osfield
8b384baca9 From Julien Valentin, "To sum up changes, I had:
-some extensions in GLExtensions
  - GL_TEXTURE_BUFFER as target in osg::StateSet
  - a VBO based transform feed back example
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14651 16af8721-9629-0410-8352-f15c8da7e697
2015-01-06 17:12:51 +00:00
Robert Osfield
f9f480b935 Updates SO_VERSION in prep for API modifications since the 3.3.3 dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14650 16af8721-9629-0410-8352-f15c8da7e697
2015-01-06 17:09:44 +00:00
Robert Osfield
4538a0fa41 From Julien Valentin, added missing initializer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14647 16af8721-9629-0410-8352-f15c8da7e697
2015-01-06 14:55:00 +00:00
Robert Osfield
f7b95ea4e5 From Julien Valentin, typo fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14646 16af8721-9629-0410-8352-f15c8da7e697
2015-01-06 14:41:30 +00:00
Robert Osfield
b1852757b5 From Jason Beverage, "Here is a fix to the STL plugin that fixes build errors introduced in the last commit. It's just a simple addition of the stdint.h header."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14644 16af8721-9629-0410-8352-f15c8da7e697
2015-01-05 17:39:44 +00:00
Robert Osfield
ace32ebe6c Updated ChangeLog and AUTHORS
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14643 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 11:56:48 +00:00
Robert Osfield
1b1c987356 Removed debug message
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14642 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 11:43:41 +00:00
Robert Osfield
78729e28fd From Marc Helbling, Clément Léger, Aurélien Chatelain, Paul Cheyrou-Lagrèze :
"a last submission for the obj plugin
* supports vertex color definition after vertex position by Clément Léger
* supports zbrush vertex color definition (as #MRGB comment) by Aurélien Chatelain
* adds a noReverseFace option to not mess with face definition by Aurélien Chatelain
* makes material parsing case insensitive (by Paul Cheyrou-Lagrèze and me)
* makes the plugin resilient to faulty vertex uv/normal definition (i.e. when a too big index is referenced) by Aurélien hatelain
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14641 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 11:25:46 +00:00
Robert Osfield
50203023c7 From Aurélien Chatelain, "adds support for
* quad primitives
* face definition with the "vertex_index" label (previously only "vertex_indices" was supported)
* replaces normal computation by the SmoothingVisitor to avoid code duplication
"

Submitted by Marc Helbling.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14640 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 11:02:18 +00:00
Robert Osfield
a331680cec From Aurélien Chatelain, "the smoothing visitor did not handle shared arrays. It may leads to bad geometry arrays when a shared array is involved in the scene.
This submission adds shared array duplication (and moves the SharedArrayOptimizer declaration in MeshOptimizer to make it callable from the SmoothingVisitor)."

Submitted by Marc Helbling.
Edited by Robet Osfield to retain the usual OSG coding style.




git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14639 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:55:49 +00:00
Robert Osfield
2870c12b03 From Aurélien Chatelain, "updates the STL plugin:
* fixes vertex color support
* adds 'magics' color definition
* cleans options to make the plugin more consistent with other plugins
* adds options to not tristrip geometries"

Submitted by Marc Helbling.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14638 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:47:25 +00:00
Robert Osfield
18323ac899 Aded shaders for various combinations of layers.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14637 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:14:03 +00:00
Robert Osfield
c57e62e799 Added osgDB::readShaderFileWithFallback(..) convinience functions to make it easier to set up reading external shader files with a built in fallback.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14636 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:13:42 +00:00
Robert Osfield
f984f6032f Added support for reading Vec3 colour arrays
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14634 16af8721-9629-0410-8352-f15c8da7e697
2014-12-23 14:20:53 +00:00
Robert Osfield
5a4f962013 Changes to allow the COLLADA plugin to compile against the latest COLLADA DOM version 2.4 as well as retaining compatibility with the old 2.2 DOM.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14633 16af8721-9629-0410-8352-f15c8da7e697
2014-12-23 12:10:03 +00:00
Robert Osfield
dd650921b1 Added comment about using -DCMAKE_DISABLE_FINDPACKAGE_* command line.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14632 16af8721-9629-0410-8352-f15c8da7e697
2014-12-22 10:35:33 +00:00
Robert Osfield
73221e8682 Added doxygen comment for ref_ptr<>::release().
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14630 16af8721-9629-0410-8352-f15c8da7e697
2014-12-22 09:50:10 +00:00
Robert Osfield
8e901ebbac Updated version number after dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14628 16af8721-9629-0410-8352-f15c8da7e697
2014-12-22 09:49:17 +00:00
Robert Osfield
4945e03bcb Windows build error and warning fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14626 16af8721-9629-0410-8352-f15c8da7e697
2014-12-19 11:00:31 +00:00
Robert Osfield
c6013c721e Updated ChangeLog and AUTHORS file for dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14625 16af8721-9629-0410-8352-f15c8da7e697
2014-12-19 10:25:49 +00:00
Robert Osfield
dfc02b78bf Added if () block to avoid script variables set to NOT-Found being used in searching
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14624 16af8721-9629-0410-8352-f15c8da7e697
2014-12-19 08:27:30 +00:00
Robert Osfield
a03ec99005 Fixed script warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14623 16af8721-9629-0410-8352-f15c8da7e697
2014-12-19 08:25:35 +00:00
Robert Osfield
8be71caeaf From Aitor Moreno, LAS plugin - depends upon boost and liblas and liblas-c
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14622 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 17:47:08 +00:00
Robert Osfield
b163ff8562 From Adrian Clark, build fix for recent Android NDK using the old Android build approach.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14621 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 16:52:57 +00:00
Robert Osfield
4ce6b07886 From Mattias Helsing, "CMake have release 3.0 and 3.1 and we have some bad checks for cmake
major version when settings cmake policies in CMakeLists.txt. This fixes it"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14620 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 15:59:16 +00:00
Robert Osfield
2a46857353 Updated AUTHORS
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14617 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 11:36:16 +00:00
Robert Osfield
e281c264a7 Updated ChangeLog in prep for dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14616 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 11:19:11 +00:00
Robert Osfield
34177d3f63 Fixed warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14615 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 11:09:43 +00:00
Robert Osfield
6f9ac83693 Added DisplaySettings::s/getNvOptimusEnablement() and OSG_NvOptimusEnablement env var control to control the setting of the NvOptimusEnablement variable
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14614 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 10:59:07 +00:00
Robert Osfield
075e874c85 From Sukender, "Added options to the FBX writer: an ascii/binary switch, and the ability to select FBX version as the SDK handles it (Ex: "FBX201300").
This allows the user to achieve backward compatibility, and debug format issues using text output."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14613 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 09:24:46 +00:00
Robert Osfield
af16041f57 From Mattias Helsing, "The addition of the GStreamer cmake find script broke my build because
cmake vars weren't passed correctly to find_package_handler_args, so
while the find script didn't find a single required GStreamer lib or
include path it still reported GSTREAMER_FOUND=TRUE (and then tried to
compile the new plugin). This fixes it and correctly reports missing
components."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14611 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 09:03:15 +00:00
Robert Osfield
adf9596316 Added support for using SDL2 to the osgmovie to enable it to handle floating point audio formats
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14610 16af8721-9629-0410-8352-f15c8da7e697
2014-12-17 19:21:32 +00:00
Robert Osfield
69abe094ab From Javier Taibo, " I have found that since version 1.1, FFMPEG changed the way audio streams are retrieved, from packed to planar format. SDL interprets packed audio, as is used in the osgmovie example. To make the audio work when the OSGffmpeg plug-in is compiled against recent FFMPEG versions, FFmpegDecoderAudio must check for planar formats and in these cases request the samples as packed. This way all works as before. It can be checked with osgmovie example application.
$ osgmovie --audio movie.avi.ffmpeg
  FFmpegImageStream::open audio failed, audio stream will be disabled: unknown audio format

  With the attached FFmpegDecoderAudio.cpp, audio sounds correctly.

  I am also attaching a modified version of FindFFmpeg.cmake that allows to set as FFMPEG_DIR the ffmpeg compiled in the source directory structure. It should not break anything as it only adds some additional search paths.

"

Note from Robert Osfield, I have found in testing that audio quality is not good for planar floating point formats, even with adding support for SDL2 to the osgmovie example. I haven't yet tracked down the cause of these audio problems or a solution.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14609 16af8721-9629-0410-8352-f15c8da7e697
2014-12-17 19:20:48 +00:00
Robert Osfield
4513709a1b From Sukender, "FBX writer was writing an empty file when the scene had a root node being a Geode.
This was caused be the change in Drawable (now derived from Node) and Geode (now derived from Group).
This fix simply sticks with previous behaviour. Another change could be to adapt WriterNodeVisitor.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14608 16af8721-9629-0410-8352-f15c8da7e697
2014-12-17 10:19:02 +00:00
Robert Osfield
e7ea085912 Fixed warnings and memmory leaks
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14607 16af8721-9629-0410-8352-f15c8da7e697
2014-12-16 17:37:03 +00:00
Robert Osfield
e4e22bb1af Fixed warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14606 16af8721-9629-0410-8352-f15c8da7e697
2014-12-16 17:15:21 +00:00
Robert Osfield
4dfe6ab048 Improved handling of invalid/unhandled files
Added support for ImageStream::LoopigMode variable
Fixed memory leak associtied with restarting videos
Changed Image::setData() to Image::dirty() to avoid resetting data


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14605 16af8721-9629-0410-8352-f15c8da7e697
2014-12-16 17:08:01 +00:00
Robert Osfield
6cd9932780 From Julen Garcia, "Here there is a small plugin I use to play video files. It is based on GStreamer http://gstreamer.freedesktop.org and I have used the FFmpeg plugin as inspiration."
From Robert Osfield, fixed handled of row widths so that they are padded to a 4 byte boundary as certain row widths were being rendered incorrectly.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14604 16af8721-9629-0410-8352-f15c8da7e697
2014-12-16 11:20:42 +00:00
Robert Osfield
58c47e9842 From Marc Helbling, "please find enclosed a submission that should improve the VertexAccessOrderVisitor (pre-transform) optimizer:
* it sorts primitives to keep "more complex" primitives first; maybe you'll prefer to have this as an option (but usually it should make more sense to pre-transform triangles before e.g. lines)
* currently, the visitor rely on TriangleIndexFunctor and does not take care of points and lines (see https://github.com/openscenegraph/osg/blob/master/include/osg/TriangleIndexFunctor#L124-130). This can lead to issues e.g. if you store the wireframe lines along with some triangles: the triangles will be reindexed but not the line. I've therefore added osg/include/TriangleLinePointIndexFunctor to index triangles, lines and points and derived VertexReorder from this class.
* to avoid issues, shared arrays are duplicated. However, in some cases (e.g. an UV channel shared in the geometry only) this is not required. I'm adding a SharedArrayOptimizer to optimize this: it looks for duplicated UVs before the array duplication and deduplicate arrays after.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14603 16af8721-9629-0410-8352-f15c8da7e697
2014-12-16 09:34:15 +00:00
Robert Osfield
117869d154 From Marc Helbling, "please find the mergeTriangleStrip code merged in osgUtil::TriStripVisitor.
I've removed the references to DrawArrays as we should no longer produce any.

Note that:
* as the name suggest, it only works for triangle strips but could probably be easily extended to quads
* the resulting primitive is not highly optimized; we could probably sort the strips in order to minimize the number of primitive restart
* as we may merge DrawElementsUInt and DrawElementUShort, the code will only generate DrawElementsUInt"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14602 16af8721-9629-0410-8352-f15c8da7e697
2014-12-15 17:15:21 +00:00
Robert Osfield
811dde86c8 Build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14601 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 18:23:32 +00:00
Robert Osfield
49c48a5509 Added OpenGL Transform Feedback extensions.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14600 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 13:05:47 +00:00
Robert Osfield
1b6e50a2dd From Marcus Hein, Added support for OpenGL SSBO and SSBB via osg::ShaderStorageBufferObject and osg::ShaderStorageBufferBinding to core OSG library, and added new osgSSBO example
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14599 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 12:23:04 +00:00
Robert Osfield
92e2d849ed Added GLDefines header
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14597 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 11:44:16 +00:00
Robert Osfield
487c2b5f67 From Farshid Lashkari, "The Collada loader would crash while processing textures on certain files. I've attached the fix."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14595 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 11:29:54 +00:00
Robert Osfield
3c07921dee Removed old GL2Extensions class, replacing it with a typedef to GL2Extensions
Removed old includes to include/osg/GL2Extensions


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14594 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 10:44:58 +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
09205544b7 Streamlined the extension functions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14592 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 09:11:17 +00:00
Robert Osfield
7629a5126a Added #ifdef's around GLsync typedef
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14591 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 21:33:12 +00:00
Robert Osfield
22e51c9902 Windows build fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14590 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 20:09:29 +00:00
Robert Osfield
a6aa47afcd Added new examples to runexamples.bat script
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14589 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 19:31:53 +00:00
Robert Osfield
d166b6d1df Quietened down debug messages
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14588 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 19:22:45 +00:00
Robert Osfield
d32cd203a2 From Wand Rui, "I've rewritten the osgblenddrawbuffers example to use the new BlendFunci and Capability classes. Hope it will tell others how to make use of the new functionality and why they are important in modern MRT-based applications."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14587 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 19:20:05 +00:00
Robert Osfield
43049ebcf1 Moved FBO Extensions into GL2Extensions.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14586 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 18:30:28 +00:00
Robert Osfield
d5fcdabfa1 Removed no longer used Extension definition
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14585 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 14:58:34 +00:00
Robert Osfield
e31f682451 Moved local Extensions structs into GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14584 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 14:57:25 +00:00
Robert Osfield
3f1e77d479 Moveved Stencil/StencilTwoSided::Extensions into GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14583 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 11:14:33 +00:00
Robert Osfield
ec4f898bce Moved local Extensions objects to GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14582 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 10:37:09 +00:00
Robert Osfield
cceee38727 Moved Texture*::Extensions functionality into GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14581 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 10:05:59 +00:00
Robert Osfield
a8804e2366 MOved VertexProgram and FragmentProgram::Extensions into GL2Extensions.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14580 16af8721-9629-0410-8352-f15c8da7e697
2014-12-08 16:08:44 +00:00
Robert Osfield
35cfbfdb8c Fixed memory leak in RenderStageCache.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14578 16af8721-9629-0410-8352-f15c8da7e697
2014-12-08 11:08:29 +00:00
Robert Osfield
bc424bc54f MOved SampleMaski::Extensions into osg::GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14577 16af8721-9629-0410-8352-f15c8da7e697
2014-12-07 17:31:49 +00:00
Robert Osfield
9b03b3f8ce Moved TextureCubeMap::Extension functionality into GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14576 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 20:05:18 +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
1ce8029f39 Fixed windows build warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14574 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 10:37:20 +00:00
Robert Osfield
1bcb944ddc Windows build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14573 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 09:52:42 +00:00
Robert Osfield
aa090f0f99 From the GLintptr + GLsizeiptr defintions to GL2Extensions header
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14572 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 08:58:23 +00:00
Robert Osfield
d83e641fad Moved osg::BlenFunc::Extensions into osg::GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14571 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 19:03:16 +00:00
Robert Osfield
d02c0bdc49 Moved GLBufferObject::Extensions structure into osg::GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14570 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 18:13:11 +00:00
Robert Osfield
69407f4054 Removed redundent spaces
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14569 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 18:12:07 +00:00
Robert Osfield
1791ac08a8 Added glMemoryBarrier, glMapBufferRange and glBindBufferBase to GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14568 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 17:12:55 +00:00
Robert Osfield
6569f69de1 Moved old GL2Extensions::Get(..) usage across to new osg::State::get<GL2Extensions>() usage
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14567 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 16:28:32 +00:00
Robert Osfield
66da1328f8 Ported GL2Extentions across to using the new GL extensions approach - cutting code count by 3000 lines!
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14566 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 16:22:31 +00:00
Robert Osfield
f8d53b7c8d Build fix for when ref_ptr<> auto conversion is disabled
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14565 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 15:10:43 +00:00
Robert Osfield
5efe60dcf5 Added osg::Capability and Cabibilityi base classes to wrap up glEnable/glDisable + glEnablei/glDisablei functionality, with osg::Enablei and osg::Disablei concrete implementations.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14564 16af8721-9629-0410-8352-f15c8da7e697
2014-12-03 17:31:16 +00:00
Robert Osfield
457d41d385 Added osg::BlendFunci, osg::BlendEquationi and osg::ColorMaski StateAttrirbutes that wrap the glBlendFunci, glBlendEquationi and glColorMaski functions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14563 16af8721-9629-0410-8352-f15c8da7e697
2014-12-02 17:12:56 +00:00
Robert Osfield
a9cab19ddb Moved BlendEquation across to using the new GL extension setup approach.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14562 16af8721-9629-0410-8352-f15c8da7e697
2014-12-02 15:37:07 +00:00
Robert Osfield
0ce96fbe8b Fixed typo
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14561 16af8721-9629-0410-8352-f15c8da7e697
2014-12-02 15:21:24 +00:00
Robert Osfield
ff73445bf3 Added a template get and get_exisiting method into osg::State that implements a new mechanism for managing OpenGL extensions.
Refactored the BendFunc::Extensions usage to simplify it utilizing the new osg::State extension mechanism.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14560 16af8721-9629-0410-8352-f15c8da7e697
2014-12-02 11:10:23 +00:00
Robert Osfield
b7067ad988 From Rafa Gaitan, "I'm attaching also a new version of the toolchain with support for the r10c ndk. This fixes some CMake Warnings and allows to use the toolchain in macosx."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14558 16af8721-9629-0410-8352-f15c8da7e697
2014-11-28 16:20:28 +00:00
Robert Osfield
e5f5c30e4d Removed include/osg/Version and include/OpenThreads/Version headers as these are autogenerated.
Changed the paths for the OpenThreads/osg Version headers to be placed in the PROJECT_BINARY_DIR.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14557 16af8721-9629-0410-8352-f15c8da7e697
2014-11-28 16:10:14 +00:00
Robert Osfield
d7c6bb1c4b Standardized on defined(__ANDROID__)
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14556 16af8721-9629-0410-8352-f15c8da7e697
2014-11-28 10:54:40 +00:00
Robert Osfield
6d98c5460f Added getlocaledecpoint() workaround for Android build of lua plugin
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14555 16af8721-9629-0410-8352-f15c8da7e697
2014-11-28 10:52:06 +00:00
Robert Osfield
1c9993dd5d Added in source shaders
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14554 16af8721-9629-0410-8352-f15c8da7e697
2014-11-27 15:54:24 +00:00
Robert Osfield
114ddbb0c6 Changed the name of shader files
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14553 16af8721-9629-0410-8352-f15c8da7e697
2014-11-27 15:39:38 +00:00
Robert Osfield
95b3622d1d From Jason Beverage, "It looks like the Callback header got accidentally removed from the CMakeLists.txt in the submission yesterday for the geometry instancing example."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14551 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 20:40:57 +00:00
Robert Osfield
4184696809 Windows build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14550 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 19:05:09 +00:00
Robert Osfield
d76947845a Fixed warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14549 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 17:08:16 +00:00
Robert Osfield
2f0cc6fbc9 Fixed warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14546 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 17:04:12 +00:00
Robert Osfield
f802f6d0ed Fixed deprecated warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14545 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 16:29:53 +00:00
Robert Osfield
a165930b48 Fixed warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14542 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 16:15:37 +00:00
Robert Osfield
0be132c07c Fixed warnings.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14539 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 16:04:33 +00:00
Robert Osfield
d6ed4c4d6d Fixed warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14537 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 16:00:18 +00:00
Robert Osfield
8fe82b463f Fixed warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14536 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 15:59:23 +00:00
Robert Osfield
dd186fe6a1 Added osgTerrain::DisplacementMappingTechnique serializer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14535 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 14:06:27 +00:00
Robert Osfield
dfb0b2ab8e Renamed ShaderTerrain to DisplacementMappingTechnique and moved it from the osgterrain example testbed into the osgTerrain NodeKit
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14534 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 14:04:20 +00:00
Robert Osfield
d9f93f9d1a Moved osgTerrain::GeometryPool from osgterrain example into osgTerrain NodeKit
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14533 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 13:36:28 +00:00
Robert Osfield
eaa170809f Removed GL header as it's already included via the ${OPENSCENEGRAPH_OPENGL_HEADER} entry.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14532 16af8721-9629-0410-8352-f15c8da7e697
2014-11-25 14:37:05 +00:00
Robert Osfield
4c5a1885d2 From PawelKsiezopolski, "This submission contains a new example for OSG : a geometry instancing rendering
algorithm consisting of two consequent phases :

- first phase is a GLSL shader performing object culling and LOD picking ( a culling shader ).
  Every culled object is represented as GL_POINT in the input osg::Geometry.
  The output of the culling shader is a set of object LODs that need to be rendered.
  The output is stored in texture buffer objects. No pixel is drawn to the screen
  because GL_RASTERIZER_DISCARD mode is used.

- second phase draws osg::Geometry containing merged LODs using glDrawArraysIndirect()
  function. Information about quantity of instances to render, its positions and other
  parameters is sourced from texture buffer objects filled in the first phase.

The example uses various OpenGL 4.2 features such as texture buffer objects,
atomic counters, image units and functions defined in GL_ARB_shader_image_load_store
extension to achieve its goal and thus will not work on graphic cards with older OpenGL
versions.

The example was tested on Linux and Windows with NVidia 570 and 580 cards.
The tests on AMD cards were not conducted ( due to lack of it ).
The tests were performed using OSG revision 14088.

The main advantages of this rendering method :
- instanced rendering capable of drawing thousands of different objects with
  almost no CPU intervention  ( cull and draw times are close to 0 ms ).
- input objects may be sourced from any OSG graph ( for example - information about
  object points may be stored in a PagedLOD graph. This way we may cover the whole
  countries with trees, buildings and other objects ).
  Furthermore if we create osgDB plugins that generate data on the fly, we may
  generate information for every grass blade for that country.
- every object may have its own parameters and thus may be distinct from other objects
  of the same type.
- relatively low memory footprint ( single object information is stored in a few
  vertex attributes ).
- no GPU->CPU roundtrip typical for such methods ( method uses atomic counters
  and glDrawArraysIndirect() function instead of OpenGL queries. This way
  information about quantity of rendered objects never goes back to CPU.
  The typical GPU->CPU roundtrip cost is about 2 ms ).
- this example also shows how to render dynamic objects ( objects that may change
  its position ) with moving parts ( like car wheels or airplane propellers ) .
  The obvious extension to that dynamic method would be the animated crowd rendering.
- rendered objects may be easily replaced ( there is no need to process the whole
  OSG graphs, because these graphs store only positional information ).

The main disadvantages of a method :
- the maximum quantity of objects to render must be known beforehand
  ( because texture buffer objects holding data between phases have constant size ).
- OSG statistics are flawed ( they don't know anymore how many objects are drawn ).
- osgUtil::Intersection does not work

Example application may be used to make some performance tests, so below you
will find some extended parameter description :
--skip-dynamic       - skip rendering of dynamic objects if you only want to
                       observe static object statistics
--skip-static        - the same for static objects
--dynamic-area-size  - size of the area for dynamic rendering. Default = 1000 meters
                       ( square 1000m x 1000m ). Along with density defines
                       how many dynamic objects is there in the example.
--static-area-size   - the same for static objects. Default = 2000 meters
                       ( square 2000m x 2000m ).

Example application defines some parameters (density, LOD ranges, object's triangle count).
You may manipulate its values using below described modifiers:
--density-modifier   - density modifier in percent. Default = 100%.
                       Density ( along with LOD ranges ) defines maximum
                       quantity of rendered objects. registerType() function
                       accepts maximum density ( in objects per square kilometer )
                       as its parameter.
--lod-modifier       - defines the LOD ranges. Default = 100%.
--triangle-modifier  - defines the number of triangles in finally rendered objects.
                       Default = 100 %.
--instances-per-cell - for static rendering the application builds OSG graph using
                       InstanceCell class ( this class is a modified version of Cell class
                       from osgforest example - it builds simple quadtree from a list
                       of static instances ). This parameter defines maximum number
                       of instances in a single osg::Group in quadtree.
                       If, for example, you modify it to value=100, you will see
                       really big cull time in OSG statistics ( because resulting
                       tree generated by InstanceCell will be very deep ).
                       Default value = 4096 .
--export-objects     - write object geometries and quadtree of instances to osgt files
                       for later analysis.
--use-multi-draw     - use glMultiDrawArraysIndirect() instead of glDrawArraysIndirect() in a
                       draw shader. Thanks to this we may render all ( different ) objects
                       using only one draw call. Requires OpenGL version 4.3 and some more
                       work from me, because now it does not work ( probably I implemented
                       it wrong, or Windows NVidia driver has errors, because it hangs
                       the apllication at the moment ).

This application is inspired by Daniel Rákos work : "GPU based dynamic geometry LOD" that
may be found under this address : http://rastergrid.com/blog/2010/10/gpu-based-dynamic-geometry-lod/
There are however some differences :
- Daniel Rákos uses GL queries to count objects to render, while this example
  uses atomic counters ( no GPU->CPU roundtrip )
- this example does not use transform feedback buffers to store intermediate data
  ( it uses texture buffer objects instead ).
- I use only the vertex shader to cull objects, whereas Daniel Rákos uses vertex shader
  and geometry shader ( because only geometry shader can send more than one primitive
  to transform feedback buffers ).
- objects in the example are drawn using glDrawArraysIndirect() function,
  instead of glDrawElementsInstanced().

Finally there are some things to consider/discuss  :
- the whole algorithm exploits nice OpenGL feature that any GL buffer
  may be bound as any type of buffer ( in our example a buffer is once bound
  as a texture buffer object, and later is bound as GL_DRAW_INDIRECT_BUFFER ).
  osg::TextureBuffer class has one handy method to do that trick ( bindBufferAs() ),
  and new primitive sets use osg::TextureBuffer as input.
  For now I added new primitive sets to example ( DrawArraysIndirect and
  MultiDrawArraysIndirect defined in examples/osggpucull/DrawIndirectPrimitiveSet.h ),
  but if Robert will accept its current implementations ( I mean - primitive
  sets that have osg::TextureBuffer in constructor ), I may add it to
  osg/include/PrimitiveSet header.
- I used BufferTemplate class writen and published by Aurelien in submission forum
  some time ago. For some reason this class never got into osg/include, but is
  really needed during creation of UBOs, TBOs, and possibly SSBOs in the future.
  I added std::vector specialization to that template class.
- I needed to create similar osg::Geometries with variable number of vertices
  ( to create different LODs in my example ). For this reason I've written
  some code allowing me to create osg::Geometries from osg::Shape descendants.
  This code may be found in ShapeToGeometry.* files. Examples of use are in
  osggpucull.cpp . The question is : should this code stay in example, or should
  it be moved to osgUtil ?
- this remark is important for NVidia cards on Linux and Windows : if
  you have "Sync to VBlank" turned ON in nvidia-settings and you want to see
  real GPU times in OSG statistics window, you must set the power management
  settings to "Prefer maximum performance", because when "Adaptive mode" is used,
  the graphic card's clock may be slowed down by the driver during program execution
  ( On Linux when OpenGL application starts in adaptive mode, clock should work
  as fast as possible, but after one minute of program execution, the clock slows down ).
  This happens when GPU time in OSG statistics window is shorter than 3 ms.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14531 16af8721-9629-0410-8352-f15c8da7e697
2014-11-25 10:58:23 +00:00
Robert Osfield
f06ea2bc6e Removed DrawArrays optimization to simplify the code and open the door to adding primitive combining.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14530 16af8721-9629-0410-8352-f15c8da7e697
2014-11-25 10:33:20 +00:00
Robert Osfield
79a4fff2dc Commented out State::setUpVertexAttribAlias(..) debug message.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14529 16af8721-9629-0410-8352-f15c8da7e697
2014-11-25 10:11:06 +00:00
Robert Osfield
53e337611a From Jan Klimke, "i noticed, that there are a couple of additional flaws when building osg for Mac OS X 10.10 Yosemite.
The mac os sdk version is recognized by the current CMAKE script as 10.1 instead of 10.10 since it cuts the version string from the 4th place. I introduced a more reliable version checking based on splitting the returned version code into MAJOR MINOR and PATCH parts and reassemble the OSG sdk version afterwards.

I replaced the existing CMake code against the following (returning now version 10.10 as expected):

 # Determine the canonical name of the selected Platform SDK
   EXECUTE_PROCESS(COMMAND "/usr/bin/sw_vers" "-productVersion"
                   OUTPUT_VARIABLE OSG_OSX_SDK_NAME
                   OUTPUT_STRIP_TRAILING_WHITESPACE)
   STRING(REPLACE "." ";" MACOS_VERSION_LIST ${OSG_OSX_SDK_NAME})
   LIST(GET MACOS_VERSION_LIST 0 MACOS_VERSION_MAJOR)
   LIST(GET MACOS_VERSION_LIST 1 MACOS_VERSION_MINOR)
   LIST(GET MACOS_VERSION_LIST 2 MACOS_VERSION_PATCH)

   SET(OSG_OSX_SDK_NAME "macosx${MACOS_VERSION_MAJOR}.${MACOS_VERSION_MINOR}")

Also i added the check for the new Version to some more find scripts.

Additionally the nil object in Objective C now seems to be equivalent with a null_ptr that cannot be passed as GLInt anymore. So i switched this in the PixelBufferCocoa.mm to pass a zero instead of nil.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14527 16af8721-9629-0410-8352-f15c8da7e697
2014-11-24 15:19:20 +00:00
Robert Osfield
86ddca4edb Added VertexAttribDivisor class to wrap up glVertexAttribDivisor function
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14526 16af8721-9629-0410-8352-f15c8da7e697
2014-11-24 14:54:39 +00:00
Robert Osfield
2a8d894168 Fixed osgsimplegl3 example's set up of the main camera.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14524 16af8721-9629-0410-8352-f15c8da7e697
2014-11-24 14:09:14 +00:00
Robert Osfield
fce7137525 Added numTextureUnits parameter to the osg::State::resetVertexAttributeAlias(bool, unit) method, and set the default to 8.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14523 16af8721-9629-0410-8352-f15c8da7e697
2014-11-24 14:01:05 +00:00
Robert Osfield
671d8dc342 From Alberto Luaces,"the current code uses the preprocessor for generating the plugin path in
a way that when CMAKE_INSTALL_PREFIX contains something along the lines
of

/usr/x86_64-linux-gnu/

it gets substituted as

/usr/x86_64-1-gnu/

that is, the string is preprocessed again, thereby making changes to
anything that matches any defined symbol, as "linux" in this example
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763816).

Quoting that path directly in CMake scripts solves that problem.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14522 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 20:16:16 +00:00
Robert Osfield
a97f104ab6 Added comment clarifying how Image::getColor(..) out of 0..1 range texcoords are handled - now clamped to edge.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14520 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 20:15:30 +00:00
Robert Osfield
e51fd3d4fa Implemented a clamp to edge policy for the Image::g/setColor(color, texcoord).
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14519 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 17:22:30 +00:00
Robert Osfield
b37d6b1921 Added testing for Drawables in the CopyOp::operator(Node*) to replicate the old functionality.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14518 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 17:17:11 +00:00
Robert Osfield
e67466a74f From Sebastian Messerschmidt, "Added setColor function to modify an image based on texture coordinates, parallel to the getColor functionality."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14517 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 16:27:29 +00:00
Robert Osfield
f49d7ae110 Added --db-affinit cpuNum option to osgterrain example to illustrate how to set the thead affinity of the DatabasePager threads.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14516 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 14:46:08 +00:00
Robert Osfield
c71016bd3c From Sebastian Messerschmidt, "Attached you find a change adding a getNumSamples() function to retrieve the value set via setNumSamples."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14515 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 10:44:01 +00:00
Robert Osfield
b9a529148a From Rafa Gaitan, "I finally had some time to change the build system for Android using a Toolchain, which, I think, will be easier to maintain and uses cmake standard system to build it.
My changes:
-------------------
- I changed the cmake files and added a toolchain for building OSG in Android. The toolchain is based on the one used at OpenCV. For building OSG for android you just need to do:

    mkdir build_android_static_gles2 && cd build_android_static_gles2
    cmake .. -DANDROID_NDK=<path-to-the-android-ndk>
                  -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
                  -DOPENGL_PROFILE="GLES2"
                  -DDYNAMIC_OPENTHREADS=OFF
                  -DDYNAMIC_OPENSCENEGRAPH=OFF
                  -DANDROID_NATIVE_API_LEVEL=15 # optional
                  -DANDROID_ABI=armeabim #optional
                  -DCMAKE_INSTALL_PREFIX=<path-to-the-install-path> #optional
make -j 8
make install

    The OPENGL_PROFILE works as expected, changing it to "GLES1" it builds and links OSG using GLES1.
    The DYNAMIC_OPENTHREADS/DYNAMIC_OPENSCENEGRAPH parameters also allows to build the dynamic libraries

- I also added some build fixes for android related to the texture formats and added some missing USE_OSG_SERIALIZER_WRAPPER in the osg serializer library to support loading osgb files in static."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14514 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 10:37:33 +00:00
Robert Osfield
2986df22d6 From Björn Blissing, fix for ambiguous defines in Atomic.cpp when compiling with MinGW and GCC
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14513 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 10:21:46 +00:00
Robert Osfield
5da4e80e95 From Claus Steuer, "XCode 6, IOs 8.1 SDK Compile fix : There are some undefined texture formats when compiling osg for IOs 8.1 with XCode 6 and OpenGLES2 enabled."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14510 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 17:37:52 +00:00
Robert Osfield
f8c4ad4b90 From Pjotr Svetachov, "I was experimenting with VBO's to try to get them on par with display
lists when drawing lots of batches and noticed that my program
generated a lot of unneeded glClientActiveTexture calls. Digging
deeper I found out it came from State::disableTexCoordPointer where
the function would call glClientActiveTexture but not
glDisableClientState because the geometry didn't have texture
coordinates for that channel. This is because in our scene there are
some geometries that have move than one uv channels making
State::_texCoordArrayList grow. Then the method
State::applyDisablingOfVertexAttributes() will call
disableTexCoordPointer multiple times.

I rearrange the method a little to combat this. Now the logic has the
same ordering as disableTexCoordPointersAboveAndIncluding which
already combats this."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14508 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 17:00:14 +00:00
Robert Osfield
834c940db1 From Farshid Lashkari, "The obj loader was overriding the existing database path list with the file path of the model, instead of prepending the file path to the path list. The latter seems to be more common behavior for most of the existing loader plugins. Also, the local options weren't actually being used when processing the scene graph for textures. I've attached the fix for both issues."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14507 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 16:38:23 +00:00
Robert Osfield
600e98773e From Marc Helbling, "here is a trivial fix in the Inventor plugin. In one code path, the pointer validity is checked after dereferencing a pointer that can be null (image->valid()) instead of calling ref_ptr::valid (image.valid())."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14505 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 10:52:24 +00:00
Robert Osfield
2da766ff1b From Marc Helbling, "I've come across scenes that contains geometries with initialized but empty vertex arrays and primitives and that would make some optimizers crash.
The submission therefore only contains a test on the size of the vertex array for the VertexCacheMissVisitor and the VertexAccessOrderVisitor visitors."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14503 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 10:45:05 +00:00
Robert Osfield
1e75ca63f4 From Christian Ruzicka, "while testing this commit on our OSG 3.2 version, I observed that the changes for ETC2 brake ETC1 support. Attached you'll find the changes to get ETC1 running again"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14501 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 10:05:52 +00:00
Robert Osfield
cf7258e03a From Sukender, "Fix for 3DS reader, which may read wrong triangles. Actually, indices may suffer a 'short int' overflow, in two places."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14500 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 09:55:50 +00:00
Robert Osfield
b4354df6fb Fixed segfalt in Texture2DArray copy constructor where it would apply images to an uninitialzed vector.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14498 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 09:41:27 +00:00
Robert Osfield
7ae45b7ac2 From Marc Helbling, "patch adding support for ambient material in the FBX plugin. It's a straightfoward adaptation of the emissive support and has been tested on a proprietary model."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14495 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 09:32:38 +00:00
Robert Osfield
f3859f6d11 From Pjotr Svetachov, fix for build breakage with giflib 5.0.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14493 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 09:21:52 +00:00
Robert Osfield
f0882eda6b From Per Nordqvist, "The README.txt is still somewhat confusing so I have updated it"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14491 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 08:26:34 +00:00
Robert Osfield
aa17d70853 Removed configure script as it's no longer required as cmake . will now default to Release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14490 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 17:45:45 +00:00
Robert Osfield
f3eb245e98 Added CMake script to set the default CMAKE_BUILD_TYPE to Release. Approach taken from simgear.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14489 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 17:42:11 +00:00
Robert Osfield
a08b3104a8 Fixed Contributors names
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14486 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 17:29:15 +00:00
Robert Osfield
43bdd32242 From Clement Boesch, "Fix remaining bit of Giflib5 usage"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14485 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 17:10:21 +00:00
Robert Osfield
3dd9f8d430 From Laurens Voerman, "I found a new way to crach the osgviewer:
osgviewer "ProxyNode { FileNameList { cow.osgt } num_children 1 }".osgs

The proxy node reader wrongly assumes options to be non NULL.

fixed in attached zip:
src\osgWrappers\deprecated-dotosg\osg\ProxyNode.cpp

applies to both the 3.2 branch and svn trunk"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14484 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 11:37:37 +00:00
Robert Osfield
34863fe2d2 From Wang Rui, "The submission includes some fixes for osgQt library and osgQtWidgets example: (1) QTextEdit now works with mouse/drag events, (2) scrollbars will change when OSG window is resizing, (3) improve rendering efficiency of QGraphicsViewAdapter so that it works with complex Qt UI, (4) add new setBackgroundWidget() method to indicate a 'background widget', which will ignore mouse/key events on it and pass them to the 3D scene."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14482 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 11:30:53 +00:00
Robert Osfield
5f45a39f28 Changed the way that the cell size is passed to the shader
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14481 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 10:43:07 +00:00
Robert Osfield
5ab861cd04 From James Turner, "Converting the loops to forward versions fixed the issue. The problem is size_t is unsigned; at the limit condition it doesn’t go negative but wraps around to 0xffffffffffffffff …. and boom."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14480 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 09:33:53 +00:00
Robert Osfield
f40df07ec7 Fixed typo
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14478 16af8721-9629-0410-8352-f15c8da7e697
2014-11-17 15:43:26 +00:00
Robert Osfield
ab47842d6d Fixed typo in comment
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14477 16af8721-9629-0410-8352-f15c8da7e697
2014-11-17 09:19:38 +00:00
Robert Osfield
6661deeb24 Added use of GL_TRIANGLE_STRIP to cut down the size of the primitive indices required.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14476 16af8721-9629-0410-8352-f15c8da7e697
2014-11-14 17:44:20 +00:00
Robert Osfield
bff5b0261b Implemented skirt functionality
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14475 16af8721-9629-0410-8352-f15c8da7e697
2014-11-14 16:47:32 +00:00
Robert Osfield
25cfb81a09 Refactored the handling of use of the osgDB::ObjectCache in the DatabasePager to use a local thread specific ObjectCache to handle new additions and
then have these additions merged with the main Registry ObjectCache during the main loop.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14474 16af8721-9629-0410-8352-f15c8da7e697
2014-11-13 09:40:11 +00:00
Robert Osfield
ed28ec97c7 Moved implementation of ObjectCache functionality out of Registry into a dedicated osgDB::ObjectCache class.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14473 16af8721-9629-0410-8352-f15c8da7e697
2014-11-11 18:28:07 +00:00
Robert Osfield
0e9c93f335 To handle thread safe paging and use of the osgDB::Registry ObjectCache, moved the handling of cache into osgDB::DatabasePager.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14472 16af8721-9629-0410-8352-f15c8da7e697
2014-11-10 16:04:43 +00:00
Robert Osfield
14620aa1dd From Pjotr Svetachov, "I tried your fix and it exposed a bug in my fix :)
The problem is that the readObjectFields method will add the object to the _identifierMap. So all the other instances of that image in the same file will be replaced by the created dummy object. In my fix this was an dummy image and I didn't notice it in our scene's, probably because it covered a small part of an object. In your fix the dummy object was not an image and that leads to a crash when something tries to use it as an image. I have attached a small fix for this bug.

"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14471 16af8721-9629-0410-8352-f15c8da7e697
2014-11-06 10:44:27 +00:00
Robert Osfield
a84df15c0a Introduced use of MarkerObject to IncrmentalCompileOperation/DatabasePager as a way of marking objects that have already been processed and compiled,
thus avoid potential threading conflicts when paged subgraphs are reused.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14470 16af8721-9629-0410-8352-f15c8da7e697
2014-11-06 10:40:54 +00:00
Robert Osfield
7f592b7ad5 Added handling of the reading of field properties to a dummy object for cached images to avoid threading issues associated with reusing and modifying an active object.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14469 16af8721-9629-0410-8352-f15c8da7e697
2014-11-05 16:08:42 +00:00
Robert Osfield
9cda04e51f Reinstated the original mechanism for OperationThread::cancel() that co-operatively releases blocks/barriers to make sure the thread is able to exit correctly.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14468 16af8721-9629-0410-8352-f15c8da7e697
2014-11-05 13:38:50 +00:00
Robert Osfield
7a33cc00cd Improvements to the ShaderTerrain experiemental terrain rendering technique.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14466 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 20:07:40 +00:00
Robert Osfield
1a265f53f7 Changed TerrainTile::setDirty() to use children needing update traversal mechanism to address threadng issues.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14465 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 20:07:15 +00:00
Robert Osfield
5177298dad Change isRunning variable to an Atomic to address possible race condition asscoiated with reading and writing to the variable from different threads.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14464 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 20:06:05 +00:00
Robert Osfield
de0664ef77 Build fixes for ffmpeg LIBAVCODEC_VERSION_MAJOR >= 56
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14462 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 16:29:30 +00:00
Robert Osfield
aa962724e8 Added an InitRegistry static intiialization and destrucion static to help control the order of construction and destruction of the osgDB::Registry.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14461 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 11:18:42 +00:00
Robert Osfield
28a676e105 Replaced use of while(isRunning()) { YieldCurrentThread(); } style loops with use of join() to avoid false positives being reported by valgrind when using the helgrind tool for thread debugging.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14460 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 10:46:59 +00:00
Robert Osfield
997ee30039 Added experimental osgTerrain::ShaderTerrain TerrainTechnique to osgterrain example to flesh out new shader based displacement mapping approach to osgTerrain databases.
Requires shader files place in OpenSceneGraph-Data/shaders from OpenSceneGraph-Data's svn/trunk to function.

Run osgterrain example with --shader command line option to select displacement mapping shader approach.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14458 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 15:08:44 +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
4c1fd06252 Added osg::SyncSwapBuffersCallback to include/osg/GraphicsContext and support for enabling it to include/osg/DisplaySettings, and to the Viewer/CompositeViewer::realize() methods.
To enable the sync of swap buffers set the env var OSG_SYNC_SWAP_BUFFERS to ON or 1, to switch off set to OFF or 0.

One can also use the --sync command line option for application that pass on command line options to the osg::DisplaySettings::instance().


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14456 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 14:46:12 +00:00
Robert Osfield
fec06828cf Removed checks against Drawable as these are no longer required.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14455 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 08:27:28 +00:00
Robert Osfield
68c4eaaff1 Added support for writing the file path of a script to the lua package.path to help with loading scripts within lua.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14451 16af8721-9629-0410-8352-f15c8da7e697
2014-09-17 17:40:07 +00:00
Robert Osfield
acbad2424e Changed osgvolume example to use the new tf plugin rather than having local code for reading transfer function
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14450 16af8721-9629-0410-8352-f15c8da7e697
2014-09-16 17:40:13 +00:00
Robert Osfield
f3ba656303 Added write support
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14449 16af8721-9629-0410-8352-f15c8da7e697
2014-09-16 11:00:01 +00:00
Robert Osfield
e35b0796d6 Added .tf & .tf-255 plugin for reading ascii 1D transfer functon files in support for volume rendering.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14448 16af8721-9629-0410-8352-f15c8da7e697
2014-09-15 17:53:44 +00:00
Robert Osfield
e97059df78 Added basic frame rendering for TabWidget
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14446 16af8721-9629-0410-8352-f15c8da7e697
2014-09-12 14:16:08 +00:00
Robert Osfield
e3a3ae6de6 Improved the alignment and sizing of TabWidget tab headers
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14445 16af8721-9629-0410-8352-f15c8da7e697
2014-09-10 17:03:27 +00:00
Robert Osfield
fafe06acbf Implemented the selection of tabs by clicking, using mouse wheel or arrow keys.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14443 16af8721-9629-0410-8352-f15c8da7e697
2014-09-10 11:59:51 +00:00
Robert Osfield
6b82d4099f Improved the handling of the dialog title text
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14442 16af8721-9629-0410-8352-f15c8da7e697
2014-09-09 16:12:59 +00:00
Robert Osfield
57a42aac39 Moved the diaglog title bar widgets into the Widget::GraphicsSubgraph map to avoid them poluting the Dialog's children list and to prevent them from being serialized.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14441 16af8721-9629-0410-8352-f15c8da7e697
2014-09-09 15:14:35 +00:00
Robert Osfield
e93e7ca1f2 Introduced Widget::WidgetStateSet to help localize the StateSet set up by Widget implementations from being serialized or
affecting what end users apply via the standard Node::s/getStateSet().

Further work on TabWidget.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14440 16af8721-9629-0410-8352-f15c8da7e697
2014-09-09 13:37:33 +00:00
Robert Osfield
0db0bcdd5e Build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14439 16af8721-9629-0410-8352-f15c8da7e697
2014-09-08 08:53:23 +00:00
Robert Osfield
23b8131ae5 Added shell of new osgUI::TabWidget class
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14438 16af8721-9629-0410-8352-f15c8da7e697
2014-09-05 16:04:11 +00:00
Robert Osfield
9e9fe9b9c9 Introduced support for specifying whether a serializer supports different types of usage - one or more of READ_WRITE_PROPERTY, GET_PROPERTY and SET_PROPERTY.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14437 16af8721-9629-0410-8352-f15c8da7e697
2014-09-05 11:05:43 +00:00
Robert Osfield
21fc2fae8d Added setting of the IsoSurfaceProperty in VolumeSettings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14436 16af8721-9629-0410-8352-f15c8da7e697
2014-09-03 15:54:47 +00:00
Robert Osfield
4f6dbf5623 Added close button on Dialog title bar
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14435 16af8721-9629-0410-8352-f15c8da7e697
2014-09-03 12:28:04 +00:00
Robert Osfield
1e9722601c Refactored the handling of ComboBox item picking to make it faster and more reliable
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14433 16af8721-9629-0410-8352-f15c8da7e697
2014-09-02 17:01:44 +00:00
Robert Osfield
959d78f755 Improved handling of ComboBox popup toggling
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14432 16af8721-9629-0410-8352-f15c8da7e697
2014-09-02 10:00:33 +00:00
Robert Osfield
30f4568f7b Added support for scaling widgets via the scoll wheel.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14431 16af8721-9629-0410-8352-f15c8da7e697
2014-09-02 09:14:08 +00:00
Robert Osfield
90c787a56a Removed debugging message
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14430 16af8721-9629-0410-8352-f15c8da7e697
2014-09-02 08:41:31 +00:00
Robert Osfield
5633fa1247 Added DragCallback class to help dialog dragging support.
Introduced a new Widget::computeExtentsPositionInLocalCoordinates() method that intersects with a ray through mouse pointer and the extents of the widget.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14429 16af8721-9629-0410-8352-f15c8da7e697
2014-09-01 19:13:35 +00:00
Robert Osfield
baf139c75b Improved support for controlling the ShadingModel via the VolumeSettings object
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14428 16af8721-9629-0410-8352-f15c8da7e697
2014-08-28 15:11:29 +00:00
Robert Osfield
d97081fe7f Improved handling of VolumeSettings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14427 16af8721-9629-0410-8352-f15c8da7e697
2014-08-28 09:42:01 +00:00
Robert Osfield
2f10db8f11 Changed the osgUI behaviour so that events are set to be handled by Widgets that have focus even if they don't directly use them.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14425 16af8721-9629-0410-8352-f15c8da7e697
2014-08-27 15:08:48 +00:00
Robert Osfield
77c0f5f675 Changed the NodeVisitor::apply(Drawable&) to call apply(Node&)
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14424 16af8721-9629-0410-8352-f15c8da7e697
2014-08-27 15:07:47 +00:00
Robert Osfield
f6cc4440a1 Added support for getting osgVolumre::Property::ModifieCount
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14422 16af8721-9629-0410-8352-f15c8da7e697
2014-08-27 09:25:54 +00:00
Robert Osfield
d1bf811331 Added Property::getModifiedCount() + dirty() to help with tracking changes. Added VolumeSettings serializers for Property objects
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14421 16af8721-9629-0410-8352-f15c8da7e697
2014-08-25 16:56:47 +00:00
Robert Osfield
6126379362 Changed StateSet::ParentList from vector<Object*> to vector<Node*> to reflect that Drawable is now a Node.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14420 16af8721-9629-0410-8352-f15c8da7e697
2014-08-25 13:43:11 +00:00
Robert Osfield
beeda386ef Improved handling of setting of the depth of the UI.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14418 16af8721-9629-0410-8352-f15c8da7e697
2014-08-22 19:00:53 +00:00
Robert Osfield
d4260ddb18 Reordered method implemenations to make it easier to compare similar methods
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14417 16af8721-9629-0410-8352-f15c8da7e697
2014-08-20 14:15:36 +00:00
Robert Osfield
a53e73ba10 Added toggling on/off of the VolumeSettings ui via the 'E' key.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14416 16af8721-9629-0410-8352-f15c8da7e697
2014-08-19 16:58:02 +00:00
Robert Osfield
e3c445a52f Updated VolumeSettings.lua reference to use ui prefix to work with the new OpenSceneGraph-Data/ui/VolumeSettings.lua file.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14415 16af8721-9629-0410-8352-f15c8da7e697
2014-08-19 16:37:20 +00:00
Robert Osfield
7e4b41e41a Fixed MD2 danglng pointer crash.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14413 16af8721-9629-0410-8352-f15c8da7e697
2014-08-19 09:27:46 +00:00
Robert Osfield
2032be209a Fixed build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14411 16af8721-9629-0410-8352-f15c8da7e697
2014-08-19 09:00:42 +00:00
Robert Osfield
818e1393ec Fixed build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14410 16af8721-9629-0410-8352-f15c8da7e697
2014-08-19 08:57:23 +00:00
Robert Osfield
f28d460caa Added support for ComboBox::currentIndexChanged*(uint) callback API.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14409 16af8721-9629-0410-8352-f15c8da7e697
2014-08-14 19:00:37 +00:00
Robert Osfield
5f74fdc326 Resert default value to 1.0
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14408 16af8721-9629-0410-8352-f15c8da7e697
2014-08-13 09:24:38 +00:00
Robert Osfield
f0125da6fd From Ryan Kawicki, "There is an issue where the model insets of a terrex terrain are being removed during the loading process. The issue is described below.
- the issue here is that the plugin is removing group nodes if
      that group node only has one child.  becuase transforms are also
      group nodes, there were cases when the transform would have only
      one child under it and would cause it to remove the translation
      portion.  this would cause all the vertex data to be loaded around
      the last matrix operation, which in our case was the origin (0,0,0).

We work off of OSG 2.8.1 but see that this has not been addressed on latest yet.  I’ve tested this against 2.8.1 and have cleanly applied it to my local repository off of latest."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14407 16af8721-9629-0410-8352-f15c8da7e697
2014-08-08 16:42:32 +00:00
Robert Osfield
af5685bf28 From Tim George, "Currently there is a problem with using a camera with a viewport with a non 0 offset and also using an FBO. The problem is that only area made up of the viewports width and height is drawn based on an offset of 0,0 instead of using the viewports offset.
It is caused by line 991 in RenderStage.cpp:


Code:
fbo_ext->glBlitFramebuffer(
0, 0, static_cast<GLint>(_viewport->width()), static_cast<GLint>(_viewport->height()),
0, 0, static_cast<GLint>(_viewport->width()), static_cast<GLint>(_viewport->height()),
blitMask, GL_NEAREST);



which is not taking into account the viewport x and y when performing the blit. It probably should be:


Code:
fbo_ext->glBlitFramebuffer(
static_cast<GLint>(_viewport->x()), static_cast<GLint>(_viewport->y()),
static_cast<GLint>(_viewport->width()) + static_cast<GLint>(_viewport->x()), static_cast<GLint>(_viewport->height()) + static_cast<GLint>(_viewport->y()),
static_cast<GLint>(_viewport->x()), static_cast<GLint>(_viewport->y()),
static_cast<GLint>(_viewport->width()) + static_cast<GLint>(_viewport->x()), static_cast<GLint>(_viewport->height()) + static_cast<GLint>(_viewport->y()),
blitMask, GL_NEAREST);
"

Note from Robert Osfield, made small tweak to above on merge, changing the width+x to x+width to make it read more naturally.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14405 16af8721-9629-0410-8352-f15c8da7e697
2014-08-08 16:34:12 +00:00
Robert Osfield
89786dd42a From Marc Helbling, "please find a fix for the vertex pretransform visitor (VertexAccessOrderVisitor).
The issue with current code is that arrays are collected *before* duplicating shared arrays which leads to arrays that are correctly duplicated but that are not reordered.

Also the submitted patch contains a small cleaning in GeometryArrayGathrer as the _useDrawElements variable is not used; it is only set in the GeometryArrayGathrer constructor and VertexAccessOrderVisitor already checks that primitives have indexed type."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14403 16af8721-9629-0410-8352-f15c8da7e697
2014-08-08 16:09:39 +00:00
Robert Osfield
973ac76197 From Glen Waldron, "Node: patch for remove*Callback() methods to resolve a crash"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14401 16af8721-9629-0410-8352-f15c8da7e697
2014-08-08 15:45:54 +00:00
Robert Osfield
99cbab1806 Changes to support building against ANDROID under OSX.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14399 16af8721-9629-0410-8352-f15c8da7e697
2014-08-08 09:28:26 +00:00
Robert Osfield
fdd9efe45a Implemented osgUI::Validator, IntValidator and DoubleValidator classes that manage validation/specialization of LineEdit widgets to work with just integer or double values.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14398 16af8721-9629-0410-8352-f15c8da7e697
2014-08-05 18:32:45 +00:00
Robert Osfield
0335e9c63a Implemented callbacks for validate(), textChanged() and returnPressed()
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14397 16af8721-9629-0410-8352-f15c8da7e697
2014-08-01 13:07:38 +00:00
Robert Osfield
ff78d30cee Moved responsiblity for checking current event focus onto Widget::handleImplementations().
Added support for closing CombinBox popup when the mouse is clicked outside the popup or combobox widget.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14396 16af8721-9629-0410-8352-f15c8da7e697
2014-08-01 10:57:24 +00:00
Robert Osfield
e979f76156 Added NodeVisitor::INTERSECTION_VISITOR VisitorType
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14395 16af8721-9629-0410-8352-f15c8da7e697
2014-07-31 18:29:31 +00:00
Robert Osfield
899e359cdb Fixed rendering of Popups
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14394 16af8721-9629-0410-8352-f15c8da7e697
2014-07-30 12:48:28 +00:00
Robert Osfield
cbfcac6f63 Update SO version to account for new changes to osg::StateSet and osgUI
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14393 16af8721-9629-0410-8352-f15c8da7e697
2014-07-30 12:47:45 +00:00
Robert Osfield
0bdd7351f6 Added StateSet::RenderBinMode::PROTECTED_RENDERBIN_DETAILS and OVERRIDE_PROTECTED_RENDERBIN_DETAILS options.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14392 16af8721-9629-0410-8352-f15c8da7e697
2014-07-30 12:47:16 +00:00
Robert Osfield
46440ad0a8 Added preliminary icon to ComboBox.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14391 16af8721-9629-0410-8352-f15c8da7e697
2014-07-29 15:50:55 +00:00
Robert Osfield
a3794f3bd3 Fixed debug comment
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14390 16af8721-9629-0410-8352-f15c8da7e697
2014-07-29 15:50:37 +00:00
Robert Osfield
90e58f66c0 Implemented prelimary icon support allowing UI widget to place image and model based icons on widgets
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14389 16af8721-9629-0410-8352-f15c8da7e697
2014-07-29 15:50:07 +00:00
Robert Osfield
839dbb1bc1 Added catch for NULL Transform pointers getting into the _transformMap.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14388 16af8721-9629-0410-8352-f15c8da7e697
2014-07-29 15:47:55 +00:00
Robert Osfield
e65d03bf27 Added handling of Drawables added directly to scene graph without Geode decorating them.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14386 16af8721-9629-0410-8352-f15c8da7e697
2014-07-28 16:19:44 +00:00
Robert Osfield
23ae292fe2 Added support for changing background colour of LineEdit widget when focus changes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14385 16af8721-9629-0410-8352-f15c8da7e697
2014-07-24 14:14:35 +00:00
Robert Osfield
cbd2d6e434 Refined the colouring of widget to be more in sync with the defaults used in Qt.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14384 16af8721-9629-0410-8352-f15c8da7e697
2014-07-24 13:25:49 +00:00
Robert Osfield
3a7942dfb7 Added VolumeSettings::Filename property.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14383 16af8721-9629-0410-8352-f15c8da7e697
2014-07-23 16:36:17 +00:00
Robert Osfield
aa2c9c152f Changed the default text colour to black
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14382 16af8721-9629-0410-8352-f15c8da7e697
2014-07-23 15:57:35 +00:00
Robert Osfield
900534f86e Added writeFile support
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14381 16af8721-9629-0410-8352-f15c8da7e697
2014-07-23 14:50:42 +00:00
Robert Osfield
5130361d65 Added Node:getNumParents() and Node:getParent(index) support
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14380 16af8721-9629-0410-8352-f15c8da7e697
2014-07-23 10:49:27 +00:00
Robert Osfield
7dc3b34bfd Removed State::AppliedProgramObjectSet container and Obsever usage from osg::State to address threading bug crash.
The State::AppliedProgramObjectSet wasn't ever being used actively in the current rev of the OSG so populating and clearing was no longer neccessary, allowing the code to be removed completely.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14377 16af8721-9629-0410-8352-f15c8da7e697
2014-07-22 16:02:33 +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
d3945d5210 From Pjotr Svetachov, "I think I spotted some unneeded ref_ptrs in the cullvisitor. The call
pushModelViewMatrix or pushProjectionMatrix will already keep the
reference when adding it to the MatrixStack. In CullVisitor::apply
methods for the billboard and the camera you already take a pointer
instead of a ref_ptr."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14375 16af8721-9629-0410-8352-f15c8da7e697
2014-07-21 14:32:40 +00:00
Robert Osfield
6bb2251faf Added setting of glPixelStore before glTexSubImage2D call.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14374 16af8721-9629-0410-8352-f15c8da7e697
2014-07-21 13:45:58 +00:00
Robert Osfield
8f39d7a2b2 From Jaap Gas, "I want to submit a bugfix for a crash occurring in osgText/Glyph.cpp if
the scene tree contains (large) 2D textures from images with STRIDE.

============================================================================
#0  0x00007fffe8ea4350 in __memmove_ssse3 () from /lib64/libc.so.6
#1  0x00007fffe52ced76 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#2  0x00007fffe52d8e86 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#3  0x00007fffe53dd8be in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#4  0x00007fffe53c2643 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#5  0x00007fffe53c7fdd in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#6  0x00007fffe53cbabf in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#7  0x00007fffe53cc1fa in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#8  0x00007ffff30092fd in osgText::GlyphTexture::apply (this=0x1bb8cf0, state=
    ...)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/src/osgText/Glyph.cpp:234
#9  0x00007ffff56c30b6 in osg::State::applyAttributeOnTexUnit (this=0x125f180,
    unit=0, attribute=0x1bb8cf0, as=...)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:1713
#10 0x00007ffff56c2f3f in osg::State::applyTextureAttribute (this=0x125f180,
    unit=0, attribute=0x1bb8cf0)
    at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:411
#11 0x00007ffff30204da in osgText::Text::drawTextWithBackdrop (this=0x1baed70,
    state=..., colorMultiplier=...)
==============================================================================

The crash disappears if I either (1) disable the use of images with stride
in the (public) osgGeo-library, or (2) add the following bugfix to Glyph.cpp.
This combination gives me the confidence that I understand where this problem
originates from, without trying to understand the full OpenGL details.

===============================================================================
@@ -221,7 +223,12 @@
             imageData[i] = 0;
         }

+        glPixelStorei(GL_UNPACK_ALIGNMENT,1);

+        #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
+        glPixelStorei(GL_UNPACK_ROW_LENGTH,getTextureWidth());
+        #endif
+
         // allocate the texture memory.
         glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA,
                 getTextureWidth(), getTextureHeight(), 0,
================================================================================

I have copied (and adapted) the added lines above from the same source file,
where they were used in front of a similar call to glTexSubImage2D(.) around
line 515.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14372 16af8721-9629-0410-8352-f15c8da7e697
2014-07-21 13:43:11 +00:00
Robert Osfield
20560bd927 Initial work on integtasting osgUI into Present3D
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14370 16af8721-9629-0410-8352-f15c8da7e697
2014-07-21 12:21:42 +00:00
Robert Osfield
93938439d9 Fixed indentation
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14369 16af8721-9629-0410-8352-f15c8da7e697
2014-07-21 12:18:43 +00:00
Robert Osfield
0f611144d7 Added debug messages
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14368 16af8721-9629-0410-8352-f15c8da7e697
2014-07-21 09:35:00 +00:00
Robert Osfield
acb497b2ab Added serailizer support for NodeVisitor, UpdateVisitor, CullVisitor and EventVisitor
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14367 16af8721-9629-0410-8352-f15c8da7e697
2014-07-18 17:17:01 +00:00
Robert Osfield
50e63ad3ee Added readScript/writeScript methods to ReaderWriter
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14366 16af8721-9629-0410-8352-f15c8da7e697
2014-07-14 15:59:06 +00:00
Robert Osfield
5a7a20d01e Renamed osgDB::PropertyInterface to osgDB::ClassInterface to better reflect it's functionality
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14365 16af8721-9629-0410-8352-f15c8da7e697
2014-07-14 14:09:08 +00:00
Robert Osfield
f2d11bb46e Added preliminary support for writing VolumeSettings to disk from within Present3D in response to pressing and releasing 'Ctrl-S'.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14363 16af8721-9629-0410-8352-f15c8da7e697
2014-07-04 16:45:05 +00:00
Robert Osfield
70f9bdc6e1 Updated iso and mip shaders from OpenSceneGraph-Data.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14358 16af8721-9629-0410-8352-f15c8da7e697
2014-07-03 16:36:02 +00:00
Robert Osfield
d981ca416e Added virtual destructors
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14351 16af8721-9629-0410-8352-f15c8da7e697
2014-07-03 13:06:23 +00:00
Robert Osfield
3f637584f5 Fixed line endings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14350 16af8721-9629-0410-8352-f15c8da7e697
2014-07-03 13:05:09 +00:00
Robert Osfield
7a18876c5b Changed enum usage to use the new osgVolume::VolumeSettings versions and added support for reading a VolumeSettings file.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14349 16af8721-9629-0410-8352-f15c8da7e697
2014-07-03 13:01:05 +00:00
Robert Osfield
3c6a1ec117 Refactor VolumeSettings so that it's subclassed from osgVolume::Property
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14348 16af8721-9629-0410-8352-f15c8da7e697
2014-07-03 10:01:46 +00:00
Robert Osfield
c4f199d1b5 Added osgVolume::VolumeSettings object
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14347 16af8721-9629-0410-8352-f15c8da7e697
2014-07-02 16:26:18 +00:00
Robert Osfield
b8dbebeca7 Changed the default image output format to .osgb as .dds isn't able to represent signed byte, short and int data correctly.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14346 16af8721-9629-0410-8352-f15c8da7e697
2014-07-02 15:34:37 +00:00
Robert Osfield
7bacd73e85 fixed handlng of file type of nested files within a .osgx, .osgt and .osgb file.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14344 16af8721-9629-0410-8352-f15c8da7e697
2014-07-02 14:14:53 +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
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
43a068b156 Add dds no flip on write option to prevent output of .dds volume from being flipped by the dds plugin.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14339 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 15:31:36 +00:00
Robert Osfield
45bea0db4b REmoved debug cout
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14338 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 13:24:41 +00:00
Robert Osfield
bb8b1538c7 From Mikhail Izmestev, "Attached fix to avoid vector reallocs on push_back in StateGraph::moveStateGraph."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14334 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 10:13:19 +00:00
Robert Osfield
147c5e183f Updated ChangeLog and AUTHORS file
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14332 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 09:12:14 +00:00
Robert Osfield
9d5a510441 Updated version number
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14331 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 08:56:08 +00:00
Robert Osfield
5fb078b4f1 From Pjotr Svetachov, "Here is a small fix for a overflow when editing large 3d volume data."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14329 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 08:46:54 +00:00
Robert Osfield
1581699022 Removed space from #include.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14326 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 08:20:30 +00:00
Robert Osfield
4c18eb62ca From Alexander Sinditskiy, build fix to allow building against versions older than librsvg-2.36.2
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14323 16af8721-9629-0410-8352-f15c8da7e697
2014-06-30 07:37:06 +00:00
Robert Osfield
7a14b224ed Replaced using NodeCallback::run with explict run() implementation.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14322 16af8721-9629-0410-8352-f15c8da7e697
2014-06-28 06:22:47 +00:00
Robert Osfield
555c935ffd From Pjotr Svetachov, "I made a small change to DataOutputStream.cpp which makes saving Geodes possible again. This is only half a fix as it only will save a Drawable that is part of a Geode. But this change does not require a version bump of the .ive format. I tried it with a few datasets we have here with the 3.2 stable branch and the trunk with this patch and there was no difference in the .ive files that were produced."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14319 16af8721-9629-0410-8352-f15c8da7e697
2014-06-27 15:57:34 +00:00
Robert Osfield
1d4fbbce1f Removed unused method.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14318 16af8721-9629-0410-8352-f15c8da7e697
2014-06-27 15:55:05 +00:00
Robert Osfield
e9728042b9 From Laurens Voerman, "attached is a modified version of src/osgUtil/Tessellator.cpp
current code checks for a Nullpointer and on notify level info or above will inform you with a crash, by dereferencing it."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14315 16af8721-9629-0410-8352-f15c8da7e697
2014-06-27 15:48:38 +00:00
Robert Osfield
23ae2acf73 Updated AUTHORS file
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14313 16af8721-9629-0410-8352-f15c8da7e697
2014-06-27 15:39:05 +00:00
Robert Osfield
f42ac7e15b Added an OSG_INIT_SINGLETON_PROXY to make sure that the ApplicationUsage singleton gets intialized before usage.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14312 16af8721-9629-0410-8352-f15c8da7e697
2014-06-27 15:38:52 +00:00
Robert Osfield
32e0e21013 Updated AUTHORS file
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14310 16af8721-9629-0410-8352-f15c8da7e697
2014-06-27 15:36:47 +00:00
Robert Osfield
8d6bee6da9 Added a render order sort to the list of Cameras being tested by the *Viewer::generatePointerData(..) method to ensure that the highest Camera gets focus.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14309 16af8721-9629-0410-8352-f15c8da7e697
2014-06-27 15:30:56 +00:00
Robert Osfield
d994e84288 Update ChangeLog for dev release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14306 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 15:54:47 +00:00
Robert Osfield
92d684de6b Revised KdTreeBuilder so that is used the new apply(osg::Geometry&) method rather than expanding an osg::Geode.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14303 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 14:16:11 +00:00
Robert Osfield
a21ce3469b From Sebastian Messerschmidt, "I've applied a simple fix for the backward animation support in osg::Sequence.
It will simply use the sign of the speed set in the getNextValue. Attached file is against trunk."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14302 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 11:49:59 +00:00
Robert Osfield
67f98edc05 From Lauren Voerman, "In order to speed up loading large scenes (especially from network disk) I added code to our viewer to setup multiple database-pagers and request the files trough a database-request:
databasePager->setUpThreads(16, 1);

We experienced problems with multiple databasepagers loading files in parallel, when two threads start to load the same file (usually a texture referenced by multiple models). The second thread to add the file to the cache (sometimes) manages to do so while the refcount from the cached object still is zero, causing the object loaded to be destroyed.
Sometimes the second thread manages to ref() the object before Referenced::signalObserversAndDelete does the final recount check, causing a warning:
    "Warning Referenced::signalObserversAndDelete(,,) doing delete with _refCount=1"

With a deleted object added to the scenegraph we get some undesired results, I think the program only crashes if the object was a Node, and just has some untextured surfaces if it was a texture, but I'm not completely sure.

Attached is a modified version of the Registry.cpp, returning the object in cache and let the duplicate loaded object to be destroyed.

A more efficient option would be to add some sort of blocking entry to the objectcache to stop the second thread from reading the file, and just wait until the first thread added it to the cache. If you think that's worthwile we would be happy to implement that version. A bit tricky to implement and test, that's why I submit a simple version that stops my program from crashing."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14300 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 11:11:59 +00:00
Robert Osfield
93cf84da3e Removed erroneous character
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14298 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 11:09:46 +00:00
Robert Osfield
febcb25cb6 From Farshid Lashkari,
"I noticed that Text3D objects would change there z alignment depending on the alignment mode. I'm not sure if this was intentional or just a simple mistake. My expectation was that the front of the object would always stay aligned to the 0 z-plane, regardless of the alignment mode. I've attached an updated version that retains a consistent z-alignment."
"I just now noticed another issue with Text3D objects. It was not properly computing the bounding box when non-axis aligned rotations were being applied. In this case all corners of the bounding box need to be transformed in order to get the correct containing box. I've attached the updated file."
"The incorrect bounding box problem also applies to regular Text objects. I've attached the fix for that as well as the original Text3D fix."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14296 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 10:53:18 +00:00
Robert Osfield
138ea0e0c7 From Pjotr Svetachov, "For a scene with a lot of animated agents I did some small
optimizations to reduce cpu overhead:
1) Avoid a load-hit-store in UpdateBone. b->getMatrixInBoneSpace()
returns the same matrix that was just stored with b->setMatrix()
2) Avoid calling element->isIdentity() for the whole transform stack
(can be expensive is element is a matrix)
3) Make the key frame interpolator use binary search instead of a
linear one. This is very noticeable in scenes where some geometry has
long repeating animations that start at the same time, you will see
the update time grow then reset and grow again."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14294 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 10:45:07 +00:00
Robert Osfield
ed314c6d7d From Laurens Voerman, "while debugging ImageSequence I had a crash, due to the very large frametimes caused by halting the program. The problem is that when the frame time exceeds the length of the entire image sequence, a looping sequence will try to read it's _imageDataList beyond its size.
fix attached for  src/osg/ImageSequence.cpp"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14293 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 10:24:41 +00:00
Robert Osfield
d82131544b From Laurens Voerman, "while testing databasepager stuff I noticed that the various loaders (osg/ive/osgx) do not pass the current options to the imagePager, therefore the images cannot be found if not in the global OSG_FILE_PATH. Attached is a fix, containing modified versions of
From Robert Osfield, add check to only apply Options object when a valid Option object is assigned.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14290 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 10:05:53 +00:00
Robert Osfield
d939adeb56 From Farshid Lashkari, "I've attached a small fix for the ply loader to support Windows style line endings when reading the header."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14288 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 09:38:56 +00:00
Robert Osfield
2428e07f35 From Aurelien Albert, "This submission fix all my problems with reading / writing "osgb" files inside "osga" archive with final archive size > 2 Go, with Windows OS (didn't tested with Linux)"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14287 16af8721-9629-0410-8352-f15c8da7e697
2014-06-26 09:33:56 +00:00
Robert Osfield
86ddbc7ad9 From Riccardo Corsi, "there's an inconsistency between the behavior of the method and the
debug message it prints out on the console.

Around line 1040 of Registry.cpp (see code below) the method returns
"simpleFileName" but prints about returning "filename".

In attachment the modified file, based on osg 3.2.0
ricky


<code>
if(fileExists(simpleFileName))
{
    OSG_DEBUG << "FindFileInPath(" << filename << "): returning " <<
filename << std::endl;
    return simpleFileName;
}
</code>
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14285 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 16:05:56 +00:00
Robert Osfield
aac0a5fbe2 From Auelien Albert, "I'm working on an application which use 3ds file format as input and use the name of the material to "map" specific data with 3d geometry.
The osg 3ds plugin modify the exported materials name in the same way it modifies the node names.

I've added an option to preserve originals materials names, with the assurance of unique material names are preserved."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14283 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 15:55:21 +00:00
Robert Osfield
a2db511c99 Refactored the way that hole are pruned from the occluder hole list.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14282 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 15:47:59 +00:00
Robert Osfield
1674692840 From Laurens Voerman, "a minor patch for osgconv to make sure the helptext is printed if you run "osgconv -h" with OSG_NOTIFY_LEVEL set too low.
applys to both trunk and stable branch."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14280 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 11:07:59 +00:00
Robert Osfield
5c488d4c46 From Mikhail Izmestev, "Attached fix to avoid vector usage in StateGraph::prune and reduce heap allocations."
Notes from Robert Osfield, ammended the erase so that it explictly increments the iterator before the erase call.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14277 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 10:45:18 +00:00
Robert Osfield
4e530a1938 changed debug message to use OSG_DEBUG
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14276 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 09:58:49 +00:00
Robert Osfield
d22f62396c From Alexander Sinditskiy, "My changes added support for gltexstorrage2d for texture2d.
Initially I described issue in message:
http://forum.openscenegraph.org/viewtopic.php?t=13820
It solves issue with compiling texture using ico from image with mipmaps

I added enviroment variable OSG_GL_TEXTURE_STORAGE_ENABLE to control usage of glTexStorage2d. Initially it is disabled.

It used only if image have mipmaps.

Another issue is converting from internalFormat + type to sized internal format. I created sizedInternalFormats[] struct where sized internal formats are ordered from worse->best.
also this struct have commented lines. Commented formats are listed in
http://www.opengl.org/wiki/GLAPI/glTexStorage2D
but looks like not using in osg."

Note from Robert Osfield.  Changed the env var control to OSG_GL_TEXTURE_STORAGE and made it's value true by default when the feature is supported by the OpenGL driver.  To disable to
use of glTexStorage2D use OSG_GL_TEXTURE_STORAGE="OFF" or "DISABLE"



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14275 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 09:57:36 +00:00
Robert Osfield
71f7a74091 From Björn Blissing, "I found a minor error in documentation in include/osg/Math.
Function: absolute() had the same description as the function minimum()

I removed the erroneous text."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14273 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 08:21:13 +00:00
Robert Osfield
81c23564b5 From Björn Blissing, "Fix to support correct shininess and transparency in FBX plugin"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14272 16af8721-9629-0410-8352-f15c8da7e697
2014-06-25 08:18:05 +00:00
Robert Osfield
82a34a2546 From Pjotr Svetachov, "There were some modes missing when exporting to .ogst so I added them."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14269 16af8721-9629-0410-8352-f15c8da7e697
2014-06-24 19:57:19 +00:00
Robert Osfield
bd82d2a52d From Farshid Lashkari, "I've attached a small for the osg ReaderWriter. It was performing a case sensitive comparison to the file extension to determine whether to write the file in ascii or binary. This meant that if the filename was "model.OSGT" it would be treated as binary, instead of ascii. I've updated the plugin to ignore case."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14267 16af8721-9629-0410-8352-f15c8da7e697
2014-06-24 14:58:13 +00:00
Robert Osfield
7295258d71 Merged fix to merge geometries.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14265 16af8721-9629-0410-8352-f15c8da7e697
2014-06-24 11:24:13 +00:00
Robert Osfield
4ec4e88f85 Fixed nested callback calling.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14264 16af8721-9629-0410-8352-f15c8da7e697
2014-06-23 12:02:41 +00:00
Robert Osfield
c6ab14018a Fixed check against totaly number of vertices
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14262 16af8721-9629-0410-8352-f15c8da7e697
2014-06-16 16:16:10 +00:00
Robert Osfield
8d06b9b019 From Aurelien Albert, "I've got some issues using osgb files within an big osga archive (file size > 2Go).
Issue is described here : http://forum.openscenegraph.org/viewtopic.php?t=13914

Here is a fix, using "std::streampos" standard type for stream positions up to 64bits.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14261 16af8721-9629-0410-8352-f15c8da7e697
2014-06-16 08:54:54 +00:00
Robert Osfield
9195a0000b Added osgUI::ColorPalette class
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14259 16af8721-9629-0410-8352-f15c8da7e697
2014-06-13 17:17:09 +00:00
Robert Osfield
3a18699074 Fixed typo in parameter name
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14258 16af8721-9629-0410-8352-f15c8da7e697
2014-06-13 17:16:51 +00:00
Robert Osfield
d9a6491a43 Removed generation of scroll event on the X11 button release event as X11 was generating both a pair of press/release events for a single scroll when movement.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14257 16af8721-9629-0410-8352-f15c8da7e697
2014-06-12 16:00:21 +00:00
Robert Osfield
be13c2202d Added if () blocks to State::convertVertexShaderSourceToOsgBuiltIns() to ensure that only parts of the shader than need replacing are replaced.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14255 16af8721-9629-0410-8352-f15c8da7e697
2014-06-12 15:24:34 +00:00
Robert Osfield
410f7d27ed Improved positioning of combo box popup items
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14253 16af8721-9629-0410-8352-f15c8da7e697
2014-06-12 14:12:30 +00:00
Robert Osfield
63d101b653 Added frame support to ComboBox.
Improved the alingment support for text


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14252 16af8721-9629-0410-8352-f15c8da7e697
2014-06-12 14:05:28 +00:00
Robert Osfield
584035b663 Added handling of AligmentSettings of Text layout
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14251 16af8721-9629-0410-8352-f15c8da7e697
2014-06-11 16:31:17 +00:00
Robert Osfield
86a9a45525 Implemented more robust intersection handling for mouse interactions. Wired up even handling of ComboBox popup.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14250 16af8721-9629-0410-8352-f15c8da7e697
2014-06-11 10:55:33 +00:00
Robert Osfield
89ca694684 Added using Callback::run() method to Drawable::CullCallback
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14249 16af8721-9629-0410-8352-f15c8da7e697
2014-06-10 08:50:42 +00:00
Robert Osfield
d234262585 Fixed handling of Drawable callbacks and NumChildrenRequiringEventTraversal
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14248 16af8721-9629-0410-8352-f15c8da7e697
2014-06-09 13:46:44 +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
1c699a3664 Added using NodeCallback::run() to avoid warnings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14246 16af8721-9629-0410-8352-f15c8da7e697
2014-06-06 09:12:43 +00:00
Robert Osfield
d7b99b9062 Added missing OSG_EXPORT
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14245 16af8721-9629-0410-8352-f15c8da7e697
2014-06-06 09:01:25 +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
35d6cb812f Updated shaders from OpenSceneGraph-Data sources 2014-06-04 08:59:31 +00:00
Robert Osfield
6ea4f4a939 From Pjotr Sventachov and Robert Osfield, added callback unit test to osgcallback example, to use test run osgcallback --test, if everything is functioning then test1 to test7 messages should be reported to the console. 2014-06-03 15:05:51 +00:00
Robert Osfield
333a16a88d Reverted change of Node::ParentList from being a vector<Node*> back to a vector<Group*> 2014-06-03 09:52:55 +00:00
Robert Osfield
3dde165f14 Refactor osg::Geode to subclass from osg::Group and reuse the NodeList children container 2014-06-03 09:23:24 +00:00
Robert Osfield
2d41cbd0cf Removed OSG_USE_BOUND and associated osg::Bound adapter class to avoid problems with BoundingBox::expandBy/expandByRadius() implementation choosing a null BoundingBox from
the osg::Bound class causing crashes.
2014-06-02 16:20:39 +00:00
Robert Osfield
e1ec4ec67f From Roni Zanolli, build fix for iPhone 2014-06-02 08:13:39 +00:00
Robert Osfield
199506296a Implemented basic frame graphic 2014-05-30 16:44:36 +00:00
Robert Osfield
189c0b3477 Futher work on ComboBox/Popup 2014-05-29 15:21:42 +00:00
Robert Osfield
a45ba05bdd Added beginnings of ComboBox popup functionality. 2014-05-29 10:51:26 +00:00
Robert Osfield
26a7c30229 Added cached Depth and ColorMask to reduce the amount of duplicate state in the osgUI subgraph 2014-05-28 10:18:57 +00:00
Robert Osfield
1fcb91900a Replaced Widget::GraphicsSubgraph with GraphicsSubgraphMap to allow finer control of when the rendering subgraphs are done. 2014-05-28 10:06:14 +00:00
Robert Osfield
6af9edf33b Improved handling of text 2014-05-27 14:14:51 +00:00
Robert Osfield
faced0a896 Removed Dialog/Popup::open/close() methods as they are replaced by the setVisible() method 2014-05-26 16:32:20 +00:00
Robert Osfield
5d635287c0 Implemented Widger::Visible and Enabled usage 2014-05-26 16:27:33 +00:00
Robert Osfield
b04a4813ba Added Visible and Enalbed properties to Widget 2014-05-26 16:15:33 +00:00
Robert Osfield
5d234ba021 Fixed missing initilaizer 2014-05-26 16:15:12 +00:00
Robert Osfield
71352ea56d Added item serializer 2014-05-26 15:58:18 +00:00
Robert Osfield
f50ec0fe8e Implemented clipping of widget to the widgets extents. 2014-05-23 18:59:16 +00:00
Robert Osfield
cca18e82e8 Implemented scheme for making sure nested widgest overdraw parent widgets graphics 2014-05-23 15:00:49 +00:00
Robert Osfield
55c2041d4d Added wrappers for open and close methods 2014-05-23 15:00:09 +00:00
Robert Osfield
bda5ec4875 Added osgUI::Widget::set/getGraphicsSubgraph() to hold the subgraph that does the rendering portion of widgets 2014-05-22 10:02:35 +00:00
Robert Osfield
0b5b3213fe Addd method implementation in serializers 2014-05-21 16:15:02 +00:00
Robert Osfield
d8adc80c2c Fixed handling of traverse 2014-05-21 10:17:31 +00:00
Robert Osfield
20fd80de3a Improved handling of callback object to open the door to use of general osg::CallbackObject as mechnisms for something simialr to Qt's signal/slot mechanism. 2014-05-21 09:45:11 +00:00
Robert Osfield
28c36d615b Added osg::runNamedCallbackObjects(..) convinience method for run all named osg::CallbackObjects attached to an osg::Object 2014-05-21 09:07:25 +00:00
Robert Osfield
9859f3110b Renamed callbacks to avoid overlap with Node callbacks 2014-05-21 09:06:17 +00:00
Robert Osfield
30b54e3af2 Moved the _boundingSphere set method into the update section of the Drawable::getBoundingBox() method
Added an UpdateVisitor::apply(Drawable&) implementation.
2014-05-20 16:09:34 +00:00
Robert Osfield
e70acf4c51 From Pjotr Svetachov, "I stumbled on a little bug with the new drawables. I was distributing points data into different drawables that I used in a LOD later. When simplifying the system to not use geodes anymore I came upon the following bug:
If Drawable::getBoundingBox would compute an invalid bounding box (if it was for example empty) it would make a bounding sphere with a infinite radius which counts as a valid sphere in osg.

Attached is a small fix."
2014-05-20 15:34:12 +00:00
Robert Osfield
8346f0ebe1 Improved the handling of updating of text 2014-05-20 08:35:39 +00:00
Robert Osfield
d917987938 Added shell of Popup class 2014-05-20 08:35:19 +00:00
Robert Osfield
e4004118db Added check against whether an event has been handled or not before actioning escape/quit. 2014-05-20 08:34:32 +00:00
Robert Osfield
4ce2e075c4 Add shell of Dialog class 2014-05-19 10:11:50 +00:00
Robert Osfield
1b34fed500 Added handling of up/down key to ComboBox 2014-05-19 09:30:36 +00:00
Robert Osfield
87fd1d38fb Added initial cut of ComboBox 2014-05-16 19:24:58 +00:00
Robert Osfield
3e00764649 Added initial shell of PushButton implementation 2014-05-16 10:38:40 +00:00
Robert Osfield
03fc0c3662 Added support for intesecting Drawable that are attached directly to the scene graph without an osg::Geode 2014-05-15 16:30:17 +00:00
Robert Osfield
5b60708e80 From Sebastian Messerschmidt, "There was some small error due to MS non-conformity handling comments correctly." 2014-05-15 14:57:28 +00:00
Robert Osfield
d8a06f827e From Pjotr Svetachov, build fixes for VisualStudio 2014-05-15 14:45:28 +00:00
Robert Osfield
85386daa25 Added osgGA dependency 2014-05-15 13:34:50 +00:00
Robert Osfield
4f199e36c9 Placed the #include<osg/Node> within #ifdef OSG_USE_BOUND to prevent unncessary inclusion of Node header when OSG_USE_BOUND is false. 2014-05-15 13:22:47 +00:00
Robert Osfield
20b9f3ff88 Added Node::asDrawable() and Node::asGeometry() methods to provide a low cost way of casting a node to Drawable and Geoemtry.
Changed the Group::computeBound() method so that it takes account of the a Drawable's BoundingBox.
2014-05-15 09:26:59 +00:00
Robert Osfield
afcf54b108 Fixed the bounding sphere computation and handling of Drawable as the root of the scene graph 2014-05-14 16:52:18 +00:00
Robert Osfield
74f91037a7 Further work on Bound class/Node::getBound() and Drawable::getBound() and usage in OSG codebase 2014-05-14 16:01:40 +00:00
Robert Osfield
ff21af2b0d Cleaned up code 2014-05-14 16:00:08 +00:00
Robert Osfield
4174d72a52 2014-05-14 10:19:43 +00:00
Robert Osfield
12a737ae02 Changed the Node::ParentList to be a list of osg::Node rather than osg::Group, and added addChild, removeChild, replaceChild virtual method to Node to enable code
to user code compile with minimal modifications to account for the new change to the Node ParentList.
2014-05-13 08:43:07 +00:00
Robert Osfield
b2c7bacfe9 From Farshid Lashkari, "As discussed, I've added the ability to handle Drawable objects within the NodeVisitor class. Here is an overview of the changes:
- Added apply(Drawable) and apply(Geometry) to NodeVisitor

- Added accept(NodeVisitor) method to Drawable/Geometry

- Added traverse(NodeVisitor) to Geode which calls accept(NodeVisitor) on all Drawables

- Updated CullVisitor to use new apply(Drawable) to handle drawables. The apply(Billboard) method still manually handles the drawables since it is depends on the billboard settings. I needed to disable the traverse within billboard to prevent duplicate traversal of drawables.

- Update other osgUtil node visitors (GLObjectsVisitor, IncrementalCompileOperation, ..) to use new apply(Drawable) method.
"
2014-05-12 12:10:35 +00:00
Robert Osfield
ead92353fe Added beginnings of new osgUI library, a replacement for osgWidget that works fully in 3D/stereo and is scriptable. 2014-05-12 11:27:54 +00:00
Robert Osfield
490b351330 Replaced obsolete __linux usage. 2014-05-06 16:38:57 +00:00
Robert Osfield
754a163cbf From Stephan Huber, "Xcode changed the default std-lib-implementation again. Now it’s GNU++98 instead of C++11. I adapted the cMakeList.txt files accordingly to add this new option so we can set it explicitly and link against 3rdparty-c++-libs." 2014-05-06 09:43:32 +00:00
Robert Osfield
eae4d51e3f From Stephan Huber, "Please revert the change to FindQuickTime.cmake as this breaks compilation for IOS and possibly OS X." 2014-05-06 08:37:39 +00:00
Robert Osfield
cf66750d7b From Farshid Lashkari, "fix for the Collada loader where it would access a null string in some cases" 2014-05-02 09:12:36 +00:00
Robert Osfield
1f33e2a2a0 From Ali Botorabi, "recently I ran into a problem with Microsoft's Appverifier while using OpenThreads on win32 platform. The Appverifier complained about an invalid thread handle during starting of a new thread. After looking closer into the problem it seemed that indeed a potential root of problem may be in the thread startup code. See the line below in Win32Thread.cpp (line number 347):
pd->tid.set( (void*)_beginthreadex(NULL,static_cast<unsigned>(pd->stackSize),ThreadPrivateActions::StartThread,static_cast<void *>(this),0,&ID));

the method "pd->tid.set" sets the thread id, however via the startup function "ThreadPrivateActions::StartThread" that thread id is used (see further down the call hierarchy the line "int status = SetThreadPriority( pd->tid.get(), prio);".

Until now I never ran into any problem in debug or release builds, though. It seems that furtunately the tid.set method was executed always before the tid.get method in the startup code. However, this may make trouble in the furture. A simple solution is the following: just replace the line above with following two lines:

    pd->tid.set( (void*)_beginthreadex(NULL,static_cast<unsigned>(pd->stackSize),ThreadPrivateActions::StartThread,static_cast<void *>(this),CREATE_SUSPENDED,&ID));
    ResumeThread(pd->tid.get());


The trick is just starting the thread in suspended mode so the StartThread function does not get executed and we can safely store the tid by pd->tid.set. Then start the Thread by calling ResumeThread."
2014-05-02 09:11:16 +00:00
Robert Osfield
35d73ea41c From Stephan Huber, fix for OSX build 2014-05-01 15:50:14 +00:00
Robert Osfield
298f1c65b6 Renamed the new include/osg/OpenGL automatically configured header file to include/osg/GL replacing the original hand built GL header 2014-04-30 13:19:22 +00:00
Robert Osfield
e16eb147a1 From Sebastian Messerschmidt, "attached is the compile/linker fix for multiple definitions of getTypeEnum when compiling the Lua with VisualStudio and potentially other compilers.
"
2014-04-30 11:51:40 +00:00
Robert Osfield
a04232a75a From Pjotr Svetachov, "have added some missing serializers for RigGeomery. Withouth them I
ran into two issues.

At first you get a bunch of warnings that osg::ComputeBoundCallback
and osg::UpdateCallback were unsupported wrapper classes when
converting fbx models with skeletal animation to osg(t/b).

The second issue was that when reading, the readers fail to read the
ComputeBoundCallback and UpdateCallback and set them to NULL which
messes up the RigGeometry.

Because a RigGeometry makes his own classes in the constructor it
might be preferable to not write them at all, because now those
classes are being made two times when reading a RigGeometry. But after
thinking about this that would place too much limits on them (you
won't be able to share or name them and save that information or make
a new inherited class from them and write that one) So I ended up
thinking the best way was to just write the files.
"
2014-04-29 15:14:39 +00:00
Robert Osfield
b6404d18c3 From Pjotr Svetachov, "Today I found a bug in the IutputStream class when saving array
attributes in vec3b format. It looks like my compiler takes the wrong
overload and outputs integers instead of characters. The problem is
that vec3b is of type signed char and that is not the same as char (
see http://stackoverflow.com/questions/436513/char-signed-char-char-unsigned-char
) and visual studio 2013 will promote it to integer when choosing an
overload.
It looks like that the InputStream class already takes care of this
issue (if it didn't it would have read everything ok and I would have
not even stumbled upon this bug. :) )"
2014-04-29 13:41:35 +00:00
Robert Osfield
fa6f5219bf From Mattias Helsing, "I finally got to fix the cmake Modules that have duplicates in later
version of cmake. See attached submission. I have tested the ones that
I compile myself (GDAL, Freetype, ZLIB) on ubuntu 12.04 with
cmake-2.8.7."
2014-04-29 12:19:21 +00:00
Robert Osfield
ecd26f9f5b From Paul Martz, "There is no standard place for gl/glcorearb.h on Windows. Previously, the only way to get OSG to build for core profile was to append an additional include directory ("/I") onto the CFLAGS variables This submission adds a FindGLCORE.cmake script so that the path to gl/glcorearb.h can be specified with a variable, GLCORE_ROOT, either in CMake or the environment.
Currently this submission is Windows-only. I don't think OSX or Linux require any help in locating gl/glcorearb.h. But if they do, this submission can be easily modified.

Files:
 - "CMakeLists.txt" is the top-level file.
 - FindGLCORE.cmake" and "OsgMacroUtils.cmake" go in CMakeModules.
"
2014-04-29 12:18:51 +00:00
Robert Osfield
2bb4e0566c From Pjotr Svetachov, "I had the osgvolume example crash on me when loading large volume
datasets due to an overflow in image.cpp after a unneeded cast from
unsigned int to int. Here is a small fix."
2014-04-28 14:58:36 +00:00
Robert Osfield
4dd3e3562f From Jason Beverage, "Here is a fix for a small race condition in osgDB::makeDirectory. It attempts to create all the directories in the given path and stops attempting to make directories when one of them fails. I've added a check to see if the failure occurred b/c the directory was created by another thread or process.
We were running into issues occasionally in osgEarth where multiple threads were writing out files like /1/2/3.jpg and /1/3/4.jpg.  Both threads would try to create the /1 directory and only one of them would succeed.  So the first thread would write out the full /1/2/3.jpg while the second thread wouldn't create the /1/3 directory b/c /1 was already created and the writing of /1/3/4.jpg would fail.
"
2014-04-28 14:57:05 +00:00
Robert Osfield
f5261b9877 Fixed type error 2014-04-28 11:53:58 +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
6a0270279c Reordered the configuiration file blocks to make it more understandable 2014-04-25 08:56:53 +00:00
Robert Osfield
3ec6938b95 From Paul Martz, fixed placement of OpenGL header so that it gets generated and placed in the build directory as per the Config file 2014-04-25 08:18:03 +00:00
Robert Osfield
7b4d7cd221 From Farshid Lashkari, "I've attached a small fix to the Collada loader which prevents a null pointer access in some cases." 2014-04-24 17:26:46 +00:00
Robert Osfield
77f1c58345 From Lionel Lagarde, "In the ::apply method, when the image data need to be re-uploaded, the Texture2DArray checks if the TextureObject can be re-used. The test was made using the constant 1 instead of the real texture depth, so the TextureObject was never re-used." 2014-04-24 17:23:16 +00:00
Robert Osfield
bc5575f83a From Kristofer Tingdahl, "I and my team have gone over the code again, and we feel that we are comfortable in our current proposal for change. It goes deeper than it did before, and I explain why:
There was code in the osgViewer/Viewer.cpp and osgViewer/CompositeViewer.cpp that transformed the Y-coordinates of an event. The code in the composite viewer did however miss the touch-data of the event. I thought that it should really be the GUIEventAdapter that should know about this, and hence I added the
GUIEventAdapter::setMouseYOrientationAndUpdateCoords which is re-computing the coordinates. First I simply added a boolean to the setMouseYOrientation function:

setMouseYOrientation( MouseYOrientation, bool updatecooreds=false );

but then the serializer complained.

This function is called from both the Viewer and the CompositeViewer. We have not tested from the viewer, but I cannot see it would not work from visual inspection.

The other change is in MultiTouchTrackballManipulator::handleMultiTouchDrag. I have removed the normalisation. The reason for that is that it normalised into screen coordinates from 0,0 to 1,1. The problem with that is that if you have a pinch event and you keep the distance say 300 pixels between your fingers, these 300 pixels represent 0.20 of the screen in the horizontal domain, but 0.3 of the screen in the vertical domain. A rotation of the pinch-fingers will hence result in a zoom in, as the normalised distance is changing between them.

A consequence of this is that I have changed the pan-code to use the same algorithm as the middle-mouse-pan.

The rest of it is very similar from previous revision, and there has been some fine-tuning here and there.

"
2014-04-24 17:14:54 +00:00
Robert Osfield
6f2d003bc5 From Mattias Helsing, "Seems I was only half right given what you asked for. CMP0017 only
says that modules that are found and ran from cmake modules dir should
prefer cmake-provided modules. find_package() and include() still look
in CMAKE_MODULE_PATH first.

After some investigating I've come up with a proposal examplified in
the attached FindGDAL.cmake script. It simply calls the cmake provided
FindGDAL.cmake if it exists and returns if it succeeds in finding GDAL
using that, otherwise continue with our local cmake code.
Pro: Wont clutter our root CMakeLists.txt
Con: If we begin to write more advanced Findxxx modules (using
COMPONENTS, REQUIRED etc.) we may have to revise this scheme.
"
2014-04-24 10:49:57 +00:00
Robert Osfield
ec658b115c Fixed reference invalidation bug. 2014-04-24 10:38:58 +00:00
Robert Osfield
a43cc12394 Fixed typo in OPENSCENEGRAPH_OPENGL_HEADER name 2014-04-24 07:22:55 +00:00
Robert Osfield
ef76994c05 Removed header as this CMake generated configuration file is not required to be part of svn repository 2014-04-24 07:20:44 +00:00
Robert Osfield
a1342a6bf6 Added src/osg/OpenGL.in configuration file and include/osg/OpenGL header files 2014-04-23 19:30:33 +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
560587c88f Fixed comment 2014-04-14 16:16:08 +00:00
Robert Osfield
5015fb6dac Renamed FindFreeType.cmake to FindFreetype.cmake to enable CMake build to pick up on CMake's own FindFreetype.cmake when it's available. 2014-04-13 16:04:27 +00:00
Robert Osfield
c168887e5e From Paul Cheyrou-Lagreze, "Attached is fix/feature for FBX osgplugins against latest trunk:
- ReaderWriterFBX.cpp: add "z up scene axis" support:  FBX provides facility to convert model scene axis during conversion. Currently fbx plugin convert axis to fbx:opengl axis system (which is arbitrarily at Y up, as opengl is in reality axis agnostic) and sometimes what is needed is Z up so added an option for Z up conversion

- FindFBX.cmake: add support for latest fbx sdk ( 2014.2 )"
2014-04-09 17:40:27 +00:00
Robert Osfield
db6df6fefd Disabled warnings to address issues in FBX headers that generate lots of warnings that we can't fix. 2014-04-09 17:20:26 +00:00
Robert Osfield
ef5be684ed Added extra search paths to add compatibility with Kubuntu/Ubuntu 14.04 now locaton for freetype 2014-04-08 19:42:05 +00:00
Robert Osfield
51671348f7 Updated ChangeLog and fixed Contributors list 2014-04-08 17:45:21 +00:00
Robert Osfield
a4a5957e2f From Remo Eichenberger, "I have extended the TIFF plugin that allows you to write LZW or JPEG compressed TIFF's. Options are:
tiff_compression = lzw | jpeg"
2014-04-08 12:00:52 +00:00
Robert Osfield
25ddbf8f1f From Sebastian Messerschmidt, "n the trunk version the osgGA::GUIActionAdapter has additional functions for lineIntersection which use osgGA::GUIEventAdapter&, but the class declaration is neither forwarded, nor is the header included.
Using the trunk together with osgEarth 2.5 will fail to build, due to the missing type.

Attached is the file forward declaring osgGA::GUIEventAdapter."
2014-04-08 11:48:34 +00:00
Robert Osfield
f2b746520b From Pjotr Svetachov, "We had a small problem converting skeleton animations from fbx to osgt
format. Turned out that the serializer didn't handle bone names with
spaces very well (the 3ds studio max biped for instance has spaces by
default). Here is a small fix for the problem."
2014-04-08 11:17:59 +00:00
Robert Osfield
ca4d93652d From Pjotr Svetachov, previous obj "commit broke compilation under visual studio 2013. To use std::not1 you need to include the functional header. Here is a fix." 2014-04-08 11:08:05 +00:00
Robert Osfield
efc493cfa0 Fixed build when using of double BoundingBox/BoundingSphere 2014-04-07 15:04:34 +00:00
Robert Osfield
391ab02573 From Jan Peciva, "I am sending four fixes to obj plugin:
- materialName used to be not stripped of whitespace, making number of models
fail to load materials; now fixed
- stripping was considering spaces only, thus models using tabs had problems
to load correctly; fixed
- fixed references to textures; they did not performed conversion to native
directory separators
- make d (dissolve) takes precedence over Tr (transparency); there seems to be
a confusion about the Tr item - some claiming 1 to be opaque and 0
transparent, while number of models uses exactly the opposite. d (dissolve),
if present in the model, does not suffer from this confusion, thus using it
instead fixes the problem for many many models.

I put many comments to the file concerning d and Tr item as others may further
investigate. Let me know in the case of any problems."
2014-04-07 14:17:57 +00:00
Robert Osfield
64979a0c1a From Marcel Pursche, "The problem is that when OpenThreads is build with the Linux pthreads implementation all threads inherit the processor affinity from their parent thread.
This behavior is also described in the pthreads man page (http://man7.org/linux/man-pages/man3/pthread_create.3.html):

>
> Linux-specific details
> The new thread inherits copies of the calling thread's capability
> sets (see capabilities(7)) and CPU affinity mask (see
> sched_setaffinity(2)).
>

To prevent this behaviour I wrote a patch that explicitly sets the affinity mask to all cores of the system, if no specific affinity was defined with PThread::setProcessorAffinity(unsigned int) .

Thank you!
"
2014-04-07 14:11:14 +00:00
Robert Osfield
20c0292e97 From Bjorn Blessing, "I got bored of the constant reports of “missing chunk 0xA08A” when reading 3ds-files. After a bit of research I discovered that this property is related to the advanced transparency settings for the material in 3D studio. In this case the falloff parameter. These controls affect the opacity falloff of a transparent material. And the property chooses whether falloff is in or out. I have added the property to the file reader BUT no changes are made to make this property propagate into the osgMaterial. But at least we get rid of this annoying error message." 2014-04-07 14:03:40 +00:00
Robert Osfield
88aa9ac5de From Bjorn Hein, "please find attached a small fix for RayIntersector.cpp.
* Changes are made against trunk
* Reason: crashes when using specific constructor from RayIntersector
* Info: Line 42:  added in constructor
RayIntersector::RayIntersector(const Vec3d& start, const Vec3d&
direction) missing initialisation of _parent
"
2014-04-07 13:52:01 +00:00
Robert Osfield
ac380e03c4 From Paul Martz, "We discussed the issue of GL_RED_SNORM and GL_RG_SNORM some time ago, but the issue was never completely resolved. Please see the attached submission to fix the issue.
osg/GL2Extensions was incorrectly defining GL_RED_SNORM and GL_RG_SNORM as part of the definitions for OpenGL v3.1. However, a quick review of the 3.1 spec indicates that these are not part of the 3.1 standard.

My attached change moves these definitions out of the #ifndef GL_VERSION_3_1 conditional block, and defines them conditionally if not already defined. This allows the DDS plugin to build for GL3.
"
2014-04-07 13:48:15 +00:00
Robert Osfield
67b4d5412b Fixed iso surface shaders 2014-04-04 11:25:51 +00:00
Robert Osfield
d773d358c4 Improved the setting of sample density/ratio so that they are consistent 2014-04-01 18:56:57 +00:00
Robert Osfield
e5fe59799d Fixed handling of volume tiles with a region. 2014-04-01 18:33:02 +00:00
Robert Osfield
27b71e3927 Added cube and hull rendering support 2014-03-27 12:47:44 +00:00
Robert Osfield
2f8b0f7a70 Restructured the handling of TileData to make it more extensible and flexible. 2014-03-19 17:56:40 +00:00
Robert Osfield
d7944b6ca9 Addd ExteriorTransparencyFactorProperty for support of upcomming functionality of rendering a cube volume with a hull volume inside it. 2014-03-18 18:14:15 +00:00
Robert Osfield
ed724a730e Added support for animating volume hulls. 2014-03-17 15:54:52 +00:00
Robert Osfield
d703a2df44 From Stephan Huber, "attached is a fix for the rest-http-plugin which should fix the font-issue reported by Phil. The old implementation did forward all requests to the internal http-server via user-events. This prevented error-reporting for missing files, as the request was accidentally handled by the plugin. As a request for missing font-file succeeds and returned an empty file, the curl-plugin hands the data happily to the freetype-plugin which failed trying to load an empty font-file, obviously.
My fix was to rename the standard request handler to a specialized user-event-handler which handles only requests for "/user-event“

So fonts should work on iOS when loaded remotely, even when a local file is available and with the resthttp-plugin serving the presentation.
"
2014-03-13 14:02:50 +00:00
Robert Osfield
7f206fbf80 From Stephan Huber, fix for building lua plugin from local source 2014-03-13 13:59:34 +00:00
Robert Osfield
ea865d0ff9 Added support for directly invoking scripts using <run-script> and <run-script-file> to enable scripts to interact with each other. 2014-03-13 10:28:18 +00:00
Robert Osfield
75982f3379 Improved support for passing events between scripts and Present3D application 2014-03-12 11:01:09 +00:00
Robert Osfield
8f30a262f4 Added PresentationInterface class to make it more convinient to access the current presentation from scripting languages 2014-03-11 10:52:10 +00:00
Robert Osfield
ee266255eb Added scripting support for JumpData, KeyPosition, HomePosition and parts of SlideEventHandler that enable dispatching of user created events. 2014-03-10 19:08:46 +00:00
Robert Osfield
9b299dc4b9 Added ability to replace callback objects via lua scripts to allow one to override callbacks.
Added fallback for osgGA::Widget::Extents.
2014-03-07 11:09:25 +00:00
Robert Osfield
9319350176 Added support for osg::Image to the lua plugin. 2014-03-06 10:27:26 +00:00
Robert Osfield
076adcbd82 Implement add, set and get methods for StateSet. 2014-03-04 13:36:13 +00:00
Robert Osfield
218e36b12b Relaxed the handling of Image objects 2014-03-04 13:35:27 +00:00
Robert Osfield
c6e72ee00b Fixed handling of OverrideValue 2014-03-04 13:34:23 +00:00
Robert Osfield
2b67196418 From Stephan Huber, fix for handling font paths on a local machine when other files have been source from a remote machine. 2014-02-28 17:38:36 +00:00
Robert Osfield
de09adcaa9 Added MapReverseIterator implementation. 2014-02-27 10:02:55 +00:00
Robert Osfield
46381cb15c Added MapIteratorObject and support for it in the lua plugin to provide map iterator functionality. 2014-02-26 18:18:08 +00:00
Robert Osfield
9394215d31 Added Map serializer size() method and support for it in the lua plugin. Renamed functions in lua plugin to be more consistent. 2014-02-26 11:01:35 +00:00
Robert Osfield
69e9f2c973 Added support for vector and map containers in osgDB::Serailizer's and lua plugin. 2014-02-26 08:26:51 +00:00
Robert Osfield
4ef5d9eb5f Added Vector serialization and support in lua plugin top enable script users to set/get vector properties such as osg::Array, osg::PrimitiveSet and children lists. 2014-02-24 10:19:48 +00:00
Robert Osfield
6d68718fba Fixed handling of enums in Lua plugin.
Fixed computation of getNumPrimitives() so that it returns 0 when PrimitiveSet is zero.

Added missing properties to PrimitiveSet serializers
2014-02-13 18:52:41 +00:00
Robert Osfield
cb805d7be5 Added inital cut of PrimitiveSetSet wrappers to scripting 2014-02-13 11:01:36 +00:00
Robert Osfield
42705bff3f Added full range of Array subclasses to wrappers 2014-02-12 18:10:52 +00:00
Robert Osfield
743a6b049c Added initial support for wrapping osg::Array in a way that can be used via scripting. 2014-02-12 18:03:53 +00:00
Robert Osfield
8bbbea1274 Fixed handling of assignment of User Object's that replace existing Object with the specified propertyName. 2014-02-11 18:18:48 +00:00
Robert Osfield
2797e8cb7c Improved support for setting/getting properties via the osg::UserDataContainer. 2014-02-11 18:07:37 +00:00
Robert Osfield
e3a003a08f Quitened down debug messages 2014-02-11 10:56:51 +00:00
Robert Osfield
a9f8af3fb6 Changed implementation of enums to use strings as lua type to make it easier to do comparisons and track values 2014-02-11 09:43:08 +00:00
Robert Osfield
e21865ee33 Implemented Widget::handle, handleImplementation, traverse and travseImplementation() wrappers to enable them to be extended via scripting 2014-02-10 18:07:26 +00:00
Robert Osfield
31e98b51df Added support for serailizing and scripting BoundingBox and BoundingSphere objects 2014-02-10 16:44:13 +00:00
Robert Osfield
3dcca431a9 Fixed handling of setting member variables via the Serializers when the value is the default.
Added support for more features of the osgDB::Widget class.

Fixed handling of boolean values in the Lua plugin
2014-02-08 17:53:51 +00:00
Robert Osfield
1319c2d281 Added support for enum's in the Lua script integration 2014-02-08 10:39:20 +00:00
Robert Osfield
8eae4b0381 Fixed export 2014-02-08 10:38:51 +00:00
Robert Osfield
8ad0ab1f6b Fixed handling of returns when invoking a script, removed some debug messages, added a warning message when detecting erronous types.
Added FocusBehaviour enum to osgGA::Widget serialization
2014-02-07 16:06:57 +00:00
Robert Osfield
6f5e5c23df Added initial Widget wrapper 2014-02-07 10:46:16 +00:00
Robert Osfield
4016aed62d Moved experimental Widget class to osgGA
Add computeIntersections() to the osgGA::GUIActionAdapter base class to enable intersection tests without needing to directly link to osgViewer.
2014-02-06 17:32:41 +00:00
Robert Osfield
958a7d0ab0 Added osg::CallbackObject suport to the experiment Widget base class to enable script language extension of widgets 2014-02-06 17:04:40 +00:00
Robert Osfield
99eb81e743 Added support for casting objects to allow one to access a parent classes methods. 2014-02-06 11:25:37 +00:00
Robert Osfield
ca3737e002 Tweaked the detection of when the position transform for the hull is required. 2014-02-05 11:08:39 +00:00
Robert Osfield
2b8be97297 Added support for a <hull> tag that can be used within <volume> tag. 2014-02-05 11:07:03 +00:00
Robert Osfield
1909093cac Improved the white space trimming 2014-02-05 11:04:29 +00:00
Robert Osfield
c599189d7d Added lua-5.2.3 as source code so it can be optinally built as part of the lua plugin, making it possible to work out of the box across all platforms with needing lua as an external dependency.
Added the Cmake option OSG_USE_LOCAL_LUA_SOURCE to control whether to build and use the Lua source code in the lua plugin, or look for lua as an external dependency.
2014-02-04 16:49:13 +00:00
Robert Osfield
6bf6d5eeb2 Added test code for nesting a <hull> within a volume tag. 2014-02-04 16:46:33 +00:00
Robert Osfield
488e1692cc From Stephan Huber, added support for compile source code of lua with the lua plugin 2014-02-04 11:24:01 +00:00
Robert Osfield
f44369777f Fixed error in the computation of tex coords of Maximum Intensity Projection + Transfer Function rendering. 2014-02-03 15:35:22 +00:00
Robert Osfield
306a4f2d2d Replaced C cast to long with a static_cast<const void*>() to avoid a build error under Mingw 64. 2014-01-31 19:18:18 +00:00
Robert Osfield
5f8e2bda2f Added osg::CallbackObject to be used to extend C++ class from scripting languages by providing callback objects assigned to the osg::Object UserDataContainer, with the CallbackObject's Name used to map the "method" provided by the CallbackObject. The CallbackObject is implemented by the script engine to provide the neccessary glue to invoking the script with the appropriate input parameters and handling the output parameters.
To the Lua plugin added support for assigned lua functions to C++ osg::Objects via the new osg::CallbackObject mechanism.  To invoke the scripts function from C++ one must get the CallbackObject and call run on it.

Renamed ScriptCallback to ScriptNodeCallback to avoid possibly confusion between osg::CallbackObject and the ScriptNodeCallback.
2014-01-31 16:20:29 +00:00
Robert Osfield
661f0e69ef Updated ChangeLog 2014-01-29 11:01:24 +00:00
Robert Osfield
d63c6f6978 From Kristofer Tingdahl, made method virtual 2014-01-28 16:49:20 +00:00
Robert Osfield
fba7a65fb4 Fixed MingW build's handling of debug d postfix. 2014-01-28 16:48:47 +00:00
Robert Osfield
4814a5341e Removed the invocation of gcc on all platforms 2014-01-28 15:28:17 +00:00
Robert Osfield
f7e6f0092c From Kristofer Tingdahl, "the vertical bar is upside down, and hence not as the documentation says it should be. This is corrected with this patch"
From Robert Osfield, changed the example so that the vertical and horizon scalar bars are rotated to the XZ plane so you can see them with the default viewer's camera orientation.
Tweaked the positioning of title text of vertic scalar bar to avoid overlap of text.
2014-01-28 11:01:28 +00:00
Robert Osfield
4f19237467 Removed unimplemented method 2014-01-27 15:43:36 +00:00
Robert Osfield
5292c7ca50 From Laurens Voerman, "I experienced a crash in Geometry::fixDeprecatedData(), on certain files, and brought the problem down to a very simple test file, attached as test3.zip.
There are two problems:
1> for DrawElementsUShortPrimitiveType (and UInt) the source_pindex still equals -1 and causes a crash
     in DrawElementsUBytePrimitiveType source_pindex is incremented, and in DrawElementsU(Short/Int)PrimitiveType primitiveNum is incremented, but never used

2> The drawelements need to be rewritten as the vertices are reordered.

created a patch for osg stable branch(r14038): attached as Geometry-osg-3.2.zip
and for svn brach(r14044): attached as Geometry_osg_svn.zip"
2014-01-24 17:31:09 +00:00
Robert Osfield
70bfad0371 From Aurelien Albert, "In the "apply" method of osg::FrameBufferObject, the draw buffers are always enabled, even if the target is only "READ_FRAMEBUFFER".
This can lead to inconsistency if you bind a framebuffer with multiple attachments in DRAW mode and then a framebuffer with different attachment count in READ mode (for example to manually "blit" from a FBo to another).

On some ATI cards (at least RADEON HD) this also leads to an "incomplete " FBO status

I've added a test to enable drawbuffers only if target is "DRAW" or "READ_DRAW", this solves my problems on ATI cards."
2014-01-24 17:06:32 +00:00
Robert Osfield
fcc34a8b45 From Michael Schanne, "small fix for a duplicate OR operand in KdTree.cpp." 2014-01-24 16:45:45 +00:00
Robert Osfield
1ec3ec1247 From Torben Dannahuer, "modified findcollada.cmake which can now detect Boost 1.55 libraries, which are used by Collada in my 3rdParty package" 2014-01-24 16:28:34 +00:00
Robert Osfield
1270236715 From Torben Dannhauer, VisualStudio 2013 build fixes 2014-01-24 16:24:59 +00:00
Robert Osfield
8a334e724b From Kristofer, "The osgSim::ScalarBar has a problem in that if the scalarbar has a color in one end that co-incides with the background color, one cannot see where the scalarbar ends. With this patch, we add a line around the perimiter of the bar to mark it.
Secondly, we thought the text-annotation missed ticks that mark out precisely where on the bar the texts relate to, so we added that as well."
2014-01-24 16:19:38 +00:00
Robert Osfield
8ae57c2797 From Marc Helbling, "I am sending a small fix in the PLY pseudo-loader; the extension was checked in plyfile.cpp thus preventing the loading of any .PLY file (extension in uppercase). The extension filtering is already handled by ReaderWriter::acceptsExtension in a case unsensitive way." 2014-01-24 16:01:59 +00:00
Robert Osfield
eb56080277 Fixed warnings 2014-01-24 15:40:18 +00:00
Robert Osfield
91b7104a92 Changed the handling of single window configurations so that simply reuse the View::getCamera() instead of creating a slave. 2014-01-24 14:26:25 +00:00
Robert Osfield
15f44c8736 Added a getModeUsage() method that prevents any mode being automatically associated with these Texture types that are only usable using non fixed function pipeline. 2014-01-24 12:01:37 +00:00
Robert Osfield
f0df819cbf Fixed crash when reading a viewer configuration file where the EventVisitor was being re-assigned but left a dangling pointer 2014-01-24 11:37:35 +00:00
Robert Osfield
29ab577bc3 From Stephan Huber, "attached is a new zip containing two small fixes:
* forwarded touch-events do have a correct input-range from 0 .. 1
* I refactored sending touch-events per osc so the receiver can detect a TOUCH_ENDED better"
2014-01-24 10:10:43 +00:00
Robert Osfield
4886a8941d Fixed warnings 2014-01-23 19:55:37 +00:00
Robert Osfield
d8482ef1ba From Kristofer Tingdahl,"we have a bunch of classes that inherit osg::Node, and they create their own, internal geometry which is passed into the render bucket at the cull-traversal. Last week, we realised that these classes are not accounted for when doing an ComputeBoundVisitor- traversal, as there is no specialization in ComputeBoundVisitor for them.
One solution is naturally to create a new class that would inherit the osg::ComputeBoundVisitor, and use that. I don't like that idea as the ComputeBoundVisitor does actually have what I need - it is only hidden in a protected function.

I am therefor suggesting a slight generalization of the ComputeBoundVisitor with the attached patch, which is tested.

The patch has two parts:
we add applyBBox() so that one can use that in a customized traverse-function and add a bbox to the visitor. I considered calling this function expandByBBox(), but I though  applyBBox was better.
The MatrixStack is made available to the outside world. That enables a traverse-function to do whatever it wishes.
I do actually only need one of the two, as I can implement what I wish either way, but adding getMatrixStack() will make more generic expansions possible.
"

From Robert Osfield, changed the name of the new applyBBox(..) method to applyBoundingBox(..) to keep it's naming more consistent with the rest of the OSG.
2014-01-23 16:48:29 +00:00
Robert Osfield
a96ad565c7 From Stephan Huber, "attached are some fixes to the osc-plugin and the touch-implementations for iOS and os x and other small bugfixes. These fixes will normalize the orientation of the touch points, and transmitting the touch points over osc via the TUIO-protocol works now more robustly between two osg-applications.
I added a new tag to p3d called forward_touch_event_to_device and renamed the existing forward_event_to_device to forward_mouse_event_to_device. This new tag will transmit touches to the virtual trackpad as touch events. I added the MultitouchTrackball to the p3d-app so zooming and moving a model remotely should now work, if you use forward_touch_event_to_device. I kept (and fixed) forward_mouse_event_to_device for background compatibility, so old presentations works as in previous versions, without the ability to zoom + scale. of course.

forward_touch_event_to_device needs some more testing, (e.g. with image-streams and keystone, afaik there’s no support for touch-events...) but for a first version it works nice.
"
2014-01-23 15:37:48 +00:00
Robert Osfield
09c09628ac Removed debug message 2014-01-23 10:56:17 +00:00
Robert Osfield
15882aae5f Changed the TransprencyProperty range to 0 to 2.0 to enable forcing opaque qualities on fragments 2014-01-23 10:50:55 +00:00
Robert Osfield
8876394c7c Cleaned up debug message. 2014-01-23 10:11:15 +00:00
Robert Osfield
fd85542d8f Cleaned up the Qt find package, and made changed the default threading model to SingleThreaded when using Qt5 to avoid crash due to regresssion since Qt4. 2014-01-23 10:09:53 +00:00
Robert Osfield
ea429d5d46 Added clean up of osg::Program that are applied by the GLObjectsVisitor, which addresses a state leak that creates GL error once the main scene graph is rendered. 2014-01-23 09:41:09 +00:00
Robert Osfield
7f9f7dd216 Added GL_TEXTURE_2D_MULTISAMPLE to texture mode list. 2014-01-23 07:59:46 +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
4fef6a3c2f Refactored .p3d loader to make it less strict about the tag, property and value strings when matching them to supported values.
Examples of supported matches are:

   <Slide> and <slide> will be treated the same
   <bgcolor>WHITE</bgcolor> and <bgcolor>White</bgcolor> will be treated the same
   <text alignment="TOP_LEFT"</text> and <text alignment="top left"</text>,  <text alignment="TopLeft"</text> will all be treated the same
2014-01-22 16:29:45 +00:00
Robert Osfield
7fe3244c71 Added support for sampleRatio and sampleRatioWhenMoving <volume> properties 2014-01-22 11:25:54 +00:00
Robert Osfield
c63bebd8c3 Build fixes for when ref_ptr<> automatic type conversion is turned off 2014-01-21 18:58:52 +00:00
Robert Osfield
1678dc3562 Added support for osgVolue::SampleRatioProperty. Fixed build errors when compiling with ref_ptr<> automatic type conversion. 2014-01-21 18:48:53 +00:00
Robert Osfield
e48d6812fa Build fixes for when ref_ptr<> has no auto type conversion 2014-01-21 18:31:20 +00:00
Robert Osfield
504b42aa61 Fixed build error 2014-01-21 17:27:21 +00:00
Robert Osfield
779bd20fd5 Fixed build error due to typo. 2014-01-21 17:00:56 +00:00
Robert Osfield
752d40b118 Integrated multipass volume rendering shaders from OpenSceneGraph-Data 2014-01-20 17:23:11 +00:00
Robert Osfield
b41e5ccc77 Changed the default directory for the output files to be the current working directory,
with the --write-to-source-file-directory added to allow one to have the original behaviour
of writing to the same directory as the original source file.
2014-01-20 17:03:29 +00:00
Robert Osfield
8a0e49d780 Removed nolonger used code paths 2014-01-20 16:21:24 +00:00
Robert Osfield
54a3f76a2b Disable depth test for rendering of hull backface 2014-01-20 15:54:48 +00:00
Robert Osfield
5cb305041d From Stephan Huber, "recent commits regarding GLuint64EXT broke the build for GLES1 and GLES2. Attached you’ll find a fix which hopefully work for every platform." 2014-01-20 15:10:49 +00:00
Robert Osfield
15399bbf35 From Kristofer Tingdahl, reimplement of AntiSquish node to avoid the use of an update callback.
From Robert Osfield, small ammendments to clean up header.
2014-01-20 11:00:09 +00:00
Robert Osfield
6246cd5d85 From Roni Zanolli,Added use of Qt's new devicePixelRatio() method to assist with handling the upscalling of resolution on iPhone for "retina" displays.
From Robert Osfield, changed Roni's code to use a #define GETDEVICEPIXELRATIO to access the versioned Qt devicePixelRatio() method to avoid duplication of the Qt version checking.
2014-01-20 10:40:49 +00:00
Robert Osfield
0d4a448c34 Fixed warning 2014-01-17 18:20:39 +00:00
Robert Osfield
8efe470d07 From Stephan Huber, fix for OSX build issue 2014-01-17 18:20:28 +00:00
Robert Osfield
e968caae80 From Kristoger Tingdahl, "the patch I sent to src/osgQt/CMakeModules.txt did not do the work on windows. I have fixed that, and also made it more generic so there is no special handling of qt5.2, but all qt5 are the same.
I have tested this on:

mac/qt5.2
linux/qt5.2
windows/qt5.2, and
mac/qt5.1

All platforms perform as expected.

The previous fix removed the -f flag to the moc-pre-processor, but on windows, it turned out that -f "osgQt/QGraphicsViewer" was needed.

This becomes an include-statement in the file generated by moc which is needed for compiling it. I ask you consider this patch for the trunk and the 3.2 branch.


Secondly, I wonder if it would be possible to apply my patch for FindRSVG.cmake from 22nd November in the 3.2 branch.

In short, the version of librsvg must be equal or higher to 2.35:

PKG_CHECK_MODULES(RSVG librsvg-2.0>=2.35)
"
2014-01-17 14:02:30 +00:00
Robert Osfield
e04e03d695 From Jordi Torres, "We have a code using gcc with -Wextra flag and using OSG as a third party library. It does not compile when importing <osgViewer/Viewer> failing in EventHandler and GUIEventHandler:
....

GUIEventHandler: In copy constructor 'osgGA::GUIEventHandler::GUIEventHandler(const osgGA::GUIEventHandler&, const osg::CopyOp&)':

/include/osgGA/GUIEventHandler:56:9: error: base class 'class osg::Object' should be explicitly initialized in the copy constructor [-Werror=extra]

It seems the diamond problem:

   A = osg::Object
  / \
 /   \--> Virtual inheritance
B     C
 \   /
  \ /
   D = EventHandler
   |
   |
   E = GUIEventHandler

The most derived class(E)  handles the instantiation of A (osg::Object), but all have to be responsible in case they are the ones instantiated.


In case A is not initialized in the copy constructor of derived classes the default constructor will be called, which seems a bug.

I've added osg::Object to the initalization list of EventHandler and GUIEventHandler copy constructors, because both classes are instantiables.
 "
2014-01-17 13:59:29 +00:00
Robert Osfield
354d79acd1 From Jordi Torres, "Fixed a typo in ReaderWriterCURL::ReaderWriterCURL() changed Psuedo for Pseudo." 2014-01-17 13:54:14 +00:00
Robert Osfield
235a52405d Fixed handling of background colours. 2014-01-17 12:40:58 +00:00
Robert Osfield
706afaccae Removed old redundent TexGen usage. 2014-01-16 17:26:35 +00:00
Robert Osfield
e8cd06c6e9 Added hull="hul-filename" property support to <volume> tag that can used thus:
<layer>
            <volume renderer="MultiPass" hull="cow.osgt.0,-2,-4.trans.50,50,50.scale">CardiacCT</volume>
        </layer>
2014-01-16 17:17:37 +00:00
Robert Osfield
1264ec736a Added support for controlling the extents of the volume rendering by nesting the hull underneath VolumeTile. Currently only supported by the new osgVolume::MultipassTechnique 2014-01-16 16:08:43 +00:00
Robert Osfield
a30ec25067 From Paul Martz, build fix for Windows GL3 build 2014-01-09 11:13:09 +00:00
Robert Osfield
110fbf89b0 Added per TileData RTT Camera in prep for rendering backface of volume to a depth texture 2014-01-09 09:41:43 +00:00
Robert Osfield
2efd52dda2 Changed near/far values to use CullVisitor::value_type and use std::numeric_limits<>. 2014-01-08 15:56:43 +00:00
Robert Osfield
889e4749ef From Farshid Lashkari, "I've attached a fix for the Collada loader that prevents a crash with some files containing textures. I also converted an OSG_NOTICE to OSG_INFO to be consistent with other log messages within the loader." 2014-01-08 10:33:00 +00:00
Robert Osfield
84d301715e Removed more odd characters 2014-01-08 10:31:36 +00:00
Robert Osfield
32d7a48712 Removed more odd characters 2014-01-08 10:28:24 +00:00
Robert Osfield
db82bb4ab1 Removed odd characters 2014-01-08 10:24:43 +00:00
Robert Osfield
4a76063b03 Moved destructor to protected 2014-01-08 10:16:39 +00:00
Robert Osfield
716cfbffa4 Refined the GLint64 definitions 2014-01-07 19:06:44 +00:00
Robert Osfield
0f2502c72d Removed duplicated instances of GLint64EXT declarations 2014-01-07 18:32:45 +00:00
Robert Osfield
0bb62a8162 Removed execute properties via svn propdel svn:executable file 2014-01-07 16:43:07 +00:00
Robert Osfield
d48091d37e From Farshid Lashkari, "I've attached a small change to the DAE writer to support writing out unknown transform types. It will essentially treat it as a matrix transform, using the the local to world matrix value." 2014-01-07 16:29:22 +00:00
Robert Osfield
7bc373a056 Bumped SO_VERSION number of OpenThreads to avoid conflicts with Debian SO_VERSION bump 2014-01-07 16:18:05 +00:00
Robert Osfield
0ee9f732b8 From Sebastian Messerschmidt, "Original shader was not running on various NVidia cards due to old syntax in shader." 2014-01-07 16:15:50 +00:00
Robert Osfield
3531bec43c Added State::getMaxTextureCoords() and State::getMaxTextureUnits() inline methods. 2014-01-07 11:01:32 +00:00
Robert Osfield
cc99a40b16 Added support for Switch::set/getValue() 2014-01-06 17:19:21 +00:00
Robert Osfield
8ae971bdaa Added Group::setChild(..) and Geode::setDrawable(..) MethodObjects 2014-01-06 16:58:07 +00:00
Robert Osfield
fa7f25d75d Removed the prototype MethodObject classes 2014-01-06 15:46:36 +00:00
Robert Osfield
6490f1b6a5 Moved osgDB::MethodObject from lua plugin into osgDB, added support for running methods via the osgDB::PropertyInterface class.
Updated lua plugin to use new osgDB::PropertyInterface to run methods.

Added addChild/removeChild() etc to Group.cpp, and addDrawable/removeDrawable() etc. to Geode.cpp serializers.
2014-01-06 15:45:46 +00:00
Robert Osfield
534d21dffd Renamed the OSGSIM cmake variable to OSGSIM_LIBRARY to be consistent with the rest of the variables. 2014-01-06 10:23:26 +00:00
Robert Osfield
bfdcf4d8d1 Fixed build of V8 and Python plugins 2014-01-03 14:36:58 +00:00
Robert Osfield
afab78ed40 Preliminary support for wrapping methods in the lua script plugin. 2013-12-25 17:36:32 +00:00
Robert Osfield
865a47bd6b Added <switch> tag to .p3d to allow one to provide multiple ways to render children within a layer. 2013-12-20 09:57:35 +00:00
Robert Osfield
a72508bc71 From Kristofer Tingdahl, "the syntax of the moc executable has changed between 5.1.1 and 5.2.0 versions of qt (see below). The difference is that the <file> argument has become mandatory after the -f option.
Hence, moc will complain when osg throws in a -f without anything after it. Hence I propose removing the -f on Qt5 builds. I have tested building without -f on both qt520 and qt511, and that works well.

The attached src/osgQt/CMakeLists.txt that can be patched into 3.2 safely. For the trunk, I would consider dropping the check on the version, and simply remove the option on qt5. I have tested that on qt5.1.1, and that worked fine. Question is however if it works on qt5.0. Probably it does, so the question is simplicity of CMakeList.txt vs safety."
2013-12-19 17:13:24 +00:00
Robert Osfield
e4810990f0 From Sylvain Marie, When compiling OSG for the iOS simulator, providing both -miphoneos-version-min and -mios-simulator-version-min doesn’t please clang (tested on OS X 10.9.0 with Xcode 5.0.1).
Here is a small change (against commit da597ab16945c572a2ad2f4f26fcef38ed21b074) in the CMakeLists.txt to avoid this situation.
2013-12-19 15:10:28 +00:00
Robert Osfield
3e171414bd From Michal Durkovic, "I’m building current trunk on Mac OS X 10.9 and have encountered this error during linking of osgdb_lua plugin:
Undefined symbols for architecture x86_64:

  "lua::LuaScriptEngine::pushValue(osg::Quat const&) const", referenced from:

      PushStackValueVisitor::apply(osg::Quat const&) in LuaScriptEngine.o

  "lua::LuaScriptEngine::pushValue(osg::Plane const&) const", referenced from:

      PushStackValueVisitor::apply(osg::Plane const&) in LuaScriptEngine.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)



Looks like LuaScriptEngine was missing implementation of those 2 member functions. Fixed src/osgPlugins/lua/LuaScriptEngine.cpp file in attachment.

"
2013-12-19 13:53:40 +00:00
Robert Osfield
f16f278fea From Stephan Hunber, "attached you’ll find some changes to osg/p3d:
* a new command-line-option to present3d and a new option to the p3d-plugin to suppress any found <env> tags
* a new command-line-option to present3d to forward mouse-events via osgGA::Device (defaults to off) so we can test the interface-files with present3d better
* I added a new attribute forward_to_devices for click_to_event to forward the event to all attached devices instead of handling the event locally. This will fix the annoyance with the new interface-files when toggling polygon-mode or switching light on/off.

Here’s an example:

<click_to_event forward_to_devices="true">0x72</click_to_event>
"
2013-12-19 13:49:27 +00:00
Robert Osfield
02120e188e From Stephan Hunber, "I found some time and ported osgDB::FileUtils and DarwinUtils across new apis to fix the warnings about deprecated api-usage.
* osgDB::FileUtils uses now the Cocoa-API to determine the paths of the application-support-folder
* DarwinUtils uses now modern functions of the quartz-api to get and set screen-resolutions. Removed some of the osg-deprecated stuff.
"
2013-12-19 13:44:42 +00:00
Robert Osfield
a8dc460085 Implemented support for calling scripts from with Present3D. 2013-12-19 10:02:16 +00:00
Robert Osfield
591c5bae42 Added support for new osgVolume::MultiPassTechnique to Present3D. To use add property renderer="MultiPass":
<volume renderer="MultiPass">MyVolumeData</volume>
2013-12-17 12:18:06 +00:00
Robert Osfield
666aa81185 Added experimental image 3d downsample function. 2013-12-17 10:52:50 +00:00
Robert Osfield
723ecfad8d Removed the unused Texture::Extensions::numTextureUnits() 2013-12-16 11:28:10 +00:00
Robert Osfield
5571c361dc Implemented ability to switch between different shaders with new MultipassTechnique 2013-12-13 12:38:01 +00:00
Robert Osfield
939aa38a2a Added SampleRatioWhenMoving property and support to new osgVolume::MultipassTechnique. 2013-12-12 09:53:24 +00:00
Robert Osfield
a5c0127a6e Applied unquie CullVisitor::Identifier rather than reusing the cloned one. 2013-12-12 09:51:30 +00:00
Robert Osfield
2501f32e9a Changed epsilon to 1e-5 to address picking problems with planaer objects 2013-12-11 17:20:14 +00:00
Robert Osfield
e3bf55a266 Added initial support for 1D transfer functions to MultipassTechnique 2013-12-11 12:00:27 +00:00
Robert Osfield
ff4a0ce1e2 Added support for handling viewports with offset origins, and with it split stereo. 2013-12-10 13:38:27 +00:00
Robert Osfield
bc95ea97fb Introduced SampleRatioValueProperty for more intuitive control of how many samples to take when volume rendering 2013-12-10 10:43:48 +00:00
Robert Osfield
499adba97f Improvements to new MultipassTechnique 2013-12-09 10:39:01 +00:00
Robert Osfield
3858acf70f Further work on new MultipassTechnique/VolumeScene. 2013-12-06 19:31:12 +00:00
Robert Osfield
ed4deeb0fb From Mike Krus, compile fix to enable compiling across a wider set of versions. 2013-12-06 09:35:57 +00:00
Robert Osfield
1b3290221c Added support for using shaders to render the RTT textures with depth 2013-11-26 19:03:46 +00:00
Robert Osfield
477951b924 Replaced readShaderFile() usage to readRefShaderFile() 2013-11-26 10:38:35 +00:00
Robert Osfield
4fcf8d3e86 Added initial render to texture functionality into osgVolume::VolumeScene 2013-11-25 17:36:17 +00:00
Robert Osfield
f02ed3c629 Warning fixes 2013-11-22 10:27:15 +00:00
Robert Osfield
91033a3a1f From Kristofer Tingdahl, Build fix for svg plugin that makes sure the version of librsvg is at sufficient, and fixed a missing virtual destructor warning. 2013-11-22 09:48:02 +00:00
Robert Osfield
d3a7115c45 Removed trailing spaces, added missing return to last lines 2013-11-22 09:38:50 +00:00
Robert Osfield
5bea13c172 Added new osgVolume::VolumeScene and osgVolume::MultipassTechnique class shells that will be filled out to provide multi-pass volume rendering that handles mixing of
3D meshes with volume rendering and segmentation of volumes via a user defined hull mesh.
2013-11-21 18:17:44 +00:00
Robert Osfield
1b269a7711 From Stephan Huber, "CLang / LLVM on OS X seems to have a problem compiling the osgGA-serializer. (It was reported before on the list, but the error is hard to track as it shows up only sometimes)
I fixed the compile-error with a dedicated destructor of osgGA::GUIEventHandler"
2013-11-21 14:21:55 +00:00
Robert Osfield
9a9efb1c58 From Farshid Lashkari, " recently encountered an issue attempting to load an IVE file generated by an older version of OSG. The file contained dxt1 compressed image data with mipmaps. The loaded model would cause crashes when passing the mipmap data to glCompressedTexImage2D. It seems that the size of the data array within the IVE file did not match the computed size from Image::getTotalSizeInBytesIncludingMipmaps(). This essentially made the mipmap offsets invalid within the Image object.
I'm not sure if the IVE was simply generated incorrectly, or if the Image::getTotalSizeInBytesIncludingMipmaps() was modified since the file was generated. Either way, I added a simple check in the IVE loader so that it clears the mipmap offsets if the actual data size does not match the computed data size. This seems like a safe fallback since the mipmap data can be automatically generated, and it fixes the problem in my case.

Also, while looking into this issue, I noticed that the osgDB::InputStream class applies the serialized image allocation mode. However, since the serializer is allocating the image data itself, it seems like it should force the allocation mode to USE_NEW_DELETE.
"
2013-11-21 14:08:01 +00:00
Robert Osfield
a5d78953d4 From Farshid Lashkari, "I recently encountered an issue attempting to load an IVE file generated by an older version of OSG. The file contained dxt1 compressed image data with mipmaps. The loaded model would cause crashes when passing the mipmap data to glCompressedTexImage2D. It seems that the size of the data array within the IVE file did not match the computed size from Image::getTotalSizeInBytesIncludingMipmaps(). This essentially made the mipmap offsets invalid within the Image object.
I'm not sure if the IVE was simply generated incorrectly, or if the Image::getTotalSizeInBytesIncludingMipmaps() was modified since the file was generated. Either way, I added a simple check in the IVE loader so that it clears the mipmap offsets if the actual data size does not match the computed data size. This seems like a safe fallback since the mipmap data can be automatically generated, and it fixes the problem in my case.

Also, while looking into this issue, I noticed that the osgDB::InputStream class applies the serialized image allocation mode. However, since the serializer is allocating the image data itself, it seems like it should force the allocation mode to USE_NEW_DELETE.
"
2013-11-21 13:59:00 +00:00
Robert Osfield
1e2bead9bc Converted std::max to osg::maximum to fix VS2013 build error 2013-11-21 11:02:08 +00:00
Robert Osfield
a54b999ccc Added Geometry::drawVertexArraysomplemetation(..) and drawPrimitivesImplemenation(..) methods that are called from drawImplementation(..). These new vertex methods
allow subclasses from osg::Geometry to specialize the vertex array setup or how the primitives are dispatched to OpenGL.
2013-11-21 10:31:34 +00:00
Robert Osfield
dbf88cc209 From Stephan Huber, "minor ios-fixes/-enhancements
* force _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC for IOS device + simulator as the test does not pick the right implementation
* fixed a small compile-bug for iphone-example
* added a check to prevent multiple realization of a GraphicsWindowIOS-object
"
2013-11-18 14:21:06 +00:00
Robert Osfield
d8c1c4bbeb From Stephan Huber, compile fix for OpenGL ES on iOS. 2013-11-18 13:31:44 +00:00
Robert Osfield
e0d3ab4412 From Stephan Huber, * GUIEventAdapter: add support for getting normalized touch points
* MultiTouchTrackball: some code cleanup and support for normalized touch-points
* oscdevice: receiving and sending multi-touch-events via the Cursor2D-profile from TUIO
* added some documentation
2013-11-18 13:25:55 +00:00
Robert Osfield
d7442e7456 Added panning and zooming functionality to transfer function UI prototype code. 2013-11-18 12:46:00 +00:00
Robert Osfield
80c45ad46a Added BoundingBox::contains(const vec_type& v, value_type epsilon) method with new epsilon parameter to make it easier to test for containment in the presence of numerical errors 2013-11-18 12:45:04 +00:00
Robert Osfield
c194e92df8 Moved Handled propety from GUIEventAdapter to Event base class.
Added CameraManipulator::finishAnimation() method to allow application code to stop any animation/throw of manipulators.
2013-11-15 16:15:09 +00:00
Robert Osfield
835d9455a9 Restored the rescaleToZeroToOneRange() to address rendering issues. 2013-11-12 14:21:00 +00:00
Robert Osfield
eede49d15c Removed unused variables 2013-11-11 10:55:51 +00:00
Robert Osfield
829cd9718a From Stepan Huber, "attached are my changes for the osc, zeroconf and resthttp-plugin to use the new event-class. I refactored the osgoscdevice-example so that it’s working again. " 2013-11-08 12:28:51 +00:00
Robert Osfield
1a90789402 Added support for assinging and display transfer functions 2013-11-08 12:26:14 +00:00
Robert Osfield
25b8b8bd16 Quietened down debug messages 2013-11-08 12:25:35 +00:00
Robert Osfield
70c78264dc Changed the LineSegmentIntersector to RayIntersector to provide more reliable intersections with flat meshes. 2013-11-07 12:37:10 +00:00
Robert Osfield
7a2900e238 Added osgUtil::Intersector::PrecisionHint member and set it's default to USE_DOUBLE_COMPUTATIONS, and implemented support for use double or float maths internally in LineSegmentIntersector and RayIntersector classes 2013-11-07 12:35:34 +00:00
Robert Osfield
fef39b6215 Re-enabled the disable of the transfer function 2013-11-06 09:50:16 +00:00
Robert Osfield
2ebe81cb0e Fixed handling of web cams 2013-11-06 09:49:51 +00:00
Robert Osfield
6f6c44446c Introduced a cast(T) method into the ImageUtils template functor to allow code reading images to handle casting from source data to a form that a user can use more conviently 2013-11-06 09:23:21 +00:00
Robert Osfield
ef3a65b93f Restructed the call to avformat_open_input to provide more information. 2013-11-06 09:20:35 +00:00
Robert Osfield
2b3665f010 Fixed typo 2013-11-05 15:23:32 +00:00
Robert Osfield
ffb0a8e545 From Stephan Huber, "Build Problem with osgGA at MacOS with Xcode 5"..."attached you'll find a possible solution for the issue. This will add a new option to cmake called OSG_CXX_LANGUAGE_STANDARD which defaults to C++11. If you set it to C++98 it will setup the project accordingly." 2013-11-01 14:40:50 +00:00
Robert Osfield
a10e9c6950 Added initial shell of new osgtransferfunction example that will be tested bed for upcomming transfer function editing UI. 2013-10-28 17:46:07 +00:00
Robert Osfield
ff8fe4143e From Likasz Izebski, "added support for etc2/eac compression" 2013-10-28 12:03:55 +00:00
Robert Osfield
ac383e15c1 Added explict setting of the PolygonMode to over the distion mesh being toggled to wireframe. 2013-10-25 15:47:41 +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
2025c511f0 Remoed -fpermissive 2013-10-25 14:46:37 +00:00
Robert Osfield
191eabd3ab Fixed warning 2013-10-25 09:02:39 +00:00
Robert Osfield
2a9ed125b8 Fixed warning 2013-10-24 20:22:13 +00:00
Robert Osfield
b3603f76e4 Removed depreated glib call 2013-10-24 19:56:04 +00:00
Robert Osfield
95e8d2838c Fixed FileInfo self intialization bug 2013-10-24 19:32:00 +00:00
Robert Osfield
1861e025e9 Fixed build problems with the OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION off 2013-10-24 17:43:02 +00:00
Robert Osfield
ded27b4971 From Stephan Huber, "attached you’ll find a small enhancement for present3d. Now you can get advanced help via —help-all etc (similar to osgviewer)" 2013-10-24 12:15:37 +00:00
Robert Osfield
37fa2d698f From Stephan Huber, add support for controlling the OSXMenubarBehavior set by DisplaySettings. 2013-10-24 10:10:16 +00:00
Robert Osfield
234adf7daf Cleaned up addChild/getChild/setChild/getNumChildren methods and added readNodeFile, readImageFile and readObjectFile functions 2013-10-24 09:06:52 +00:00
Robert Osfield
f548bc79d4 Added support for Group::addChild/setChild/getChild/getNumChildren. 2013-10-23 16:17:26 +00:00
Robert Osfield
c45f3aa4fb Merged changes to DisplaySettings from Stephan Huber in prep for controlling the menu hiding behaviour under OSX.
Added new WindowSystemInterface::setDisplaySettings() method to provide a mechanism for passing settings onto the WindowSystemInterface so it can then set up the system appropriately.

Added assignment of the DisplaySettings to the WindowSystemInterface in Viewer/ComppsiteViewer::realize().
2013-10-22 19:12:34 +00:00
Robert Osfield
b7b7186cf8 Preliminary remapping of internalFormat for GL3 core profile 2013-10-22 18:58:15 +00:00
Robert Osfield
3dba54c10a Fixed warnings 2013-10-22 16:28:20 +00:00
Robert Osfield
1196f153fc From Colin McDonald, "The osgt/osgb file formats output a scenegraph node with the type
set to "SCENE" in the file header.  But if the file is stored and
then extracted again from an osga archive this header info is lost,
and the resulting file is just an "OBJECT".  Possibly other plugin
operations would have the same effect.  The osgt/osgb plugin won't
then return the scenegraph contents.

I have updated the osgt/osgb plugin to return a node from an "OBJECT"
file."
2013-10-22 11:32:21 +00:00
Robert Osfield
c34a8e4ddb From Colin McDonald, "The osgb file reader uses seek to position within the file.
But the nested stream implementation for osga archive files doesn't
support seeking.  So osgb files can't currently be used in an osga
archive e.g. if osgdem is used to output a osgb format database it
can't be packaged in an archive file, in the same manner that ive
files could.

I've added seek support to the osga nested stream implementation."
2013-10-22 11:26:45 +00:00
Robert Osfield
5ed399ca48 Fixed handling of osg::Program so that it's not overriden by shader composition when enabled 2013-10-22 11:18:28 +00:00
Robert Osfield
4493d11ca3 Added State::releaseGLObjects() and ShaderComposer::releaseGLObjects() to avoid problems with cleanup of graphics context 2013-10-21 16:35:12 +00:00
Robert Osfield
074eb8e41c Build fixes for clang 2013-10-21 09:54:41 +00:00
Robert Osfield
a68f0f26a8 From Farshid Lashkari, "previously discussed change to the dae loader which applies the node ID as a "dae_node_id" user value." 2013-10-18 09:57:49 +00:00
Robert Osfield
9146ba7d44 From Vladimir Chebeav, fix for removal of nested callbacks 2013-10-18 08:37:18 +00:00
Robert Osfield
5bfb2ef26d From Konstantin Matveyev, "Multiple light fix in FBX-importer" 2013-10-18 07:55:26 +00:00
Robert Osfield
bddeecdbee From Colin McDonald, "Some missing updates to the serializer static build support." 2013-10-18 07:52:18 +00:00
Robert Osfield
49625a1baf From Andreas Henne, "in my application I use the TrackballDragger, the ScaleAxisDragger and the TranslateAxisDragger. Unfortunately these draggers are very thin and they do not provide methods to change their visual appearance. Another problem that I noticed is that lighting on the cones and boxes of the TranslateAxisDragger and ScaleAxisDragger is incorrect when the draggers are scaled due to not normalized normals. This small patch adresses these problems, providing methods to make the draggers thicker. I have attached a zip archive containing the corresponding files and also a modified osgManipulator example that makes use of the modifications. I don't want to retain any copyright." 2013-10-18 07:31:22 +00:00
Robert Osfield
a97e092619 Fix for error in getting the uniform block max name length, fix suggested by Christopher Fennell. 2013-10-17 18:29:39 +00:00
Robert Osfield
7de6a0c9e2 From Stephan Huber, build fix 2013-10-17 14:02:15 +00:00
Robert Osfield
eb7c2ae3f7 Added set/get to the ImageSerializer and removed some redudent comments 2013-10-10 20:43:03 +00:00
Robert Osfield
cd86995d7d From Pjotr Svetachov, "With the new osg::Geometry the binding for arrays now default to undefined. This breaks previously working code in osgAnimation::RigTransformHardware where the arrays got an undefined bounding and because of this the bone indices and weights were not loaded by the shader. Here is a little patch to fix this." 2013-10-10 20:42:24 +00:00
Robert Osfield
08ec0a11bf From Laurens Voerman, compile fix for VisualStudio 2013-10-10 14:45:57 +00:00
Robert Osfield
0dc55ebc86 Laurens Voerman, "my cmake (2.8.10.2 generating for Visual Studio 11 Win64) doesn't like
include(${CMAKE_MODULE_PATH}/FindPackageHandleStandardArgs.cmake)
in CMakeModules/FindLua52.cmake
changing to a more common
    include(FindPackageHandleStandardArgs)
solves my problem."
2013-10-10 14:41:41 +00:00
Robert Osfield
4e4d2b35cf Added get/set method to Serializer to allow pointer passing without going through InputStream/OutputStream. 2013-10-10 09:28:26 +00:00
Robert Osfield
9c53794bc7 Implemented preliminary readNode/readImage support in the lua plugin allow a lua script to create a scene graph as return it. 2013-10-09 15:32:56 +00:00
Robert Osfield
e8b5272b02 From Stephan Huber, "attached you’ll find a bunch of fixes + enhancements for iOS and OS X based on current trunk. I incorporated + tested the submission from Colin Cochran, so his submission is not needed anymore.
* fixed a bug with multi-touch and touch-id-generation on iOS and OS X. (will fix a bug reported by Colin Cochran, without ditching the existing logic)
* removed unnecessary warning-flagss when generating xcode-projects via cmake, will enable the usage of OSG_AGGRESSIVE_WARNING_FLAGS
* added support for 10.9 (OS X)
* new cmake-variable: IPHONE_VERSION_MIN, this will set the deployment-target (previously hard-coded) If you set the IPHONE_VERSION_MIN to something like 7.0 osg gets compiled also for 64bit (amd64)
* cmake defaults now to the clang compiler if IPHONE_VERSION_MIN > 4.2
* cmake now sets some xcode-settings so the compiler uses the c++98-standard (clang defaults to c++11, w/o this I got a lot of linking errors)
* removed include-dir for avfoundation-plugin as not needed on OSX/IOS.
* enhanced the ios-example, will now show multitouch-information on a hud (similar to the  osgmultitouch-example), and more importantly, will compile + link out of the box
* small enhancements for the osc-device-plugin (send only one msg for MOVE/DRAG, even if multiple msgs/event is enabled)
* better memory-handling for the zeroconf-plugin
* fixed a possible bug in the rest-http-plugin when receiving mouse-events.
* incorporated a fix from Colin Cochran "forwarded touch events are not transformed into the GL UIView“
"
2013-10-07 10:05:09 +00:00
Robert Osfield
20fbad6c29 Cleaned up line endings 2013-10-07 09:33:46 +00:00
Robert Osfield
da2d7e2dde Added support for automatically select Lua 5.2 is it's available, then falling back to checking for Lua 5.1 otherwise. 2013-10-04 20:42:23 +00:00
Robert Osfield
d260b16981 Moved code across to use lua_userdata to manage pointer to osg::Object that is ref()/unref() 2013-10-04 19:48:03 +00:00
Robert Osfield
79e2d1309f Added support for Lua 5.2 and osg::Object creation from within Lua scripts. 2013-10-04 16:30:25 +00:00
Robert Osfield
c77dc4fe9e Added createObject() interface 2013-10-04 16:29:45 +00:00
Robert Osfield
b5b020a138 Updated version number after 3.3.0 dev release 2013-10-04 16:28:49 +00:00
Robert Osfield
910cfeea60 Fixed errors in Contributors list 2013-10-03 16:20:29 +00:00
Robert Osfield
83c396b13b From Jan Peciva, RayIntersector implementation 2013-10-03 08:45:57 +00:00
Robert Osfield
69f2fb56b3 From Colin McDonald and Robert Osfield, "When a serializer shared library is loaded it registers all of
the wrappers it contains.  The registration creates a prototype
object for all of the wrapped classes.  For some of the higher-level
classes this can be a bit heavy.

I noticed a problem with a model which required a single class from
osgSim.  When osgdb_serializers_osgsim.so was loaded it registered
wrappers and created prototype objects for all of the osgSim classes,
including osgSim::ScalarBar.  The constructor for that class creates
several drawables, and loads arial.ttf using the freetype plugin.  I
don't need that, and don't even ship the font or plugin with my
application, resulting in an unexplained warning message loading
the model.

I've modified the ObjectWrapper class to defer the prototype object
creation until if & when actually required."
2013-10-02 13:59:00 +00:00
Robert Osfield
0ec35d5a5d From Dmitry Marakasov, "These are FreeBSD bits for src/osgPlugins/osc/osc/OscHostEndianness.h,
required to build newever OSG on this OS. Also corrects file name
in the error message - I was confused not to find OSCHostEndianness.h
after I've got this error.

Tested by successfully building OSG 3.2.0 with this patch on FreeBSD
9.1."
2013-10-02 11:29:58 +00:00
Robert Osfield
0eb435e118 Re-ordered the public/protected sections to keep the public section all together 2013-10-02 11:28:38 +00:00
Robert Osfield
60d4b71d2b From Björn Hein, "it seems that for generating "per vertex normals" as stated in the
comment, two of them are missing. This results in wrong display of
STL-files regarding normals. Following simple fix seems to work:

Index: ReaderWriterSTL.cpp
===================================================================
--- ReaderWriterSTL.cpp    (Revision 13797)
+++ ReaderWriterSTL.cpp    (Arbeitskopie)
@@ -108,6 +108,8 @@
                     ++itr)
                 {
                     perVertexNormals->push_back(*itr);
+                    perVertexNormals->push_back(*itr);
+                    perVertexNormals->push_back(*itr);
                 }

                 geom->setNormalArray(perVertexNormals.get(),
osg::Array::BIND_PER_VERTEX);
"
2013-10-02 11:09:29 +00:00
Robert Osfield
59caf4a48e Fixed build with no automatic ref_ptr<> conversion 2013-10-01 19:34:21 +00:00
Robert Osfield
fcc14e467a Updated AUTHORS files 2013-10-01 19:31:48 +00:00
Robert Osfield
11168fea66 Updated ChangeLog in prep for dev release 2013-10-01 19:00:02 +00:00
Robert Osfield
5015ec4b5d From Aurelien Albert, "I'm working with OSG and a customer low-level OpenGL library.
To make easier "lazy apply" on the customer OpenGL shaders, the easiest way was to add an accessor to current OSG state's UniformMap.

I've also added accessors for modes and texture, since it could be usefull in the same way.

All methods are const, so I think there is no side-effects."
2013-10-01 17:01:21 +00:00
Robert Osfield
270883d3f4 From Björn Blissing, "I propose making the following outputs a little bit more silent. In my mind it would suffice with OSG_DEBUG (compared to OSG_NOTICE) for these information messages." 2013-10-01 16:20:20 +00:00
Robert Osfield
c399db82a3 From Christopher Baker, submitted by Alberto Luacas, "there is a bug report in the Ubuntu tracker that points to a bug when
loading multiple VRML files in parallel.  Christopher R. Baker has
detected this bug and crafted a patch.  In addition, libcoin has to be
also built with the "--enable-threadsafe" option.

I copy here his report, extracted from
(https://bugs.launchpad.net/ubuntu/+source/openscenegraph/+bug/1211993)
and attach his fix.  All credit is due to him:

«
There are three instances of a classical method-local-static
multithreaded initialization bug in the Inventor plugin for OSG that
trigger various memory faults when reading multiple VRML files in
parallel via osgDB::readNodeFile. These bugs are of the form:

static std::map<Stuff,OtherStuff> myHandyMap;
static bool once = true;
if(once) { ...fill myHandyMap; once = false }
... use myHandyMap;

To repeat: try loading multiple VRML files from multiple threads. The
liklihood of the bug depends on many factors, but my application, which
parallel-loads some dozens of small (<100K) VRML files on startup,
triggers this problem 25% of the time or more.

The attached patch (inventor-plugin-multithread.patch) rectifies this
problem by:

1 - Inheriting MyHandyMap from std::map, then
2 - Moving the map initialization into the derived constructor, which
3 - Is intrinsically protected from multithread issues by g++ (and is
part of the C++ standard), unless you pass -fno-threadsafe-statics,
which is strongly discouraged by the man page.
»
"
2013-10-01 09:37:56 +00:00
Robert Osfield
76d833f332 From Adrien Grandemange, "On Windows 7 and 8, mouse messages are generated in addition to touch messages, which leads to duplicate PUSH, DRAG and RELEASE events in OSG. Besides, the mouse and touch messages referring to the same user input are not necessarily sent at the same time, due to gesture translation done by Windows by default, such as double-tap => double-click and long-push => right-click.
The delay between the 2 types of messages is more noticeable on Windows 8 and leads to serious disruptions in our application.

Mouse messages generated by touch input are only present for legacy support. I think they should be filtered out by OSG (real click events originating from a physical mouse will of course still go through).

This is what this patch does, according to this suggestion: http://msdn.microsoft.com/en-us/library/dd693088%28v=VS.85%29.aspx (third issue in this page)."
2013-10-01 09:11:26 +00:00
Robert Osfield
68c22efa58 From Thomas Hogarth, "Attached is a small build fix for PointSprite when compiling under GLES2 (r13788)
GL_POINT_SPRITE_OES does not exist in GLES2, instead you just draw using GL_POINTS then use gl_PointSize in a vertex shader to set the size."
2013-10-01 09:05:18 +00:00
Robert Osfield
c626b0e1f6 From Jeffrey Kinross, "I ran into an issue with case sensitivity on OS X and the OSXAVFoundation code.
In CMakeList.txt there is a case sensitivity issue which a fix was posted by Robert Osfield in the users forum.

I also had to rename the files OSXAvFoundationCoreVideoTexture.h and OSXAvFoundationCoreVideoTexture.cpp to OSXAVFoundationCoreVideoTexture.h and OSXAVFoundationCoreVideoTexture.cpp

Finally in OSXAvFoundationCoreVideoTexture.cpp the include OSXAVFoundationVideo.H was updated to OSXAVFoundationVideo.h"
2013-09-30 18:32:41 +00:00
Robert Osfield
d304ed7d73 From Farshid Lashkari, "I have a scene that makes heavy use of the StateSet::compare method and my profiler showed that a lot of time was being spent inside it. I made a small change to the method so that it performs a quick size comparison between the attribute/mode lists and bin mode before iterating through all the attributes. This made a noticeable improvement in my scene. I've attached the change." 2013-09-30 18:15:51 +00:00
Robert Osfield
0ba856a637 2013-09-30 10:28:14 +00:00
Robert Osfield
8bc85764ff Unified Vec/Plane/Quat handling code. 2013-09-27 18:43:35 +00:00
Robert Osfield
ff925f1d86 Added support for getting Vec* and Matrix objects from Lua stack and assigning them as OSG object properties. 2013-09-27 13:04:04 +00:00
Robert Osfield
43cb1b3a41 Initial cut of setting and getting osg::Object properties within Lua scripts 2013-09-26 17:27:49 +00:00
Robert Osfield
6d8f40d13a Added support for passing parameters in and out of scripts.
Implemented support for osg::ValueObject in LuaScriptEngine.
2013-09-24 15:17:42 +00:00
Robert Osfield
796314c339 Changed NodeVisitor so that is subclasses from osg::Object rather than osg::Referenced to enable it to be used with serialization and scripting 2013-09-24 15:08:23 +00:00
Robert Osfield
874a7ed3b3 Removed redundent spaces 2013-09-24 08:56:47 +00:00
Robert Osfield
351f98b10d Added test for osgGA::GUIEventAdapter 2013-09-23 14:10:36 +00:00
Robert Osfield
3af70f13a3 Removed unnceccesary setNumChildrenRequiringUpdateTraversal from VolumeTile constructor. 2013-09-20 15:43:24 +00:00
Robert Osfield
8f3ee7c649 Added initial cut of white and black lists 2013-09-20 10:44:24 +00:00
Robert Osfield
6bc413530e Added compoundClassName() convinience method to standardize the generation of the compoundClassName. 2013-09-20 10:25:23 +00:00
Robert Osfield
6e3f893a0e Added type maps to help with querrying supported type names 2013-09-20 10:04:50 +00:00
Robert Osfield
250d9f2ed7 Introduce osgDB::PropetyInterface class that provided a generic interface for get/setting properties on scene graph objects, utilizing the osgDB serializers to do
the actual interface query and set/gets.
2013-09-19 16:19:32 +00:00
Robert Osfield
f42481b60f Removed unneccessary return 2013-09-19 16:18:20 +00:00
Robert Osfield
24ecfb1a48 Added access methods to Serializer to help with using wrappers for other purposes such as script integration.
Added Vec*i and Vec*ui support to serializers
2013-09-11 15:44:08 +00:00
Robert Osfield
31cd80cea7 From Giuseppe Donvito, "I'm using OSG 320 and I need to flush a DDS 3D texture on disk.
I found a bug on DDS ReaderWriter that generates a false positive on a guard for the size check on writing operation. This is due to a wrong imageSize computation that uses img->getImageSizeInBytes() method instead of img->getTotalSizeInBytes(), that actually ignores the r() dimension, contrariwise taken into account by the function ComputeImageSizeInBytes() later.

The line 1062 on file ReaderWriterDDS.cpp should be fixed with:
[code]unsigned int imageSize = img->getTotalSizeInBytes();[/code]
"
2013-09-10 15:17:59 +00:00
Robert Osfield
82bbcef117 From Giuseppe Donvito, Fixed typo of "CLEAR_GLOBAL_STATESET = 0x16," to indended "CLEAR_GLOBAL_STATESET = "0x10". 2013-09-10 13:29:28 +00:00
Robert Osfield
898c716841 Added osgPresentation::Show node and implementations with basic property reporting for various internal nodes of presentation graph 2013-09-10 09:23:30 +00:00
Robert Osfield
085bfd83d7 From Wang Rui, "The Python header will look for its libraries using "#pragma comment(lib,"python32_d.lib")" for MSVC. So user-specified libraries will not really be set for the osgdb_python plugin. This small fix may help locate the Python libraries after putting the CMakeLists.txt into src/osgPlugins/python
"
2013-09-09 16:02:32 +00:00
Robert Osfield
27b57dbf0c From Colin Cochran, OES support for point sprites 2013-09-09 14:58:25 +00:00
Robert Osfield
e9697859bd From Colin McDonald, "Add test for GL_EXT_framebuffer_object extension : osg uses osg::FBOExtensions to check if Frame Buffer Objects are
available.  But this just checks if the fbo functions can be called.
It doesn't check if the OpenGL renderer supports fbos.  For indirect
rendering on linux the client side capability may be different from
the display server, which can lead to mipmapped textures failing to
render.  I've added a fbo extension check.
"
2013-09-09 13:33:13 +00:00
Robert Osfield
b20a74b017 From Ulrich Hertlein, "Patch for FindAVFoundation to work with OS X 10.9" 2013-09-09 12:44:36 +00:00
Robert Osfield
80456598e0 From Wang Rui, "Some developers report that the osgviewerMFC example is broken in 3.2, in which depth test is not enabled by default so all models loaded look awkward. I submit this patch to make it work again. I haven't gone deep to check why previous example goes wrong in newer version but I believe the problem was because the newly created camera object missed some important global statesets before set as the main camera." 2013-09-09 12:37:52 +00:00
Robert Osfield
61ccd56d25 From Laurens Voerman, "two minor fixes, both in a CMakeList.txt file,
1> osgmultiplemovies example does not use SDL so needs no link to SDL

2> Added header files to "Plugins osg" project, so visual studio can find the source of
   OSG_WARN <<  "AsciiInputIterator::readProperty(): Unmatched property "
"
2013-09-09 12:33:18 +00:00
Robert Osfield
7050c59cae Initial cut of Audio/Volume/Movie/Image presentation objects 2013-09-06 09:35:56 +00:00
Robert Osfield
df48d440e4 From Colin McDonald, "Attached are some fixes to build osg using the Solaris Studio compiler.
I've also checked the modified files still build ok with other
compilers (Linux gcc, Windows Visual Studio).

osgDB/OutputStream.cpp and osgPlugins/lws/SceneLoader.cpp require
stdlib.h for atoi use.

In osg/Uniform.cpp the compiler complains that base_class is unknown
unless I add a class name qualifier.

Not a build fix, but I spotted a typo in osgUtil/SceneView."
2013-09-05 10:23:05 +00:00
Robert Osfield
94735a8364 From Laurens Voerman, "like the "Bug in ProxyNode serializer" Farshid Lashkari found (svn submit 13754) the PagedLOD serializer attempts to read begin and and brackets.
Fix is identical (don't read brackets when num_chidren is zero) and applies both to trunk and 3.2 branch."
2013-09-05 10:08:09 +00:00
Robert Osfield
19f84b52e7 Fixed warnings 2013-09-05 10:04:56 +00:00
Robert Osfield
0d2825e06f From Alberto Luaces, "current versions of ffmpeg render «url_feof» macro as obsolete. The fix
is very simple and it is contained in the attached file."
2013-09-05 08:42:00 +00:00
Robert Osfield
73250601f0 Added missing Model.cpp 2013-09-05 08:22:27 +00:00
Robert Osfield
9201cf8d00 Moved the property test from the model to presentation to test out the property inheritance scheme 2013-09-04 17:27:26 +00:00
Robert Osfield
856ec46467 Added PrintProperties visitor 2013-09-04 16:25:18 +00:00
Robert Osfield
ccf7bbdb50 Added PrintPropertiesAction to osgPresentation 2013-09-04 15:39:17 +00:00
Robert Osfield
9f5e131203 Added Action class NodeVisitor that supports osgPresentation nodes. 2013-09-04 10:33:11 +00:00
Robert Osfield
3c106e4dd7 Added test for osgPresentatation::Group::getSupportedProperties() 2013-09-03 15:50:28 +00:00
Robert Osfield
fdfe3210ce Added beginings of Text implementation 2013-09-03 10:17:06 +00:00
Robert Osfield
f5deda56a6 From Farshid Lashkari, "The ProxyNode serializer was not correctly reading the "Children" field. It conditionally writes the begin/end brackets, depending on whether it has children. However, during input it unconditionally attempts to read the begin/end brackets. I've modified the code to only read the brackets if it has children." 2013-09-02 10:56:48 +00:00
Robert Osfield
b9ecec6452 Refactored the use of epsilon in the clamping of the start/end points of the LineSegmentIntersector to better handle numerical precision issues. 2013-09-02 10:56:14 +00:00
Robert Osfield
698365e47f Fixed double copy in StackedTransform copy constructor 2013-09-02 09:12:24 +00:00
Robert Osfield
7c78101621 Added IO test for new osgPresentation nodes 2013-09-02 08:29:09 +00:00
Robert Osfield
820ba45fab Added Audio, Image, Movie, Model and Volume class to osgPresentation. 2013-09-01 17:24:35 +00:00
Robert Osfield
de428146b9 Fixed build 2013-08-23 16:47:27 +00:00
Robert Osfield
ef32fab30e Added color property to FontData parsing 2013-08-23 11:42:52 +00:00
Robert Osfield
d7038e1be1 Quitened down debug message 2013-08-22 13:39:36 +00:00
Robert Osfield
11685a3e0c Removed debug messages 2013-08-22 12:37:49 +00:00
Robert Osfield
79c9aa7d02 Quitened down debug message 2013-08-22 12:07:55 +00:00
Robert Osfield
ffa58776fe Quitened down debug message 2013-08-22 11:18:45 +00:00
Robert Osfield
db449b9e09 Added warning when model file has not be found 2013-08-22 10:09:21 +00:00
Robert Osfield
464628b5c4 Reduced debug message level, and added a notify message for when an image isn't loaded 2013-08-22 10:05:29 +00:00
Robert Osfield
fcde15e136 Added test for serializers and fixed serializers 2013-08-22 07:49:22 +00:00
Robert Osfield
c678fed113 Added initial classes for present3D refactor 2013-08-21 19:54:03 +00:00
Robert Osfield
4e3715d4bb Moved old osgPresentation source files to osgPresentation/deprecated subdirectory. 2013-08-18 18:10:39 +00:00
Robert Osfield
28ce02915a Moved old present3D sources into local deprecated directory to clean up the main present3D source directory for future refactored present3D 2013-08-18 16:59:11 +00:00
Robert Osfield
bd7ec9c5f7 Added initial cut of basic scripting support, introducing an osg::Script object to wrap up the individual scripts, osg::ScriptCallback for assigning a Script as node callback and an osg::ScriptEngine base class that plugins implement to provided support for specific scripting languages.
Provided are lua, python and V8 (for javascript) plugins that just open up enough of a link to the respective libs to run a script, there is no scene graph <-> script communication in current implementation.
2013-08-09 16:51:06 +00:00
Robert Osfield
babd6e0ee7 Removed CameraNode reference 2013-08-09 11:00:55 +00:00
Robert Osfield
eba9291e5c Removed unused includes 2013-08-09 07:46:22 +00:00
Robert Osfield
ef88a54125 Removed old cursor code 2013-08-09 07:38:32 +00:00
Robert Osfield
93ebfd6217 Added translucent version of cushion which isn't depth tested to enable one to see the cursor even when it's behind other objects 2013-08-08 17:21:20 +00:00
Robert Osfield
82401defc7 Added osgPresentation::Cursor class to wrap up 3D cursor in the scene functionality 2013-08-08 16:49:33 +00:00
Robert Osfield
835ee7aa8e Added osgpresentation example as a test bed for new osgPresentation object model.
First cut of example test bed is to test how easy it is to build against Lua, V8 and Python for purposes of running embedded scripts.
2013-08-07 17:08:38 +00:00
Robert Osfield
0c609bc17e From Aurelien Albert, "I've go some problem with the method "State_Utils::replace" : if the original_phrase is empty, it leads to an infinite loop.
Here is a path to prevent this."
2013-08-05 12:00:34 +00:00
Robert Osfield
90703f99ee Added missing initializer for _epsilon 2013-08-01 17:38:34 +00:00
Robert Osfield
5f6a1f4093 From Anish Thomas, added catch for to an empty DrawElementsUInt creation. 2013-08-01 11:25:02 +00:00
Robert Osfield
b69745f178 Updated ChangeLog and AUTHORS file 2013-08-01 10:38:02 +00:00
Robert Osfield
14f63cbe67 From Ulrich Hertlein, "Based on the exchange on osg-users I went ahead and reworked shp/XBaseParser to avoid
weird behaviour (closing stdin) and leaking file descriptors, as well as some const-ness."
2013-08-01 10:28:12 +00:00
Robert Osfield
46ec50aecb From Sebastian Messerschmidt, "Seems like your re-factoring didn't really produces the correct results.
You can check with the tester2.flt provided earlier and check with the result image.
I double checked this with OpenFlight creator, and it seems the yaw is broken.

With my initial quaternion version is seems correct and if I change the


float cos_yaw = cosf(osg::inDegrees(yaw));
float sin_yaw = sinf(osg::inDegrees(yaw));

to be
float cos_yaw = cosf(osg::inDegrees(-yaw));
float sin_yaw = sinf(osg::inDegrees(-yaw));

it seems to work as well."
2013-08-01 10:04:05 +00:00
Robert Osfield
837a680849 From Tom Jolley, "I found a couple more bugs after closely looking at the small piece of deprecated geometry in my model. There were problems with more than one primitive in a couple places. The first was the number of vertices were not being accumulated for DrawArraysPrimitiveType (caused another crash). The second is I had to move target_vindex and source_pindex before the PrimitiveSetList loop so they don't get reset on the next primitive (otherwise you end up with a lot of zeros in per vertex lists)." 2013-08-01 10:00:31 +00:00
Robert Osfield
07365c1073 Added osg::RenderInfo::pushRenderBin()/popRenderBin() and RenderInfo::getRenderBinStack() and getCameraStack() access methods for getting access to the current RenderBin/RenderStage. 2013-08-01 07:19:45 +00:00
Robert Osfield
364e2765e7 Added Intersector::get/setEpsilon(double) to allow users to control what epsilon is used by the LineSegmentIntersector when doing testing of itersections with bounding boxes 2013-07-31 13:11:49 +00:00
Robert Osfield
9c9939e5d4 From Aurelien Albert, "Here is the code to get access to OpenGL handle of an osg::FrameBufferObject" 2013-07-31 07:11:07 +00:00
Robert Osfield
9878a83894 From Tom Jolly, "I ran across this error reading one of our older files. An iterator was being changed inside a loop that caused a crash." 2013-07-31 06:56:31 +00:00
Robert Osfield
56cb7de72a From Sergey Kurdakov, fixed GLES2 invalid enumerant warning by disabling the check against GL_MAX_TEXTURE_COORDS under GLES. 2013-07-31 06:42:49 +00:00
Robert Osfield
52761f2c29 Changed default cull mask to match the left cull mask so that mono rendering of presentations with left/right stereo images/movies works fine. 2013-07-30 06:39:33 +00:00
Robert Osfield
fb8db6cb73 Removed trailing spaces 2013-07-30 06:36:49 +00:00
Robert Osfield
846001f06d Merged from OSG-3.2 branch the removal of check for Asio under Windows 2013-07-30 06:12:31 +00:00
Robert Osfield
0620f249a5 Changed default of serialize draw to off 2013-07-24 17:30:46 +00:00
Robert Osfield
019bccfa6f Pulled in READE, NEWS and AUTHORS changes from OSG-3.2 branch. 2013-07-24 14:24:33 +00:00
Robert Osfield
75fd039dba Added GL2Extensions::isDrawBuffersSupported() and usage of this in FrameBufferObject.cpp to prevent crash under GLES2 when users attempt to use MRT when it's not supported 2013-07-24 13:02:32 +00:00
Robert Osfield
9b733baf02 Updated NEWS from OSG-3.2 branch 2013-07-24 12:51:13 +00:00
Robert Osfield
ee5a1b0a83 Fixed warning 2013-07-24 12:48:59 +00:00
Robert Osfield
8d3e46dfac Updated SO version for post 3.2 era. 2013-07-24 12:25:18 +00:00
Robert Osfield
75226e6b68 Added getCallbacks() methods 2013-07-24 12:17:06 +00:00
Robert Osfield
085d3af14c From Rocco Martino, build fix for compiling against ffmpeg/trunk 2013-07-23 18:11:35 +00:00
Robert Osfield
ca3efe6bdc Added NOT ANDROID to force use of posix API when building for Android under Windows 2013-07-23 15:28:31 +00:00
Robert Osfield
c21b60b038 Added lazy setting of the UserDataContainer to avoid unncessarily create a UserDataContain when an empty description list is passed to Node::setDescriptions(..) 2013-07-23 10:24:28 +00:00
Robert Osfield
51075421d3 Fixed crash when open(..) returns an error. 2013-07-23 09:54:25 +00:00
Robert Osfield
f6c3c8ac00 From Torben Dannhauer, "Please find attached further changes to make library auto detection
functional again for some libraries:

Find3rdPa..: Fix to find libxml2
FindCollada: Rearranged to handle different MSVC versions more effective.
This file is already prepared for the upcoming VS 2013.
FindNVTT: introduced management of debug libraries (also auto detected).
"
2013-07-23 05:25:39 +00:00
Robert Osfield
fcca4032ef From Andreas Ekstrand, "Attached is a small modification of the Collada writer that protects from crashes due to valArray being NULL in some situations." 2013-07-22 13:31:32 +00:00
Robert Osfield
a802729562 Added FRAME_BUFFER_OBJECT enum 2013-07-22 10:15:59 +00:00
Robert Osfield
95d5a19319 Updated OpenThreads version 2013-07-22 10:15:44 +00:00
Robert Osfield
4a2e1534d5 From Christian Ruzicka, "with the current touch implementation on iOS the touches are not forwarded to parent views because the base implementation is not called. Also see the "Best Practices" in the iOS documentation for event handling:
http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/multitouch_background/multitouch_background.html

"If you handle events in a subclass of any other UIKit responder class:
- You do not have to implement all of the event handling methods.
- In the methods you do implement, be sure to call the superclass implementation. For example, [super touchesBegan:touches withEvent:event]."

I added the missing lines and tested it with OSG 3.1.9 and iOS SDK 6.1."
2013-07-19 21:05:54 +00:00
Robert Osfield
f21a1dc9ad Added default setting of BIND_PER_VERTEX when applying Geometry::setTexCoordArray() 2013-07-19 20:59:09 +00:00
Robert Osfield
b3aa1bda1d Updated OpenThreads version to be in sync with OSG version 2013-07-19 17:00:24 +00:00
Robert Osfield
cda0b615de Updated version number for svn/trunk to 3.3.0 for all new feature development 2013-07-19 14:55:36 +00:00
2050 changed files with 209201 additions and 178287 deletions

11
.codedocs Normal file
View File

@@ -0,0 +1,11 @@
# CodeDocs.xyz Configuration File
DOXYFILE = doc/Doxyfiles/doxyfile.cmake
PROJECT_NUMBER =
PROJECT_LOGO = examples/osgAndroidExampleGLES1/res/drawable-hdpi/osg.png
INPUT = include
STRIP_FROM_PATH = include/
HTML_FOOTER =
SEARCHENGINE = YES

106
.gitignore vendored Normal file
View File

@@ -0,0 +1,106 @@
doc/all_Doxyfile
doc/auto_Doxyfile
doc/core_Doxyfile
doc/openscenegraph.doxyfile
doc/openthreads.doxyfile
doc/OpenSceneGraphReferenceDocs/
doc/OpenThreadsReferenceDocs/
doc/*.chm
CMakeDoxyfile.in
CMakeDoxygenDefaults.cmake
cmake_uninstall.cmake
include/OpenThreads/Config
include/OpenThreads/Version
include/osg/Config
include/osg/GL
include/osg/Version
include/osgQt/Version
src/osgQt/__
lib/
bin/
*.pc
*.conf
CMakeCache.txt
CMakeFiles
CMakeScripts
Makefile
cmake_install.cmake
install_manifest*.txt
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# Automatically generated Package files
packaging/cmake/*
configure/*
# Platform Specifics - auto generated files
PlatformSpecifics/Windows/*.rc
# Visual studio - project files
*.sln
*.suo
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
# Visual Studio - Build Results
[Dd]ebug/
[Rr]elease/
[Mm]in[Ss]ize[Rr]el/
[Rr]el[Ww]ith[Dd]eb[Ii]nfo/
# Visual Studio - Browsing Database File
*.sdf
*.opensdf
# Visual Studio - Cache/Options Directory
.vs/
.vscode/*
#osx xcode
DerivedData/
*.DS_Store
*.build
*.xcodeproj
#CPACK related files
CPackConfig-*.cmake
_CPack_Packages/
#packages
*.tar.gz
*.zip

68
.travis.yml Normal file
View File

@@ -0,0 +1,68 @@
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "0ROQiFbsZo33ce2v5VjBxNljemh/HU70ntSSPygYwaDFymubts/62SixXVkbKNIFdrs3uYD6qeA/eMmpqXxLcs+PXNq5NrH7eSWw9oDIKMhq3NQH/IZLdRfXwihHimZ1qEs/TXyWlT2aC4rpBi1py3cJeTh1aBMlz4V/nm16iRAgc596ThNTuPDHa0F9/gZnwccI/Rr9VpiYn7vEBbuY9lYr43D0G3NuuQyvvlHShroH09fh6KyFOWIY38AQtnuVGNC1fIiAUk7TUqDqSBwhIrUV5saHbP0kca6DP32REkv//h4JwM76UHv+ntVEoK/UiztJHMkrw71gXYTyvIvlDBpT+IDoeIwUW2QFNQ5zJZI7FM8k0+oeK+F7k/mkffDzr1zww/PQoxqFBF0PoxAni/L9qkA4X2o1A6mRDbe9besp2LQG6Vniwj3bHpCId2QiiMrANVg0EAqkcL2mVFEaqZsh90qCkr1UDq4WQoYbXh0Fy3UnQpbuxDvCME8u03lwuv6ds/SBxc5cgKv7oWXgezaDg7/OCR+0lIAGuLqmNRD8Xw7a0WZGmSbYCHIZmeyFja2KuUvMiVCt8+QsyZr3e523DwBwnSj1BIYFRstMaSEJgu9B8rfTRRllOOKJXCQtdFVuGu8VI6PniSAkI6c535yOWzsuS8HwIkN2ll+Wn7E="
language: cpp
cache: ccache
matrix:
fast_finish: true
include:
#Linux build
- os: linux
dist: trusty
language: cpp
env:
# - CMAKECMD_ARGS="-DBUILD_OSG_EXAMPLES=ON -DBUILD_OSG_PLUGINS_BY_DEFAULT=ON -DBUILD_OSG_APPLICATIONS=ON"
- CMAKECMD_ARGS="-DBUILD_OSG_EXAMPLES=OFF -DBUILD_OSG_PLUGINS_BY_DEFAULT=ON -DBUILD_OSG_APPLICATIONS=ON"
#- LLVM_VERSION=3.8
sudo: false
cache:
apt: true
ccache: true
compiler:
#- clang
- gcc
addons:
coverity_scan:
project:
name: "openscenegraph/OpenSceneGraph"
description: "OpenSceneGraph build"
notification_email: robert@openscenegraph.com
build_command_prepend: "cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_OSG_DEPRECATED_SERIALIZERS=OFF -DBUILD_OSG_EXAMPLES=OFF ."
build_command: "make -j 4"
branch_pattern: coverity_scan
apt:
sources:
#- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
packages:
#- clang-3.8
- g++
- cmake
# # OSX build
# - os: osx
# before_install:
# - brew update
# install:
# - brew install ccache
# - export PATH="/usr/local/opt/ccache/libexec:$PATH"
# env:
# - CMAKECMD_ARGS="-DBUILD_OSG_EXAMPLES=OFF -DBUILD_OSG_PLUGINS_BY_DEFAULT=ON -DBUILD_OSG_APPLICATIONS=ON"
#
#
# - os: osx
# before_install:
# - brew update
# install:
# - brew install ccache
# - export PATH="/usr/local/opt/ccache/libexec:$PATH"
# env:
# - CMAKECMD_ARGS="-DBUILD_OSG_EXAMPLES=ON -DBUILD_OSG_PLUGINS_BY_DEFAULT=OFF -DBUILD_OSG_APPLICATIONS=OFF -DBUILD_OSG_DEPRECATED_SERIALIZERS=OFF"
script:
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then mkdir build && cd build && travis_wait 60 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../product $CMAKECMD_ARGS ../ ; fi
- if [ -f CMakeCache.txt ]; then make -j4 ; fi

View File

@@ -1,6 +1,6 @@
OpenSceneGraph Library 3.2.0
OpenSceneGraph Library 3.6.4
510 Contributors:
570 Contributors:
Firstname Surname
-----------------
@@ -8,103 +8,111 @@ Robert Osfield
Don Burns
Stephan Huber
Paul Martz
Laurens Voerman
Farshid Lashkari
Mathias Fr<46>hlich
Marco Jez
Farshid Lashkari
Wang Rui
Jean-S<>bastien Guay
Mike Weiblen
Ulrich Hertlein
Mike Weiblen
Sukender
Eric Wing
Sukender
Cedric Pinson
Brede Johansen
Bob Kuehne
Wojciech Lewandowski
Michael Platings
Geoff Michel
Wojciech Lewandowski
Eric Sokolowsky
David Callu
Trajce Nikolov
Colin McDonald
Trajce Nikolov
Tim Moore
Martin Lavery
Laurens Voerman
Tree
Mattias Helsing
Jannik Heller
Jason Beverage
Tree
Pjotr Svetachov
Luigi Calori
Alberto Luaces
Mike Wittman
Jan Peciva
Chris Hanson
Roland Smeenk
Roger James
Jeremy Moles
Jason Beverage
Jan Peciva
Andy Skinner
J.P. Delport
Mattias Helsing
Magnus Kessler
David Fries
Andy Skinner
Paul Melis
Alberto Luaces
Luc Frauciel
Tom Jolley
Paul Melis
Jordi Torres
Luc Frauciel
Aurelien Albert
Torben Dannhauer
Pavel Moloshtan
Brad Christiansen
Terry Welsh
Olaf Flebbe
Mathieu Marache
Lionel Lagarde
Jason Daly
Art Tevs
Philip Lowman
Per Fahlberg
Norman Vine
Terry Welsh
Serge Lages
Lionel Lagarde
Chris Denham
Alberto Farre
Sherman Wilcox
Robert Michael
Serge Lages
Romano Jos<6F> Magacho da Silva
Mourad Boufarguine
Alberto Farre
Glenn Waldron
Andr<EFBFBD> Garneau
Adrian Egli
Ruben Lopez
Sebastian Messerschmidt
Randall Hopper
Kristofer Tingdahl
Jan Ciger
Glenn Waldron
Ruben Lopez
Robert Michael
Gideon May
Don Tidrow
Aurelien Albert
Torben Dannhauer
Stephane Lamoliatte
Romano Jos<6F> Magacho da Silva
Michael Gronager
Martin Naylor
Joakim Simonsson
David Spilling
Daniel Sj<53>lie
Bryan Thrall
Fabien Lavignotte
Andreas Ekstrand
Rafa Gaitan
Mike Connell
Konstantin Matveyev
Fabien Lavignotte
Thomas Hogarth
Riccardo Corsi
Melchior Franz
Johannes Baeuerle
Andreas Ekstrand
Riccardo Corsi
Rafa Gaitan
Ravi Mathur
Neil Hughes
Martin Beckett
Marc Helbling
Joran Jessurun
Gino van den Bergen
Frederic Marmond
David Guthrie
Csaba Halasz
Cory Riddell
Chuck Seberino
Boris Bralo
Yefei He
Thomas Hogarth
Sondra Iverson
Simon Julier
Rune Schmidt Jensen
Ralf Habacker
Rainer Oder
Nico Kruithof
Martin Aumueller
@@ -112,20 +120,24 @@ Mario Valle
Lukasz Izdebski
Jorge Izquierdo Ciges
Gordon Tomlinson
Frederic Marmond
Frederic Bouvier
Carlo Camporesi
Ben Discoe
Bj<EFBFBD>rn Blissing
Alexander Sinditskiy
Vladimir Chebaev
Thibault Genessay
Sasa Bistrovic
Ravi Mathur
Ralf Habacker
Pjotr Svetachov
Raymond de Vries
Neil Groves
Mikhail Izmestev
Markus Trenkwalder
Loic Dachary
Joseph Steel
John Shue
Hartwig Wiesmann
Brad Colbert
Ben Discoe
Vivek Rajan
Uwe Woessner
Tony Horrobin
@@ -133,6 +145,7 @@ Thom DeCarlo
Tatsuhiro Nishioka
Tanguy Fautr<74>
Sean Spicer
Ryan Kawicki
Richard Schmidt
Peter Hrenka
Paul de Repentigny
@@ -144,20 +157,17 @@ Martins Innus
Maciej Krol
Lilin Xiong
Leandro Motta Barros
Jordi Torres
Julien Valentin
Johan Nouvel
Hartwig Wiesmann
Javier Taibo
Donn Mielcarek
Corbin Holtz
Blasius Czink
Alexander Sinditskiy
Alexander Irion
Wee See
Toshiyuki Takahei
Sebastien Grignard
Ryan Kawicki
Rudolf Wiedemann
Romano Magacho
Mikhail Izmestev
Maria Ten
Liang Aibin
Katharina Plugge
@@ -174,34 +184,42 @@ Bruce Clay
Bradley Anderegg
Andreas Goebel
Alok Priyadarshi
Alberto Barbati
Ali Botorabi
Alan Dickinson
Vladimir Shabanov
Tugkan Calapoglu
Tim Daoust
Sylvain Marie
Sohey Yamamoto
Sergey Leontyev
Sebastian Messerschmidt
Santosh Gaikwad
Ryan Pavlik
Robert Milharcic
Rene Molenaar
Piotr Domagalski
Philippe Renon
Phil Atkin
Pawel Ksiezopolski
Patrick Neary
Nathan Monteleone
Miha Rav<61>elj
Miguel Escriva
Mattias Linde
Mark Sciabica
Marcin Prus
Lee Butler
Lars Nilsson
Konstantin Sinitsyn
Ken Sewell
Julian Ortiz
Julen Garcia
John Kaniarz
Johannes Scholz
Jim Vaughan
Jeremy Bell
Jaromir Vitek
James French
Jaap Glas
Guillaume Millet
Gary Quinn
Garrett Potts
@@ -211,44 +229,46 @@ Doug McCorkle
Donald Cipperly
Don Leich
Dietmar Funck
Colin Cochran
Christian Ruzicka
Christian Buchner
Chris Djali
Charles Cole
Blake Williams
Bj<EFBFBD>rn Hein
Aur<EFBFBD>lien Chatelain
Antoine Hue
Andrew Bettison
Andreas Henne
Anders Backman
Ali Botorabi
Alexander Wiebel
Alessandro Terenzi
Alberto Barbati
Zach Deedler
Yuzhong Shen
Wee See
Warren Macchi
Vladimir Chebaev
Vincent Bourdier
Terrex
Terrex
Tassilo Glander
Sylvain Marie
Steve Lunsford
Stephane Simon
Stephan Eilemann
Stanislav Blinov
Sergey Polischuk
Raymond de Vries
Roni Zanolli
Ralf Kern
Piotr Gwiazdowski
Pierre Haritchabalet
Perry Miller
Pawel Ksiezopolski
Paul Palumbo
Paul Obermeier
Nguyen Van Truong
Nathan Cournia
Morten Haukness
Morn<EFBFBD> Pistorius
Michael Mc Donnell
Michael Henheffer
Michael Guerrero
Maya Leonard
Max Bandazian
Mathias Fiedler
Mathew May
@@ -258,20 +278,17 @@ Martin Lambers
Martijn Kragtwijk
Marius Heise
Marcin Hajder
Marcel Pursche
Lilith Bryant
Lars Nilsson
Kristofer Tingdahl
Kevin Moiule
Keith Steffen
Julen Garcia
Joseph Winston
John Aughey
Johannes Scholz
Joachim Pouderoux
Jean-Christophe Lombardo
Javier Taibo
Jan Klimke
James Turner
James Moliere
Jaap Glas
Igor Kravtchenko
Himar Carmona
He Sicong
@@ -279,30 +296,37 @@ Guy Volckaert
Gustavo Wagner
Guillaume Taze
Guillaume Chouvenc
Giuseppe Donvito
Gill Peacegood
Giampaolo Vigan<61>
Gerrick Bivins
George Tarantilis
Ferdi Smit
Eric Buehler
Eduardo Poyart
Edgar Ellis
Dmitry Marakasov
Dimi Christopoulos
Diane Delallée
Diane Delall<EFBFBD>e
David Longest
David Ergo
Daniel Trstenjak
Craig Bosma
Claus Scheiblauer
Christophe Loustaunau
Christian Kehl
Bradley Baker Searles
Brad Anderegg
Aric Aumann
Anish Thomas
Andrew Sampson
Andrew Lorino
Alexandre Amalric
Aitor Moreno
Zbigniew Sroczynski
Yuri Vilmanis
Xin Li
Wang Lam
Wand Rui
Walter J. Altice
Volker Walkiewicz
Vladimir Vukicevic
@@ -316,36 +340,46 @@ Valeriy Dubov
Vaclav Bilek
Tyge L<>vset
Troy Yee
Torben Dannahauer
Tony Vasile
Tomas Hogarth
Tomas Hnilica
Todd Furlong
Tobias Ottenweller
Tino Schwarze
Tim George
Thorsten Brehm
Thomas Weidner
Tan Dunning
Tamer Fahmy
Stewart Andreason
Steven Thomas
Stephan Wenglorz
Simon Hammett
Simon Carmody
Simon Buckley
Sid Byce
Shuxing Xiao
Shane Arnott
Sergey Kurdakov
Sebastien Kuntz
Sandro Mani
Ruth Lang
Ruben The
Ruben Smelik
Ross Anderson
Ronny Krueger
Ronald van Maarseveen
Romain Ouabdelkader
Romain Charbit
Rocco Martino
Robert Swain
Rob Smith
Rob Radtke
Rob Bloemkool
Rick Pingry
Rick Appleton
Remo Eichenberger
Reinhard Sainitzer
Rein Kadijk
Ragnar Hammarqvist
@@ -359,9 +393,11 @@ Philip Lamb
Petr Salinger
Peter Bear
Peter Amstutz
Per Nordqvist
Paul Idstein
Paul Fredrikson
Paul Fotheringham
Paul Cheyrou-Lagreze
Pau Garcia
Patrick Hartling
Parag Chaudhur
@@ -371,22 +407,28 @@ Orhun Birsoy
Oren Fromberg
Oliver Neumann
Ole-Morten Duesund
Ognjen Kostic
Nicolas Brodu
Nick Thu
Nick Black
Mojtaba Fathi
Mirko Viviani
Mikkel Gjøl
Mikkel Gj<EFBFBD>l
Mike Krus
Mike Garrity
Miha Ravsel
Mick Thu
Michal Durkovic
Michael Schanne
Michael Polak
Michael Morrison
Michael Logan
Michael Kapelko
Michael Bach Jensen
Maya Thu
Maya Leonard
Max Rhiener
Max Behensky
Mauricio Hofmam
Matthias Helsing
Matthew May
Matthew Johnson-Roberson
Matt Green
@@ -399,20 +441,19 @@ Martin Innus
Martin Beck
Marius Kintel
Mario Guimaraes
Marcus Hein
Marco Thu
Marco Sciabica
Marco Lehmann
Marcel Pursche
Maik Keller
Lukas Diduch
Louis Hamilton
Likasz Izebski
Lewis Harmon
Leigh Stivers
Laurence Muller
Laura Cerritelli
Lars Nillson
Kyle Centers
Kristopher Bixler
Konstantin Matveyev
Kim Seokhwan
Kim Bale
Karsten Weiss
@@ -423,20 +464,24 @@ Juergen Rensen
Juan Manuel Alvarez
Juan Hernando
Josh Portway
Jonathan Greig
John Tan
John Hedström
John Grant
John Farrier
John Donovan
John Davis
John Cummings
John Argentieri
Joe Thompson
Joan Abadie
Jim Brooks
Jeroen den Dekker
Jeffrey Kinross
Jay Zuckerman
Jason Howlett
Jason Ballenger
Jan Klimke
James Turner
Jamie Robertson
James Killian
James Athey
J.E. Hoffmann
@@ -449,6 +494,7 @@ Gregory Jaegy
Graeme Harkness
Gian Lorenzetto
George Papagiannakis
Geoff Thu
Galen Faidley
Frida Schlaug
Frederic Smith
@@ -463,6 +509,8 @@ Ferdinand Cornelissen
Fajran Iman
Fabien Dachicourt
Erik Johnson
Eric Thu
Eric Buehler
Eduardo Alberto
Edmond Gheury
Ed Ralston
@@ -470,6 +518,7 @@ Duvan Cope
Duncan Cavens
Drew Whitehouse
Douglas A. Pouk
Dmitriy Ogalcev
Dean Iverson
David Jung
Danny Valente
@@ -477,23 +526,27 @@ Daniel Stien
Dan Minor
C<EFBFBD>sar L. B. Silveira
Cyril Brulebois
Curtis Rubel
Cory Slep
Cl<EFBFBD>ment B<>sch
Clay Fowler
Claus Steuer
Chuck Sembroski
Christopher Blaesius
Christopher Baker
Christophe Herreman
Christian Ruzicka
Christian Noon
Christian Kaser
Christian Ehrlicher
Chris White
Chris McGlone
Carlos Garcea
Capostrophic
Bryce Eldridge
Bruno Herbelin
Brian Keener
Brede Thu
Brandon Hamm
Bora Utka
Bj<EFBFBD>rn Hein
Bjorn Blissing
Bill Prendergast
Bernardt Duvenhage
Benoit Laniel
@@ -501,16 +554,23 @@ Benjamin Wasty
Ben van Basten
Bart Gallet
Axel Volley
Arjun Ramamurthy
Anthousis Andreadis
Anna Sokol
Andy Preece
Andrew Reyonolds
Andreas Roth
Andreas Jochens
Andre Normann
Alois Wismer
Almalric Alexandre
Allen Bierbaum
Alexey Pavlov
Alberto Jaspe
Alan Purvis
Alan Ott
Alan Harris
Adrien Grandemange
Adrian Clark
Adam Richard
Abhishek Bansal

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
# Check for availability of atomic operations
# Check for availability of atomic operations
# This module defines
# OPENTHREADS_HAVE_ATOMIC_OPS
@@ -15,123 +15,143 @@ IF (OPENTHREADS_ATOMIC_USE_MUTEX)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
ELSE()
# as the test does not work for IOS hardcode the ATOMIC implementation
IF(OSG_BUILD_PLATFORM_IPHONE_SIMULATOR OR OSG_BUILD_PLATFORM_IPHONE)
SET(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS 0)
SET(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS 0)
SET(_OPENTHREADS_ATOMIC_USE_SUN 0)
SET(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED 0)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 0)
INCLUDE(CheckCXXSourceRuns)
SET(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC 1)
# Do step by step checking,
CHECK_CXX_SOURCE_RUNS("
#include <cstdlib>
ELSE()
INCLUDE(CheckCXXSourceRuns)
int main()
{
unsigned value = 0;
void* ptr = &value;
__sync_add_and_fetch(&value, 1);
__sync_synchronize();
__sync_sub_and_fetch(&value, 1);
if (!__sync_bool_compare_and_swap(&value, 0, 1))
return EXIT_FAILURE;
# Do step by step checking,
CHECK_CXX_SOURCE_RUNS("
#include <cstdlib>
if (!__sync_bool_compare_and_swap(&ptr, ptr, ptr))
return EXIT_FAILURE;
int main()
{
unsigned value = 0;
void* ptr = &value;
__sync_add_and_fetch(&value, 1);
__sync_synchronize();
__sync_sub_and_fetch(&value, 1);
if (!__sync_bool_compare_and_swap(&value, 0, 1))
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
" _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
if (!__sync_bool_compare_and_swap(&ptr, ptr, ptr))
return EXIT_FAILURE;
CHECK_CXX_SOURCE_RUNS("
#include <stdlib.h>
return EXIT_SUCCESS;
}
" _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
int main(int, const char**)
{
unsigned value = 0;
void* ptr = &value;
__add_and_fetch(&value, 1);
__synchronize(value);
__sub_and_fetch(&value, 1);
if (!__compare_and_swap(&value, 0, 1))
return EXIT_FAILURE;
CHECK_CXX_SOURCE_RUNS("
#include <stdlib.h>
if (!__compare_and_swap((unsigned long*)&ptr, (unsigned long)ptr, (unsigned long)ptr))
return EXIT_FAILURE;
int main(int, const char**)
{
unsigned value = 0;
void* ptr = &value;
__add_and_fetch(&value, 1);
__synchronize(value);
__sub_and_fetch(&value, 1);
if (!__compare_and_swap(&value, 0, 1))
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
" _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
if (!__compare_and_swap((unsigned long*)&ptr, (unsigned long)ptr, (unsigned long)ptr))
return EXIT_FAILURE;
CHECK_CXX_SOURCE_RUNS("
#include <atomic.h>
#include <cstdlib>
return EXIT_SUCCESS;
}
" _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
int main(int, const char**)
{
uint_t value = 0;
void* ptr = &value;
atomic_inc_uint_nv(&value);
membar_consumer();
atomic_dec_uint_nv(&value);
if (0 != atomic_cas_uint(&value, 0, 1))
return EXIT_FAILURE;
CHECK_CXX_SOURCE_RUNS("
#include <atomic.h>
#include <cstdlib>
if (ptr != atomic_cas_ptr(&ptr, ptr, ptr))
return EXIT_FAILURE;
int main(int, const char**)
{
uint_t value = 0;
void* ptr = &value;
atomic_inc_uint_nv(&value);
membar_consumer();
atomic_dec_uint_nv(&value);
if (0 != atomic_cas_uint(&value, 0, 1))
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
" _OPENTHREADS_ATOMIC_USE_SUN)
if (ptr != atomic_cas_ptr(&ptr, ptr, ptr))
return EXIT_FAILURE;
CHECK_CXX_SOURCE_RUNS("
#include <windows.h>
#include <intrin.h>
#include <cstdlib>
return EXIT_SUCCESS;
}
" _OPENTHREADS_ATOMIC_USE_SUN)
#pragma intrinsic(_InterlockedAnd)
#pragma intrinsic(_InterlockedOr)
#pragma intrinsic(_InterlockedXor)
CHECK_CXX_SOURCE_RUNS("
#include <windows.h>
#include <intrin.h>
#include <cstdlib>
int main(int, const char**)
{
volatile long value = 0;
long data = 0;
long* volatile ptr = &data;
#pragma intrinsic(_InterlockedAnd)
#pragma intrinsic(_InterlockedOr)
#pragma intrinsic(_InterlockedXor)
InterlockedIncrement(&value);
MemoryBarrier();
InterlockedDecrement(&value);
int main(int, const char**)
{
volatile long value = 0;
long data = 0;
long* volatile ptr = &data;
if (0 != InterlockedCompareExchange(&value, 1, 0))
return EXIT_FAILURE;
InterlockedIncrement(&value);
MemoryBarrier();
InterlockedDecrement(&value);
if (ptr != InterlockedCompareExchangePointer((PVOID volatile*)&ptr, (PVOID)ptr, (PVOID)ptr))
return EXIT_FAILURE;
if (0 != InterlockedCompareExchange(&value, 1, 0))
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
" _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
if (ptr != InterlockedCompareExchangePointer((PVOID volatile*)&ptr, (PVOID)ptr, (PVOID)ptr))
return EXIT_FAILURE;
CHECK_CXX_SOURCE_RUNS("
#include <libkern/OSAtomic.h>
return EXIT_SUCCESS;
}
" _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
int main()
{
volatile int32_t value = 0;
long data = 0;
long * volatile ptr = &data;
CHECK_CXX_SOURCE_RUNS("
#include <libkern/OSAtomic.h>
OSAtomicIncrement32(&value);
OSMemoryBarrier();
OSAtomicDecrement32(&value);
OSAtomicCompareAndSwapInt(value, 1, &value);
OSAtomicCompareAndSwapPtr(ptr, ptr, (void * volatile *)&ptr);
}
" _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
int main()
{
volatile int32_t value = 0;
long data = 0;
long * volatile ptr = &data;
OSAtomicIncrement32(&value);
OSMemoryBarrier();
OSAtomicDecrement32(&value);
OSAtomicCompareAndSwapInt(value, 1, &value);
OSAtomicCompareAndSwapPtr(ptr, ptr, (void * volatile *)&ptr);
}
" _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
IF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND
NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND
NOT _OPENTHREADS_ATOMIC_USE_SUN AND
NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED AND
NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
ENDIF()
# MinGW can set both WIN32_INTERLOCKED and GCC_BUILTINS to true which results in compliation errors
IF (_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
# In this case we prefer the GCC_BUILTINS
SET(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS 1)
SET(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED 0)
ENDIF()
IF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND
NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND
NOT _OPENTHREADS_ATOMIC_USE_SUN AND
NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED AND
NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
ENDIF()
ENDIF()

View File

@@ -9,19 +9,19 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
SET(MY_PATH_INCLUDE )
SET(MY_PATH_LIB )
FOREACH( MYPATH ${SEARCHPATHLIST} )
SET(MY_PATH_INCLUDE ${MY_PATH_INCLUDE} ${MYPATH}/include)
SET(MY_PATH_LIB ${MY_PATH_LIB} ${MYPATH}/lib)
ENDFOREACH( MYPATH ${SEARCHPATHLIST} )
FIND_PATH("${DEPNAME}_INCLUDE_DIR" ${INCLUDEFILE}
${MY_PATH_INCLUDE}
NO_DEFAULT_PATH
)
MARK_AS_ADVANCED("${DEPNAME}_INCLUDE_DIR")
#MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--")
SET(LIBRARY_NAMES "")
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
LIST(APPEND LIBRARY_NAMES "${LIBNAME}${EXSUFFIX}")
@@ -35,7 +35,7 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
LIST(APPEND LIBRARY_NAMES_DEBUG "${LIBNAME}${DEBUGSUFFIX}${EXSUFFIX}")
ENDFOREACH(LIBNAME)
FIND_LIBRARY("${DEPNAME}_LIBRARY_DEBUG"
FIND_LIBRARY("${DEPNAME}_LIBRARY_DEBUG"
NAMES ${LIBRARY_NAMES_DEBUG}
PATHS ${MY_PATH_LIB}
NO_DEFAULT_PATH
@@ -49,30 +49,36 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
MESSAGE("-- Warning Debug ${DEPNAME} not found, using: ${${DEPNAME}_LIBRARY}")
SET(${DEPNAME}_LIBRARY_DEBUG "${${DEPNAME}_LIBRARY}")
ENDIF(NOT ${DEPNAME}_LIBRARY_DEBUG)
SET(${DEPNAME}_LIBRARIES debug ${${DEPNAME}_LIBRARY_DEBUG} optimized ${${DEPNAME}_LIBRARY} )
ENDIF(${DEPNAME}_INCLUDE_DIR AND ${DEPNAME}_LIBRARY)
ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX)
################################################################################################
# this Macro is tailored to Mike dependencies
# this Macro is tailored to Mike and Torbens dependencies
################################################################################################
MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D" "_i")
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244;freetype250;" ${OSG_3RDPARTY_BIN} "d" "")
FIND_DEPENDENCY(TIFF tiff.h "libtiff;tiff" ${OSG_3RDPARTY_BIN} "D" "")
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244;freetype250;freetype27;freetype271;" ${OSG_3RDPARTY_BIN} "d" "")
IF(FREETYPE_FOUND)
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
ENDIF(FREETYPE_FOUND)
FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib" ${OSG_3RDPARTY_BIN} "D" "")
FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib;libcurl_imp" ${OSG_3RDPARTY_BIN} "D" "")
FIND_DEPENDENCY(JPEG jpeglib.h "libjpeg;jpeg" ${OSG_3RDPARTY_BIN} "D" "")
FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal16" ${OSG_3RDPARTY_BIN} "d" "_i")
FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D" "")
IF(GLUT_FOUND)
#forcing subsequent FindGlut stuff to not search for other variables.... kind of a hack
#forcing subsequent FindGlut stuff to not search for other variables.... kind of a hack
SET(GLUT_glut_LIBRARY ${GLUT_LIBRARY} CACHE FILEPATH "")
MARK_AS_ADVANCED(GLUT_glut_LIBRARY)
ENDIF(GLUT_FOUND)
@@ -81,19 +87,21 @@ MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
IF(ZLIB_FOUND)
FIND_DEPENDENCY(PNG png.h "libpng;libpng13;libpng15;libpng16" ${OSG_3RDPARTY_BIN} "D" "")
IF(PNG_FOUND)
#forcing subsequent FindPNG stuff to not search for other variables.... kind of a hack
#forcing subsequent FindPNG stuff to not search for other variables.... kind of a hack
SET(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIR} CACHE FILEPATH "")
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR)
ENDIF(PNG_FOUND)
ENDIF(ZLIB_FOUND)
FIND_DEPENDENCY(LIBXML2 libxml "libxml2" ${OSG_3RDPARTY_BIN} "D" "")
# CMakes default module to find libxml2 will not find the in
FIND_DEPENDENCY(LIBXML2 libxml/xpath.h "libxml2" ${OSG_3RDPARTY_BIN} "D" "")
IF(LIBXML2_FOUND)
# The CMAKE find libxml module uses LIBXML2_LIBRARIES -> fill it.... kind of a hack
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} CACHE FILEPATH "" FORCE)
SET(LIBXML2_XMLLINT_EXECUTABLE ${OSG_3RDPARTY_BIN}/bin/xmllint.exe CACHE FILEPATH "Path to xmllint executable" FORCE)
# The CMAKE find libxml module uses LIBXML2_LIBRARIES -> fill it.... kind of a hack
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} CACHE FILEPATH "LibXML2 library for collada" FORCE)
# SET(LIBXML2_XMLLINT_EXECUTABLE ${OSG_3RDPARTY_BIN}/bin/xmllint.exe CACHE FILEPATH "Path to xmllint executable" FORCE)
ENDIF(LIBXML2_FOUND)
#FIND_DEPENDENCY(DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX EXSUFFIX)
FIND_Package(NVTT)
FIND_Package(NVTT)
#luigi#INCLUDE(FindOSGDepends.cmake)
ENDMACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
@@ -104,7 +112,7 @@ ENDMACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
# this is code for handling optional 3RDPARTY usage
################################################################################################
OPTION(USE_3RDPARTY_BIN "Set to ON to use Mike prebuilt dependencies situated side of OpenSceneGraph source. Use OFF for avoiding." ON)
OPTION(USE_3RDPARTY_BIN "Set to ON to use Mike or Torbens prebuilt dependencies situated side of OpenSceneGraph source. Use OFF for avoiding." ON)
IF(USE_3RDPARTY_BIN)
# Check Architecture
@@ -132,7 +140,7 @@ IF(USE_3RDPARTY_BIN)
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs90sp1")
ENDIF()
ENDIF(NOT EXISTS ${TEST_3RDPARTY_DIR})
SET(ACTUAL_3RDPARTY_DIR "${TEST_3RDPARTY_DIR}" CACHE PATH "Location of 3rdparty dependencies")
SET(ACTUAL_3DPARTY_DIR "${ACTUAL_3RDPARTY_DIR}") # kept for backcompatibility
IF(EXISTS ${ACTUAL_3RDPARTY_DIR})

View File

@@ -1,22 +1,20 @@
# Locate Apple AVFoundation (next-generation QTKit)
# This module defines
# AV_FOUNDATION_LIBRARY
# AV_FOUNDATION_FOUND, if false, do not try to link to gdal
# AV_FOUNDATION_INCLUDE_DIR, where to find the headers
# AV_FOUNDATION_FOUND, if false, do not try to link to gdal
#
# $AV_FOUNDATION_DIR is an environment variable that would
# correspond to the ./configure --prefix=$AV_FOUNDATION_DIR
#
# Created by Stephan Maximilian Huber
# Created by Stephan Maximilian Huber
IF(APPLE)
FIND_PATH(AV_FOUNDATION_INCLUDE_DIR AVFoundation/AVFoundation.h)
FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation)
ENDIF()
SET(AV_FOUNDATION_FOUND "NO")
IF(AV_FOUNDATION_LIBRARY AND AV_FOUNDATION_INCLUDE_DIR)
IF(AV_FOUNDATION_LIBRARY)
SET(AV_FOUNDATION_FOUND "YES")
ENDIF()
@@ -32,11 +30,9 @@ ELSE()
# AVFoundation exists since 10.7, but only 10.8 has all features necessary for OSG
# so check the SDK-setting
IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8")
# nothing special here ;-)
ELSE()
MESSAGE("AVFoundation disabled for SDK < 10.8")
SET(AV_FOUNDATION_FOUND "NO")
IF(OSG_OSX_VERSION VERSION_LESS 10.8)
MESSAGE("AVFoundation disabled for SDK < 10.8")
SET(AV_FOUNDATION_FOUND "NO")
ENDIF()
ENDIF()
ENDIF()

24
CMakeModules/FindAsio.cmake Executable file → Normal file
View File

@@ -1,9 +1,9 @@
# Locate ASIO-headers (http://think-async.com/Asio)
# This module defines
# ASIO_FOUND, if false, do not try to link to gdal
# ASIO_FOUND, if false, do not try to link to gdal
# ASIO_INCLUDE_DIR, where to find the headers
#
# Created by Stephan Maximilian Huber
# Created by Stephan Maximilian Huber
FIND_PATH(ASIO_INCLUDE_DIR
NAMES
@@ -14,7 +14,21 @@ FIND_PATH(ASIO_INCLUDE_DIR
)
SET(ASIO_FOUND "NO")
FIND_PACKAGE( Boost 1.37 )
IF(Boost_FOUND AND ASIO_INCLUDE_DIR)
SET(ASIO_FOUND "YES")
IF(ASIO_INCLUDE_DIR)
set(ASIO_VERSION_H ${ASIO_INCLUDE_DIR}/asio/version.hpp)
file(STRINGS ${ASIO_VERSION_H} AsioVersionLine REGEX "^#define ASIO_VERSION ")
string(REGEX MATCHALL "[0-9]+" AsioHeaderVersionMatches "${AsioVersionLine}")
list(GET AsioHeaderVersionMatches 0 AsioHeaderVersion)
# check version is less than 1.14.0 otherwise API changes break build
if (${AsioHeaderVersion} LESS "101400")
FIND_PACKAGE( Boost 1.37 )
IF(Boost_FOUND)
SET(ASIO_FOUND "YES")
ENDIF()
else()
message("ASIO not compatible")
endif()
ENDIF()

View File

@@ -11,32 +11,53 @@
# $COLLADA_DIR is an environment variable that would
# correspond to the ./configure --prefix=$COLLADA_DIR
#
# Created by Robert Osfield.
# Created by Robert Osfield.
# Check if COLLADA_DIR is set, otherwise use ACTUAL_3DPARTY_DIR:
SET( COLLADA_ENV_VAR_AVAILABLE $ENV{COLLADA_DIR} )
IF ( COLLADA_ENV_VAR_AVAILABLE )
SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory" FORCE)
ELSE ( COLLADA_ENV_VAR_AVAILABLE )
ELSE ()
SET(COLLADA_DOM_ROOT "${ACTUAL_3DPARTY_DIR}/include/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE)
ENDIF( COLLADA_ENV_VAR_AVAILABLE )
ENDIF()
IF(APPLE)
SET(COLLADA_BUILDNAME "mac")
SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
ELSEIF(MINGW)
SET(COLLADA_BUILDNAME "mingw")
ELSEIF(MSVC10)
SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
ELSEIF((MSVC_VERSION GREATER 1910) OR (MSVC_VERSION EQUAL 1910))
SET(COLLADA_BUILDNAME "vc14")
SET(COLLADA_BOOST_BUILDNAME "vc141")
ELSEIF(MSVC_VERSION EQUAL 1900)
SET(COLLADA_BUILDNAME "vc14")
SET(COLLADA_BOOST_BUILDNAME "vc140")
ELSEIF(MSVC_VERSION EQUAL 1800)
SET(COLLADA_BUILDNAME "vc12")
SET(COLLADA_BOOST_BUILDNAME "vc120")
ELSEIF(MSVC_VERSION EQUAL 1700)
SET(COLLADA_BUILDNAME "vc11")
SET(COLLADA_BOOST_BUILDNAME "vc110")
ELSEIF(MSVC_VERSION EQUAL 1600)
SET(COLLADA_BUILDNAME "vc10")
ELSEIF(MSVC90)
SET(COLLADA_BOOST_BUILDNAME "vc100")
ELSEIF(MSVC_VERSION EQUAL 1500)
SET(COLLADA_BUILDNAME "vc9")
ELSEIF(MSVC80)
SET(COLLADA_BOOST_BUILDNAME "vc90")
ELSEIF(MSVC_VERSION EQUAL 1400)
SET(COLLADA_BUILDNAME "vc8")
ELSE(APPLE)
SET(COLLADA_BOOST_BUILDNAME "vc80")
ELSE()
SET(COLLADA_BUILDNAME "linux")
ENDIF(APPLE)
SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
ENDIF()
IF(${CMAKE_VS_PLATFORM_TOOLSET})
string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
ENDIF()
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
@@ -49,10 +70,19 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
/usr/local/include
/usr/local/include/colladadom
/usr/local/include/collada-dom
/usr/local/include/collada-dom2.5
/usr/local/include/collada-dom2.4
/usr/local/include/collada-dom2.2
/opt/local/include/collada-dom
/opt/local/include/collada-dom2.5
/opt/local/include/collada-dom2.4
/opt/local/include/collada-dom2.2
/usr/include/
/usr/include/colladadom
/usr/include/collada-dom
/usr/include/collada-dom2.5
/usr/include/collada-dom2.4
/usr/include/collada-dom2.2
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
@@ -61,16 +91,17 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
${ACTUAL_3DPARTY_DIR}/include
)
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 collada-dom2.5-dp collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt collada-dom2.4-dp collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt
PATHS
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
${COLLADA_DOM_ROOT}
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
$ENV{COLLADA_DIR}/lib
$ENV{COLLADA_DIR}/lib-dbg
$ENV{COLLADA_DIR}
~/Library/Frameworks
/Library/Frameworks
/Library/Frameworks
/opt/local/Library/Frameworks #macports
/usr/local/lib
/usr/local/lib64
@@ -84,10 +115,11 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
${ACTUAL_3DPARTY_DIR}/lib
)
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d collada-dom2.5-dp-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d
PATHS
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
${COLLADA_DOM_ROOT}
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d
$ENV{COLLADA_DIR}/lib
$ENV{COLLADA_DIR}/lib-dbg
@@ -107,7 +139,7 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
${ACTUAL_3DPARTY_DIR}/lib
)
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
NAMES libcollada14dom21-s libcollada14dom22-s libcollada14dom.a
PATHS
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
@@ -130,7 +162,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY
${ACTUAL_3DPARTY_DIR}/lib
)
FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd libcollada14dom22-sd libcollada14dom-d.a
PATHS
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
@@ -169,10 +201,19 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
ENDIF(WIN32)
ENDIF(LIBXML2_FOUND)
FIND_PACKAGE(ZLIB)
IF (ZLIB_FOUND)
SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
IF (ZLIB_LIBRARY_RELEASE)
SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY_RELEASE}" CACHE FILEPATH "" FORCE)
ELSE(ZLIB_LIBRARY_RELEASE)
SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
ENDIF(ZLIB_LIBRARY_RELEASE)
IF (ZLIB_LIBRARY_DEBUG)
SET(COLLADA_ZLIB_LIBRARY_DEBUG "${ZLIB_LIBRARY_DEBUG}" CACHE FILEPATH "" FORCE)
ELSE(ZLIB_LIBRARY_DEBUG)
SET(COLLADA_ZLIB_LIBRARY_DEBUG "${COLLADA_ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
ENDIF(ZLIB_LIBRARY_DEBUG)
ELSE(ZLIB_FOUND)
IF(WIN32)
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY
@@ -238,7 +279,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-vc90-mt libboost_filesystem-vc100-mt
NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_63
PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -246,7 +287,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-vc90-mt-gd libboost_filesystem-vc100-mt-gd
NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63
PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -254,7 +295,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
NAMES libboost_system boost_system boost_system-mt libboost_system-vc90-mt libboost_system-vc100-mt
NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_63
PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -262,7 +303,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-vc90-mt-gd libboost_system-vc100-mt-gd
NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63
PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -273,6 +314,20 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
SET(COLLADA_FOUND "NO")
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
IF (COLLADA_INCLUDE_DIR)
SET(COLLADA_FOUND "YES")
ENDIF(COLLADA_INCLUDE_DIR)
ENDIF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
FIND_PATH(COLLADA_INCLUDE_DOMANY_DIR 1.4/dom/domAny.h
${COLLADA_INCLUDE_DIR}
)
IF (COLLADA_INCLUDE_DOMANY_DIR)
SET(COLLADA_DOM_2_4_OR_LATER TRUE)
ELSEIF()
SET(COLLADA_DOM_2_4_OR_LATER FALSE)
ENDIF()
ENDIF()
ENDIF()

View File

@@ -0,0 +1,33 @@
# Finds EGL header and library
#
# This script defines the following:
# EGL_FOUND // Set to TRUE if EGL is found
# EGL_INCLUDE_DIR // Parent directory of directory EGL/egl.h header.
#
# EGL_DIR can be set as an environment variable or a CMake variable,
# to the parent directory of the EGL header.
#
FIND_PATH( EGL_INCLUDE_DIR
NAMES EGL/egl.h
HINTS ENV EGL_DIR
)
FIND_LIBRARY(EGL_LIBRARY
NAMES EGL
HINTS ENV EGL_DIR
PATH_SUFFIXES lib
)
# handle the QUIETLY and REQUIRED arguments and set
# EGL_FOUND to TRUE as appropriate
INCLUDE( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL
REQUIRED_VARS EGL_LIBRARY EGL_INCLUDE_DIR)
MARK_AS_ADVANCED(
EGL_INCLUDE_DIR
EGL_LIBRARY
)

View File

@@ -9,7 +9,12 @@
# correspond to the ./configure --prefix=$FBX_DIR
IF(APPLE)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# using regular Clang or AppleClang
SET(FBX_LIBDIR "clang")
else()
SET(FBX_LIBDIR "gcc4/ub")
endif()
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
SET(FBX_LIBDIR "gcc4")
ELSEIF(MSVC80)
@@ -18,35 +23,95 @@ ELSEIF(MSVC90)
SET(FBX_LIBDIR "vs2008")
ELSEIF(MSVC10)
SET(FBX_LIBDIR "vs2010")
ELSEIF(MSVC11 OR MSVC_VERSION>1700)
ELSEIF(MSVC11)
SET(FBX_LIBDIR "vs2012")
ELSEIF(MSVC_VERSION EQUAL 1800)
SET(FBX_LIBDIR "vs2013")
ELSEIF(MSVC_VERSION EQUAL 1900)
SET(FBX_LIBDIR "vs2015")
ELSEIF(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920)
SET(FBX_LIBDIR "vs2017")
ELSEIF(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1930)
# SET(FBX_LIBDIR "vs2019") # FBX doesn't have this yet as of version 2020.0.1
SET(FBX_LIBDIR "vs2017") # Binary compatible with vs2019
ENDIF()
IF(APPLE)
# do nothing
ELSEIF(CMAKE_CL_64)
SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
ELSEIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SIZEOF_VOID_P EQUAL 8)
ELSEIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
ELSE()
SET(FBX_LIBDIR ${FBX_LIBDIR}/x86)
ENDIF()
#try to use 2015.1 or 2014.2 version
IF(APPLE)
SET(FBX_LIBNAME "libfbxsdk")
SET(FBX_LIBNAME "fbxsdk")
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
SET(FBX_LIBNAME "fbxsdk")
ELSE()
SET(FBX_LIBNAME "libfbxsdk-md")
OPTION(FBX_SHARED OFF)
IF(FBX_SHARED)
SET(FBX_LIBNAME "libfbxsdk")
ELSE()
SET(FBX_LIBNAME "libfbxsdk-md")
IF(WIN32)
SET(FBX_XML2_LIBNAME "libxml2-md")
SET(FBX_ZLIB_LIBNAME "zlib-md")
ENDIF()
ENDIF()
ENDIF()
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
SET( FBX_SEARCH_PATHS
$ENV{FBX_DIR}
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2014.1"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2014.1"
/Applications/Autodesk/FBXSDK20141
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2020.0.1"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2020.0.1"
"/Applications/Autodesk/FBX SDK/2020.0.1"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2020.0"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2020.0"
"/Applications/Autodesk/FBX SDK/2020.0"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2019.5"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2019.5"
"/Applications/Autodesk/FBX SDK/2019.5"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2019.2"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2019.2"
"/Applications/Autodesk/FBX SDK/2019.2"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2019.0"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2019.0"
"/Applications/Autodesk/FBX SDK/2019.0"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2018.1.1"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2018.1.1"
"/Applications/Autodesk/FBX SDK/2018.1.1"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2018.0"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2018.0"
"/Applications/Autodesk/FBX SDK/2018.0"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2017.1"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2017.1"
"/Applications/Autodesk/FBX SDK/2017.1"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2017.0"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2017.0"
"/Applications/Autodesk/FBX SDK/2017.0"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2016.1.2"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2016.1.2"
"/Applications/Autodesk/FBX/FBX SDK/2016.1.2"
/Applications/Autodesk/FBXSDK201612
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2016.1.1"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2016.1.1"
"/Applications/Autodesk/FBX/FBX SDK/2016.1.1"
/Applications/Autodesk/FBXSDK201611
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2015.1"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2015.1"
"/Applications/Autodesk/FBX/FBX SDK/2015.1"
/Applications/Autodesk/FBXSDK20151
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2014.2"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2014.2"
"/Applications/Autodesk/FBX/FBX SDK/2014.2"
/Applications/Autodesk/FBXSDK20142
)
# search for headers & debug/release libraries
@@ -67,6 +132,21 @@ FIND_LIBRARY( FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES "lib/${FBX_LIBDIR}")
IF(WIN32)
FIND_LIBRARY( FBX_XML2_LIBRARY ${FBX_XML2_LIBNAME}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES "lib/${FBX_LIBDIR}/release" "lib/${FBX_LIBDIR}")
FIND_LIBRARY( FBX_ZLIB_LIBRARY ${FBX_ZLIB_LIBNAME}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES "lib/${FBX_LIBDIR}/release" "lib/${FBX_LIBDIR}")
FIND_LIBRARY( FBX_XML2_LIBRARY_DEBUG ${FBX_XML2_LIBNAME}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES "lib/${FBX_LIBDIR}/debug")
FIND_LIBRARY( FBX_ZLIB_LIBRARY_DEBUG ${FBX_ZLIB_LIBNAME}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES "lib/${FBX_LIBDIR}/debug")
ENDIF()
IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
SET(FBX_FOUND "YES")
ELSE()
@@ -74,21 +154,22 @@ ELSE()
ENDIF()
IF(NOT FBX_FOUND)
#try to use 2013.3 version
#try to use 2014.1 version
IF(APPLE)
SET(FBX_LIBNAME "fbxsdk-2013.3-static")
SET(FBX_LIBNAME "fbxsdk-2014.1")
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
SET(FBX_LIBNAME "fbxsdk-2013.3-static")
SET(FBX_LIBNAME "fbxsdk-2014.1")
ELSE()
SET(FBX_LIBNAME "fbxsdk-2013.3-md")
SET(FBX_LIBNAME "fbxsdk-2014.1")
ENDIF()
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
SET( FBX_SEARCH_PATHS
$ENV{FBX_DIR}
$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2013.3
$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2013.3
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2014.1"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2014.1"
"/Applications/Autodesk/FBX/FBX SDK/2014.1"
/Applications/Autodesk/FBXSDK20141
)
@@ -110,3 +191,42 @@ IF(NOT FBX_FOUND)
ENDIF()
ENDIF()
IF(NOT FBX_FOUND)
#try to use 2013.3 version
IF(APPLE)
SET(FBX_LIBNAME "fbxsdk-2013.3-static")
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
SET(FBX_LIBNAME "fbxsdk-2013.3-static")
ELSE()
SET(FBX_LIBNAME "fbxsdk-2013.3-md")
ENDIF()
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
SET( FBX_SEARCH_PATHS
$ENV{FBX_DIR}
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2013.3"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2013.3"
"/Applications/Autodesk/FBX/FBX SDK/2013.3"
/Applications/Autodesk/FBXSDK20133
)
# search for headers & debug/release libraries
FIND_PATH(FBX_INCLUDE_DIR "fbxsdk.h"
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES "include")
FIND_LIBRARY( FBX_LIBRARY ${FBX_LIBNAME}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES "lib/${FBX_LIBDIR}")
FIND_LIBRARY( FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES "lib/${FBX_LIBDIR}")
IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
SET(FBX_FOUND "YES")
ELSE()
SET(FBX_FOUND "NO")
ENDIF()
ENDIF()

View File

@@ -12,10 +12,10 @@
#In ffmpeg code, old version use "#include <header.h>" and newer use "#include <libname/header.h>"
#In OSG ffmpeg plugin, we used "#include <header.h>" for compatibility with old version of ffmpeg
#With the new version of FFmpeg, a file named "time.h" was added that breaks compatability with the old version of ffmpeg.
#With the new version of FFmpeg, a file named "time.h" was added that breaks compatibility with the old version of ffmpeg.
#We have to search the path which contain the header.h (usefull for old version)
#and search the path which contain the libname/header.h (usefull for new version)
#We have to search the path which contain the header.h (useful for old version)
#and search the path which contain the libname/header.h (useful for new version)
#Then we need to include ${FFMPEG_libname_INCLUDE_DIRS} (in old version case, use by ffmpeg header and osg plugin code)
# (in new version case, use by ffmpeg header)
@@ -32,6 +32,8 @@ MACRO(FFMPEG_FIND varname shortname headername)
PATHS
${FFMPEG_ROOT}/include
$ENV{FFMPEG_DIR}/include
${FFMPEG_ROOT}
$ENV{FFMPEG_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
@@ -49,6 +51,8 @@ MACRO(FFMPEG_FIND varname shortname headername)
PATHS
${FFMPEG_ROOT}/include
$ENV{FFMPEG_DIR}/include
${FFMPEG_ROOT}
$ENV{FFMPEG_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
@@ -67,6 +71,8 @@ MACRO(FFMPEG_FIND varname shortname headername)
PATHS
${FFMPEG_ROOT}/lib
$ENV{FFMPEG_DIR}/lib
${FFMPEG_ROOT}/lib${shortname}
$ENV{FFMPEG_DIR}/lib${shortname}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
@@ -90,7 +96,7 @@ ENDMACRO(FFMPEG_FIND)
SET(FFMPEG_ROOT "$ENV{FFMPEG_DIR}" CACHE PATH "Location of FFMPEG")
# find stdint.h
IF(WIN32)
IF(MSVC)
FIND_PATH(FFMPEG_STDINT_INCLUDE_DIR stdint.h
PATHS
@@ -123,11 +129,14 @@ FFMPEG_FIND(LIBAVFORMAT avformat avformat.h)
FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h)
FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h)
FFMPEG_FIND(LIBAVUTIL avutil avutil.h)
FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h)
FFMPEG_FIND(LIBAVRESAMPLE avresample avresample.h)
FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here.
SET(FFMPEG_FOUND "NO")
# Note we don't check FFMPEG_LIBSWSCALE_FOUND here, it's optional.
IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND AND STDINT_OK)
IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND AND STDINT_OK
AND ( FFMPEG_LIBSWRESAMPLE_FOUND OR FFMPEG_LIBAVRESAMPLE_FOUND ) )
SET(FFMPEG_FOUND "YES")

View File

@@ -9,6 +9,15 @@
#
# Created by Robert Osfield.
# prefer FindFLTK from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindFLTK.cmake)
include(${CMAKE_ROOT}/Modules/FindFLTK.cmake)
if(FLTK_FOUND)
return()
endif()
endif()
FIND_PATH(FLTK_INCLUDE_DIR Fl/Fl.H Fl/Fl.h
$ENV{FLTK_DIR}/include
$ENV{FLTK_DIR}

View File

@@ -0,0 +1,98 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[[=======================================================================.rst:
# FindFontconfig
# --------------
#
# Find Fontconfig headers and library.
#
# Imported Targets
# ^^^^^^^^^^^^^^^^
#
# ``Fontconfig::Fontconfig``
# The Fontconfig library, if found.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This will define the following variables in your project:
#
# ``FONTCONFIG_FOUND``
# true if (the requested version of) Fontconfig is available.
# ``FONTCONFIG_VERSION``
# the version of Fontconfig.
# ``FONTCONFIG_LIBRARIES``
# the libraries to link against to use Fontconfig.
# ``FONTCONFIG_INCLUDE_DIRS``
# where to find the Fontconfig headers.
# ``FONTCONFIG_COMPILE_OPTIONS``
# this should be passed to target_compile_options(), if the
# target is not used for linking
#=======================================================================]]
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig QUIET)
pkg_check_modules(PKG_FONTCONFIG QUIET fontconfig)
set(FONTCONFIG_COMPILE_OPTIONS ${PKG_FONTCONFIG_CFLAGS_OTHER})
set(FONTCONFIG_VERSION ${PKG_FONTCONFIG_VERSION})
find_path( FONTCONFIG_INCLUDE_DIR
NAMES
fontconfig/fontconfig.h
HINTS
${PKG_FONTCONFIG_INCLUDE_DIRS}
/usr/X11/include
)
find_library( FONTCONFIG_LIBRARY
NAMES
fontconfig
PATHS
${PKG_FONTCONFIG_LIBRARY_DIRS}
)
if (FONTCONFIG_INCLUDE_DIR AND NOT FONTCONFIG_VERSION)
file(STRINGS ${FONTCONFIG_INCLUDE_DIR}/fontconfig/fontconfig.h _contents REGEX "^#define[ \t]+FC_[A-Z]+[ \t]+[0-9]+$")
unset(FONTCONFIG_VERSION)
foreach(VPART MAJOR MINOR REVISION)
foreach(VLINE ${_contents})
if(VLINE MATCHES "^#define[\t ]+FC_${VPART}[\t ]+([0-9]+)$")
set(FONTCONFIG_VERSION_PART "${CMAKE_MATCH_1}")
if(FONTCONFIG_VERSION)
string(APPEND FONTCONFIG_VERSION ".${FONTCONFIG_VERSION_PART}")
else()
set(FONTCONFIG_VERSION "${FONTCONFIG_VERSION_PART}")
endif()
endif()
endforeach()
endforeach()
endif ()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Fontconfig
FOUND_VAR
FONTCONFIG_FOUND
REQUIRED_VARS
FONTCONFIG_LIBRARY
FONTCONFIG_INCLUDE_DIR
VERSION_VAR
FONTCONFIG_VERSION
)
if(FONTCONFIG_FOUND AND NOT TARGET Fontconfig::Fontconfig)
add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED)
set_target_properties(Fontconfig::Fontconfig PROPERTIES
IMPORTED_LOCATION "${FONTCONFIG_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${FONTCONFIG_COMPILE_OPTIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${FONTCONFIG_INCLUDE_DIR}"
)
endif()
mark_as_advanced(FONTCONFIG_LIBRARY FONTCONFIG_INCLUDE_DIR)
if(FONTCONFIG_FOUND)
set(FONTCONFIG_LIBRARIES ${FONTCONFIG_LIBRARY})
set(FONTCONFIG_INCLUDE_DIRS ${FONTCONFIG_INCLUDE_DIR})
endif()

View File

@@ -1,117 +0,0 @@
# - Locate FreeType library
# This module defines
# FREETYPE_LIBRARY, the library to link against
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
# FREETYPE_INCLUDE_DIRS, where to find headers.
# This is the concatenation of the paths:
# FREETYPE_INCLUDE_DIR_ft2build
# FREETYPE_INCLUDE_DIR_freetype2
#
# $FREETYPE_DIR is an environment variable that would
# correspond to the ./configure --prefix=$FREETYPE_DIR
# used in building FREETYPE.
# Created by Eric Wing.
# Ugh, FreeType seems to use some #include trickery which
# makes this harder than it should be. It looks like they
# put ft2build.h in a common/easier-to-find location which
# then contains a #include to a more specific header in a
# more specific location (#include <freetype/config/ftheader.h>).
# Then from there, they need to set a bunch of #define's
# so you can do something like:
# #include FT_FREETYPE_H
# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
# wants explicit full paths and this trickery doesn't work too well.
# I'm going to attempt to cut out the middleman and hope
# everything still works.
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
PATHS
$ENV{FREETYPE_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
PATHS
/usr/local
/usr
/usr/local/X11R6
/usr/local/X11
/usr/X11R6
/usr/X11
/sw
/opt/local
/opt/csw
/opt
/usr/freeware
PATH_SUFFIXES include
)
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
$ENV{FREETYPE_DIR}/include/freetype2
NO_DEFAULT_PATH
)
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
NO_DEFAULT_PATH
PATH_SUFFIXES include/freetype2
)
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
/usr/local/include/freetype2
/usr/include/freetype2
/usr/local/X11R6/include/freetype2
/usr/local/X11/include/freetype2
/usr/X11R6/include/freetype2
/usr/X11/include/freetype2
/sw/include/freetype2
/opt/local/include/freetype2
/opt/csw/include/freetype2
/opt/include/freetype2
/usr/freeware/include/freetype2
)
FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
PATHS
$ENV{FREETYPE_DIR}
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
PATHS
/usr/local
/usr
/usr/local/X11R6
/usr/local/X11
/usr/X11R6
/usr/X11
/sw
/opt/local
/opt/csw
/opt
/usr/freeware
PATH_SUFFIXES lib64 lib
)
IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
SET(FREETYPE_FOUND "NO")
IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
SET(FREETYPE_FOUND "YES")
ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)

View File

@@ -0,0 +1,188 @@
#.rst:
# FindFreetype
# ------------
#
# Locate FreeType library
#
# This module defines
#
# ::
#
# FREETYPE_LIBRARIES, the library to link against
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
# FREETYPE_INCLUDE_DIRS, where to find headers.
# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8)
# This is the concatenation of the paths:
# FREETYPE_INCLUDE_DIR_ft2build
# FREETYPE_INCLUDE_DIR_freetype2
#
#
#
# $FREETYPE_DIR is an environment variable that would correspond to the
# ./configure --prefix=$FREETYPE_DIR used in building FREETYPE.
#=============================================================================
# Copyright 2000-2016 Kitware, Inc.
# Copyright 2000-2011 Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
# Created by Eric Wing.
# Modifications by Alexander Neundorf.
# This file has been renamed to "FindFreetype.cmake" instead of the correct
# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex.
# Ugh, FreeType seems to use some #include trickery which
# makes this harder than it should be. It looks like they
# put ft2build.h in a common/easier-to-find location which
# then contains a #include to a more specific header in a
# more specific location (#include <freetype/config/ftheader.h>).
# Then from there, they need to set a bunch of #define's
# so you can do something like:
# #include FT_FREETYPE_H
# Unfortunately, using CMake's mechanisms like include_directories()
# wants explicit full paths and this trickery doesn't work too well.
# I'm going to attempt to cut out the middleman and hope
# everything still works.
# Adapted for OpenSceneGraph until the updates here for finding the debug Windows library freetyped are released with CMake
set(FREETYPE_FIND_ARGS
HINTS
ENV FREETYPE_DIR
PATHS
/usr/X11R6
/usr/local/X11R6
/usr/local/X11
/usr/freeware
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
)
find_path(
FREETYPE_INCLUDE_DIR_ft2build
ft2build.h
${FREETYPE_FIND_ARGS}
PATH_SUFFIXES
include/freetype2
include
freetype2
)
find_path(
FREETYPE_INCLUDE_DIR_freetype2
NAMES
freetype/config/ftheader.h
config/ftheader.h
${FREETYPE_FIND_ARGS}
PATH_SUFFIXES
include/freetype2
include
freetype2
)
if(NOT FREETYPE_LIBRARY)
find_library(FREETYPE_LIBRARY_RELEASE
NAMES
freetype
libfreetype
freetype219
${FREETYPE_FIND_ARGS}
PATH_SUFFIXES
lib
)
find_library(FREETYPE_LIBRARY_DEBUG
NAMES
freetyped
libfreetyped
freetype219d
${FREETYPE_FIND_ARGS}
PATH_SUFFIXES
lib
)
include(SelectLibraryConfigurations) #OSG Look in CMake Modules dir
select_library_configurations(FREETYPE)
endif()
unset(FREETYPE_FIND_ARGS)
# set the user variables
if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS)
endif()
set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
endif()
if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H)
file(STRINGS "${FREETYPE_H}" freetype_version_str
REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
unset(FREETYPE_VERSION_STRING)
foreach(VPART MAJOR MINOR PATCH)
foreach(VLINE ${freetype_version_str})
if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$")
set(FREETYPE_VERSION_PART "${CMAKE_MATCH_1}")
if(FREETYPE_VERSION_STRING)
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}")
else()
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}")
endif()
unset(FREETYPE_VERSION_PART)
endif()
endforeach()
endforeach()
endif()
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs) #OSG Look in CMake Modules dir
find_package_handle_standard_args(
Freetype
REQUIRED_VARS
FREETYPE_LIBRARY
FREETYPE_INCLUDE_DIRS
VERSION_VAR
FREETYPE_VERSION_STRING
)
mark_as_advanced(
FREETYPE_INCLUDE_DIR_freetype2
FREETYPE_INCLUDE_DIR_ft2build
)

View File

@@ -19,6 +19,15 @@
# This makes the presumption that you are include gdal.h like
# #include "gdal.h"
# prefer FindGDAL from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindGDAL.cmake)
include(${CMAKE_ROOT}/Modules/FindGDAL.cmake)
if(GDAL_FOUND)
return()
endif()
endif()
FIND_PATH(GDAL_INCLUDE_DIR gdal.h
PATHS
$ENV{GDAL_DIR}

View File

@@ -0,0 +1,36 @@
# Finds the OpenGL Core Profile (cp) header file.
# Looks for glcorearb.h
#
# This script defines the following:
# GLCORE_FOUND // Set to TRUE if glcorearb.h is found
# GLCORE_INCLUDE_DIR // Parent directory of directory (gl, GL3, or OpenGL) containing the CP header.
# GLCORE_GLCOREARB_HEADER // advanced
#
# GLCORE_ROOT can be set as an environment variable or a CMake variable,
# to the parent directory of the gl, GL3, or OpenGL directory containing the CP header.
#
FIND_PATH( GLCORE_GLCOREARB_HEADER
NAMES GL/glcorearb.h GL3/glcorearb.h OpenGL/glcorearb.h gl/glcorearb.h
HINTS ${GLCORE_ROOT}
PATHS ENV GLCORE_ROOT
)
set( GLCORE_INCLUDE_DIR )
if( GLCORE_GLCOREARB_HEADER )
set( GLCORE_INCLUDE_DIR ${GLCORE_GLCOREARB_HEADER} )
endif()
# handle the QUIETLY and REQUIRED arguments and set
# GLCORE_FOUND to TRUE as appropriate
INCLUDE( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( GLCORE
"Set GLCORE_ROOT as the parent of the directory containing the OpenGL core profile header."
GLCORE_INCLUDE_DIR )
MARK_AS_ADVANCED(
GLCORE_INCLUDE_DIR
GLCORE_GLCOREARB_HEADER
)

142
CMakeModules/FindGLIB.cmake Normal file
View File

@@ -0,0 +1,142 @@
# - Try to find Glib and its components (gio, gobject etc)
# Once done, this will define
#
# GLIB_FOUND - system has Glib
# GLIB_INCLUDE_DIRS - the Glib include directories
# GLIB_LIBRARIES - link these to use Glib
#
# Optionally, the COMPONENTS keyword can be passed to find_package()
# and Glib components can be looked for. Currently, the following
# components can be used, and they define the following variables if
# found:
#
# gio: GLIB_GIO_LIBRARIES
# gobject: GLIB_GOBJECT_LIBRARIES
# gmodule: GLIB_GMODULE_LIBRARIES
# gthread: GLIB_GTHREAD_LIBRARIES
#
# Note that the respective _INCLUDE_DIR variables are not set, since
# all headers are in the same directory as GLIB_INCLUDE_DIRS.
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (WIN32)
find_library(GLIB_LIBRARIES
NAMES glib-2.0
PATHS C:/gstreamer/1.0/x86_64/lib
)
else ()
find_package(PkgConfig)
pkg_check_modules(PC_GLIB QUIET glib-2.0)
find_library(GLIB_LIBRARIES
NAMES glib-2.0
HINTS ${PC_GLIB_LIBDIR}
${PC_GLIB_LIBRARY_DIRS}
)
endif ()
# Files in glib's main include path may include glibconfig.h, which,
# for some odd reason, is normally in $LIBDIR/glib-2.0/include.
get_filename_component(_GLIB_LIBRARY_DIR ${GLIB_LIBRARIES} PATH)
find_path(GLIBCONFIG_INCLUDE_DIR
NAMES glibconfig.h
HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${_GLIB_LIBRARY_DIR}
PATH_SUFFIXES glib-2.0/include
)
if (WIN32)
find_path(GLIB_INCLUDE_DIR
NAMES glib.h
PATHS C:/gstreamer/1.0/x86_64/include
PATH_SUFFIXES glib-2.0
)
else()
find_path(GLIB_INCLUDE_DIR
NAMES glib.h
HINTS ${PC_GLIB_INCLUDEDIR}
${PC_GLIB_INCLUDE_DIRS}
PATH_SUFFIXES glib-2.0
)
endif()
if (GLIBCONFIG_INCLUDE_DIR)
set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})
# Version detection
file(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
string(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
set(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
set(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
set(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
set(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")
# Additional Glib components. We only look for libraries, as not all of them
# have corresponding headers and all headers are installed alongside the main
# glib ones.
foreach (_component ${GLIB_FIND_COMPONENTS})
if (${_component} STREQUAL "gio")
find_library(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
elseif (${_component} STREQUAL "gobject")
find_library(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
elseif (${_component} STREQUAL "gmodule")
find_library(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES)
elseif (${_component} STREQUAL "gthread")
find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
elseif (${_component} STREQUAL "gio-unix")
# gio-unix is compiled as part of the gio library, but the include paths
# are separate from the shared glib ones. Since this is currently only used
# by WebKitGTK+ we don't go to extraordinary measures beyond pkg-config.
pkg_check_modules(GIO_UNIX QUIET gio-unix-2.0)
endif ()
endforeach ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS}
VERSION_VAR GLIB_VERSION)
mark_as_advanced(
GLIBCONFIG_INCLUDE_DIR
GLIB_GIO_LIBRARIES
GLIB_GIO_UNIX_LIBRARIES
GLIB_GMODULE_LIBRARIES
GLIB_GOBJECT_LIBRARIES
GLIB_GTHREAD_LIBRARIES
GLIB_INCLUDE_DIR
GLIB_INCLUDE_DIRS
GLIB_LIBRARIES
)
else()
endif ()

View File

@@ -0,0 +1,174 @@
# - Try to find GStreamer and its plugins
# Once done, this will define
#
# GSTREAMER_FOUND - system has GStreamer
# GSTREAMER_INCLUDE_DIRS - the GStreamer include directories
# GSTREAMER_LIBRARIES - link these to use GStreamer
#
# Additionally, gstreamer-base is always looked for and required, and
# the following related variables are defined:
#
# GSTREAMER_BASE_INCLUDE_DIRS - gstreamer-base's include directory
# GSTREAMER_BASE_LIBRARIES - link to these to use gstreamer-base
#
# Optionally, the COMPONENTS keyword can be passed to find_package()
# and GStreamer plugins can be looked for. Currently, the following
# plugins can be searched, and they define the following variables if
# found:
#
# gstreamer-app: GSTREAMER_APP_INCLUDE_DIRS and GSTREAMER_APP_LIBRARIES
# gstreamer-audio: GSTREAMER_AUDIO_INCLUDE_DIRS and GSTREAMER_AUDIO_LIBRARIES
# gstreamer-fft: GSTREAMER_FFT_INCLUDE_DIRS and GSTREAMER_FFT_LIBRARIES
# gstreamer-pbutils: GSTREAMER_PBUTILS_INCLUDE_DIRS and GSTREAMER_PBUTILS_LIBRARIES
# gstreamer-video: GSTREAMER_VIDEO_INCLUDE_DIRS and GSTREAMER_VIDEO_LIBRARIES
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Helper macro to find a GStreamer plugin (or GStreamer itself)
# _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_AUDIO")
# _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
# _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").
# _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
#macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
# pkg_check_modules(PC_${_component_prefix} QUIET ${_pkgconfig_name})
#
# find_path(${_component_prefix}_INCLUDE_DIRS
# NAMES ${_header}
# HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
# PATH_SUFFIXES gstreamer-1.0
# )
#
# find_library(${_component_prefix}_LIBRARIES
# NAMES ${_library}
# HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
# )
#endmacro()
if (MSVC)
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
find_path(${_component_prefix}_INCLUDE_DIRS
NAMES ${_header}
PATHS C:/gstreamer/1.0/x86_64/include
PATH_SUFFIXES gstreamer-1.0
)
find_library(${_component_prefix}_LIBRARIES
NAMES ${_library}
PATHS C:/gstreamer/1.0/x86_64/lib
)
endmacro()
else ()
find_package(PkgConfig)
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
pkg_check_modules(${_component_prefix} QUIET ${_pkgconfig_name})
# find_path(${_component_prefix}_INCLUDE_DIRS
# NAMES ${_header}
# HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
# PATH_SUFFIXES gstreamer-1.0
# )
# find_library(${_component_prefix}_LIBRARIES
# NAMES ${_library}
# HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
# )
endmacro()
endif ()
# ------------------------
# 1. Find GStreamer itself
# ------------------------
# 1.1. Find headers and libraries
FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gst/gst.h gstreamer-1.0)
FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gst/gst.h gstbase-1.0)
# 1.2. Check GStreamer version
if (GSTREAMER_INCLUDE_DIRS)
if (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")
file(READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
set(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
set(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
set(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")
set(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")
endif ()
endif ()
if ("${GStreamer_FIND_VERSION}" VERSION_GREATER "${GSTREAMER_VERSION}")
message(FATAL_ERROR "Required version (" ${GStreamer_FIND_VERSION} ") is higher than found version (" ${GSTREAMER_VERSION} ")")
endif ()
# -------------------------
# 2. Find GStreamer plugins
# -------------------------
FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)
FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)
FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)
FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)
FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)
# ------------------------------------------------
# 3. Process the COMPONENTS passed to FIND_PACKAGE
# ------------------------------------------------
set(_GSTREAMER_REQUIRED_VARS GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES)
foreach (_component ${GStreamer_FIND_COMPONENTS})
set(_gst_component "GSTREAMER_${_component}")
string(TOUPPER ${_gst_component} _UPPER_NAME)
list(APPEND _GSTREAMER_REQUIRED_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
endforeach ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer REQUIRED_VARS ${_GSTREAMER_REQUIRED_VARS}
VERSION_VAR GSTREAMER_VERSION)
mark_as_advanced(
GSTREAMER_APP_INCLUDE_DIRS
GSTREAMER_APP_LIBRARIES
GSTREAMER_AUDIO_INCLUDE_DIRS
GSTREAMER_AUDIO_LIBRARIES
GSTREAMER_BASE_INCLUDE_DIRS
GSTREAMER_BASE_LIBRARIES
GSTREAMER_FFT_INCLUDE_DIRS
GSTREAMER_FFT_LIBRARIES
GSTREAMER_INCLUDE_DIRS
GSTREAMER_LIBRARIES
GSTREAMER_PBUTILS_INCLUDE_DIRS
GSTREAMER_PBUTILS_LIBRARIES
GSTREAMER_VIDEO_INCLUDE_DIRS
GSTREAMER_VIDEO_LIBRARIES
)

View File

@@ -16,41 +16,42 @@ IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(GTA gta)
ELSE(PKG_CONFIG_FOUND)
FIND_PATH(GTA_INCLUDE_DIRS gta/gta.hpp
$ENV{GTA_DIR}/include
$ENV{GTA_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
)
FIND_LIBRARY(GTA_LIBRARIES
NAMES gta libgta
PATHS
$ENV{GTA_DIR}/lib
$ENV{GTA_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
SET(GTA_FOUND "NO")
IF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS)
SET(GTA_FOUND "YES")
ENDIF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS)
ENDIF(PKG_CONFIG_FOUND)
IF(NOT GTA_FOUND)
FIND_PATH(GTA_INCLUDE_DIRS gta/gta.hpp
$ENV{GTA_DIR}/include
$ENV{GTA_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
)
FIND_LIBRARY(GTA_LIBRARY
NAMES gta libgta
PATHS
$ENV{GTA_DIR}/lib
$ENV{GTA_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
SET(GTA_FOUND "NO")
IF(GTA_LIBRARY AND GTA_INCLUDE_DIRS)
SET(GTA_FOUND "YES")
ENDIF(GTA_LIBRARY AND GTA_INCLUDE_DIRS)
ENDIF(NOT GTA_FOUND)

View File

@@ -9,6 +9,15 @@
#
# Created by Robert Osfield.
# prefer FindJasper from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindJasper.cmake)
include(${CMAKE_ROOT}/Modules/FindJasper.cmake)
if(JASPER_FOUND)
return()
endif()
endif()
FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h
$ENV{JASPER_DIR}/include
$ENV{JASPER_DIR}/src/libjasper/include

View File

@@ -0,0 +1,108 @@
#---
# File: FindLIBLAS.cmake
#
# Find the native LIBLAS includes and library
#
# LIBLAS_INCLUDE_DIRS - where to find liblas's includes.
# LIBLAS_LIBRARIES - List of libraries when using liblas.
# LIBLAS_FOUND - True if liblas found.
#---
# Set the include dir:
find_path(LIBLAS_INCLUDE_DIR liblas/liblas.hpp)
# Macro for setting libraries:
macro(FIND_LIBLAS_LIBRARY MYLIBRARY MYLIBRARYNAME)
find_library(
"${MYLIBRARY}_DEBUG"
NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}" "lib${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
PATHS
${LIBLAS_DIR}/lib/Debug
${LIBLAS_DIR}/lib64/Debug
${LIBLAS_DIR}/lib
${LIBLAS_DIR}/lib64
$ENV{LIBLAS_DIR}/lib/debug
$ENV{LIBLAS_DIR}/lib64/debug
NO_DEFAULT_PATH
)
find_library(
"${MYLIBRARY}_DEBUG"
NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}" "lib${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;LIBLAS_ROOT]/lib
/usr/freeware/lib64
)
find_library(
${MYLIBRARY}
NAMES "${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}" "lib${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}"
PATHS
${LIBLAS_DIR}/lib/Release
${LIBLAS_DIR}/lib64/Release
${LIBLAS_DIR}/lib
${LIBLAS_DIR}/lib64
$ENV{LIBLAS_DIR}/lib/Release
$ENV{LIBLAS_DIR}/lib64/Release
$ENV{LIBLAS_DIR}/lib
$ENV{LIBLAS_DIR}/lib64
$ENV{LIBLAS_DIR}
$ENV{LIBLASDIR}/lib
$ENV{LIBLASDIR}/lib64
$ENV{LIBLASDIR}
$ENV{LIBLAS_ROOT}/lib
$ENV{LIBLAS_ROOT}/lib64
NO_DEFAULT_PATH
)
find_library(
${MYLIBRARY}
NAMES "${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}" "lib${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}"
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;LIBLAS_ROOT]/lib
/usr/freeware/lib64
)
if( NOT ${MYLIBRARY}_DEBUG )
if( MYLIBRARY )
set( ${MYLIBRARY}_DEBUG ${MYLIBRARY} )
endif(MYLIBRARY)
endif( NOT ${MYLIBRARY}_DEBUG )
endmacro(FIND_LIBLAS_LIBRARY LIBRARY LIBRARYNAME)
FIND_LIBLAS_LIBRARY(LIBLAS_LIBRARY las)
set(LIBLAS_FOUND "NO")
if(LIBLAS_LIBRARY AND LIBLAS_INCLUDE_DIR)
FIND_PACKAGE(Boost) # used by LIBLAS
if(Boost_FOUND)
set(LIBLAS_LIBRARIES ${LIBLAS_LIBRARY} )
set(LIBLAS_FOUND "YES")
if(WIN32)
link_directories(${Boost_LIBRARY_DIRS})
endif()
endif()
endif()

View File

@@ -0,0 +1,83 @@
# Locate Lua library
# This module defines
# LUA51_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
#
# Note that the expected include convention is
# #include "lua.h"
# and not
# #include <lua/lua.h>
# This is because, the lua location is not standardized and may exist
# in locations other than lua/
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
find_path(LUA_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/lua52 include/lua5.2 include/lua include
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(LUA_LIBRARY
NAMES lua52 lua5.2 lua-5.2 lua
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
if(LUA_LIBRARY)
# include the math library for Unix
if(UNIX AND NOT APPLE)
find_library(LUA_MATH_LIBRARY m)
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
else()
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
endif()
endif()
if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
unset(lua_version_str)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua52
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)

View File

@@ -15,7 +15,8 @@ FIND_PATH(NVTT_INCLUDE_DIR nvtt/nvtt.h
PATH_SUFFIXES include
)
FIND_LIBRARY(NVTT_LIBRARY
# NVTT
FIND_LIBRARY(NVTT_LIBRARY_RELEASE
NAMES nvtt
PATHS
/usr/local
@@ -25,7 +26,18 @@ FIND_LIBRARY(NVTT_LIBRARY
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
FIND_LIBRARY(NVIMAGE_LIBRARY
FIND_LIBRARY(NVTT_LIBRARY_DEBUG
NAMES nvtt_d
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
# NVIMAGE
FIND_LIBRARY(NVIMAGE_LIBRARY_RELEASE
NAMES nvimage
PATHS
/usr/local
@@ -35,7 +47,18 @@ FIND_LIBRARY(NVIMAGE_LIBRARY
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
FIND_LIBRARY(NVMATH_LIBRARY
FIND_LIBRARY(NVIMAGE_LIBRARY_DEBUG
NAMES nvimage_d
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
# NVMATH
FIND_LIBRARY(NVMATH_LIBRARY_RELEASE
NAMES nvmath
PATHS
/usr/local
@@ -45,8 +68,8 @@ FIND_LIBRARY(NVMATH_LIBRARY
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
FIND_LIBRARY(NVCORE_LIBRARY
NAMES nvcore
FIND_LIBRARY(NVMATH_LIBRARY_DEBUG
NAMES nvmath_d
PATHS
/usr/local
/usr
@@ -55,7 +78,134 @@ FIND_LIBRARY(NVCORE_LIBRARY
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
# NVCORE
FIND_LIBRARY(NVCORE_LIBRARY_RELEASE
NAMES nvcore
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
FIND_LIBRARY(NVCORE_LIBRARY_DEBUG
NAMES nvcore_d
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
# NVTHREAD
FIND_LIBRARY(NVTHREAD_LIBRARY_RELEASE
NAMES nvthread
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
FIND_LIBRARY(NVTHREAD_LIBRARY_DEBUG
NAMES nvthread_d
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
# SQUISH
FIND_LIBRARY(NVSQUISH_LIBRARY_RELEASE
NAMES squish
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
FIND_LIBRARY(NVSQUISH_LIBRARY_DEBUG
NAMES squish_d
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
# BC6H
FIND_LIBRARY(NVBC6H_LIBRARY_RELEASE
NAMES bc6h
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
FIND_LIBRARY(NVBC6H_LIBRARY_DEBUG
NAMES bc6h_d
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
# BC7
FIND_LIBRARY(NVBC7_LIBRARY_RELEASE
NAMES bc7
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
FIND_LIBRARY(NVBC7_LIBRARY_DEBUG
NAMES bc7_d
PATHS
/usr/local
/usr
$ENV{NVTT_DIR}
${3rdPartyRoot}
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
)
IF (WIN32)
SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE" "NVTHREAD" "NVBC7" "NVBC6H" "NVSQUISH")
ELSE()
SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE")
ENDIF()
FOREACH(LIB ${LIBS_TO_SETUP})
IF(${LIB}_LIBRARY_DEBUG)
SET(${LIB}_LIBRARIES optimized ${${LIB}_LIBRARY_RELEASE} debug ${${LIB}_LIBRARY_DEBUG})
ELSE(${LIB}_LIBRARY_DEBUG)
SET(${LIB}_LIBRARY_DEBUG ${${LIB}_LIBRARY_RELEASE})
SET(${LIB}_LIBRARIES optimized ${${LIB}_LIBRARY_RELEASE} debug ${${LIB}_LIBRARY_DEBUG})
ENDIF(${LIB}_LIBRARY_DEBUG)
ENDFOREACH(LIB ${LIBS_TO_SETUP})
SET(NVTT_LIBRARIES
${NVTT_LIBRARIES}
${NVCORE_LIBRARIES}
${NVMATH_LIBRARIES}
${NVIMAGE_LIBRARIES}
${NVTHREAD_LIBRARIES}
${NVBC7_LIBRARIES}
${NVBC6H_LIBRARIES}
${NVSQUISH_LIBRARIES}
)
SET(NVTT_FOUND "NO")
IF(NVTT_LIBRARY AND NVTT_INCLUDE_DIR)
SET(NVTT_FOUND "YES")
ENDIF(NVTT_LIBRARY AND NVTT_INCLUDE_DIR)
IF(NVTT_LIBRARY_RELEASE AND NVTT_INCLUDE_DIR)
SET(NVTT_FOUND "YES" )
ENDIF(NVTT_LIBRARY_RELEASE AND NVTT_INCLUDE_DIR)

View File

@@ -1,13 +1,13 @@
# Locate gdal
# This module defines
# OSG_LIBRARY
# OSG_FOUND, if false, do not try to link to gdal
# OSG_FOUND, if false, do not try to link to gdal
# OSG_INCLUDE_DIR, where to find the headers
#
# $OSG_DIR is an environment variable that would
# correspond to the ./configure --prefix=$OSG_DIR
#
# Created by Robert Osfield.
# Created by Robert Osfield.
FIND_PATH(OSG_INCLUDE_DIR osg/Node
${OSG_DIR}/include
@@ -59,7 +59,7 @@ MACRO(FIND_OSG_LIBRARY MYLIBRARY MYLIBRARYNAME)
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
/usr/freeware/lib64
)
FIND_LIBRARY(${MYLIBRARY}
NAMES "${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}"
PATHS
@@ -107,7 +107,7 @@ MACRO(FIND_OSG_LIBRARY MYLIBRARY MYLIBRARYNAME)
ENDIF(NOT MYLIBRARY)
ENDIF( NOT ${MYLIBRARY}_DEBUG )
ENDMACRO(FIND_OSG_LIBRARY LIBRARY LIBRARYNAME)
FIND_OSG_LIBRARY(OSG_LIBRARY osg)
@@ -116,7 +116,6 @@ FIND_OSG_LIBRARY(OSGUTIL_LIBRARY osgUtil)
FIND_OSG_LIBRARY(OSGDB_LIBRARY osgDB)
FIND_OSG_LIBRARY(OSGTEXT_LIBRARY osgText)
FIND_OSG_LIBRARY(OSGWIDGET_LIBRARY osgWidget)
FIND_OSG_LIBRARY(OSGQT_LIBRARY osgQt)
FIND_OSG_LIBRARY(OSGTERRAIN_LIBRARY osgTerrain)
FIND_OSG_LIBRARY(OSGFX_LIBRARY osgFX)
FIND_OSG_LIBRARY(OSGVIEWER_LIBRARY osgViewer)
@@ -126,7 +125,7 @@ FIND_OSG_LIBRARY(OSGANIMATION_LIBRARY osgAnimation)
FIND_OSG_LIBRARY(OSGPARTICLE_LIBRARY osgParticle)
FIND_OSG_LIBRARY(OSGSHADOW_LIBRARY osgShadow)
FIND_OSG_LIBRARY(OSGPRESENTATION_LIBRARY osgPresentation)
FIND_OSG_LIBRARY(OSGSIM osgSim)
FIND_OSG_LIBRARY(OSGSIM_LIBRARY osgSim)
FIND_OSG_LIBRARY(OPENTHREADS_LIBRARY OpenThreads)

View File

@@ -0,0 +1,174 @@
# LocateOPENCASCADE
# This module defines
# OPENCASCADE_LIBRARY
# OPENCASCADE_FOUND, if false, do not try to link to OPENCASCADE
# OPENCASCADE_INCLUDE_DIR, where to find the headers
#
# $OPENCASCADE_DIR is an environment variable that would
# correspond to the ./configure --prefix=$OPENCASCADE_DIR
# used in building OPENCASCADE.
FIND_PATH(OPENCASCADE_INCLUDE_DIR Standard_Version.hxx
PATHS
${OPENCASCADE_DIR}
$ENV{OPENCASCADE_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
/usr/freeware
PATH_SUFFIXES
opencascade
inc
include
inc/cascade
include/cascade
)
MACRO(FIND_OPENCASCADE_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY("${MYLIBRARY}"
NAMES "${MYLIBRARYNAME}"
PATHS
$ENV{OPENCASCADE_DIR}/lib}
$ENV{OPENCASCADE_LIB}
${OPENCASCADE_DIR}/lib
$ENV{OPENCASCADE_DIR}/lib
${OPENCASCADE_DIR}/lib/
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
ENDMACRO()
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBinL TKBinL)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBin TKBin)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBinTObj TKBinTObj)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBinXCAF TKBinXCAF)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBool TKBool)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBO TKBO)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBRep TKBRep)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCAF TKCAF)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCDF TKCDF)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKernel TKernel)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFeat TKFeat)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFillet TKFillet)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKG2d TKG2d)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKG3d TKG3d)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKGeomAlgo TKGeomAlgo)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKGeomBase TKGeomBase)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKHLR TKHLR)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKIGES TKIGES)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKLCAF TKLCAF)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMath TKMath)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMesh TKMesh)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMeshVS TKMeshVS)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKOffset TKOffset)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKOpenGl TKOpenGl)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPrim TKPrim)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKService TKService)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKShHealing TKShHealing)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP209 TKSTEP209)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPAttr TKSTEPAttr)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPBase TKSTEPBase)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP TKSTEP)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTL TKSTL)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTObj TKTObj)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTopAlgo TKTopAlgo)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKV3d TKV3d)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKVRML TKVRML)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDEIGES TKXDEIGES)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDESTEP TKXDESTEP)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXMesh TKXMesh)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlL TKXmlL)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXml TKXml)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlTObj TKXmlTObj)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlXCAF TKXmlXCAF)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXSBase TKXSBase)
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXCAF TKXCAF)
set (OPENCASCADE_LIBRARY_TYPE_DESCR
"Specifies the type of library to be used. 'Shared' libraries
are linked dynamically and loaded at runtime. 'Static' libraries
are archives of object files for use when linking other targets")
# set type of OCCT libraries
if (NOT OPENCASCADE_LIBRARY_TYPE)
set (OPENCASCADE_LIBRARY_TYPE "Static" CACHE STRING "${OPENCASCADE_LIBRARY_TYPE_DESCR}" FORCE)
SET_PROPERTY(CACHE OPENCASCADE_LIBRARY_TYPE PROPERTY STRINGS Shared Static)
endif()
if ("${OPENCASCADE_LIBRARY_TYPE}" STREQUAL "Shared")
SET(OPENCASCADE_LIBRARY ${OPENCASCADE_LIBRARY}
${OPENCASCADE_TKernel}
${OPENCASCADE_TKMath}
${OPENCASCADE_TKXCAF}
${OPENCASCADE_TKXSBase}
${OPENCASCADE_TKSTEPAttr}
${OPENCASCADE_TKSTEPBase}
${OPENCASCADE_TKSTEP209}
${OPENCASCADE_TKSTEP}
${OPENCASCADE_TKXDESTEP}
${OPENCASCADE_TKIGES}
${OPENCASCADE_TKXDEIGES}
${OPENCASCADE_TKLCAF}
${OPENCASCADE_TKBRep}
${OPENCASCADE_TKMesh}
${OPENCASCADE_TKTopAlgo}
${OPENCASCADE_TKShHealing}
)
else ("${OPENCASCADE_LIBRARY_TYPE}" STREQUAL "Shared")
SET(OPENCASCADE_LIBRARY ${OPENCASCADE_LIBRARY}
${OPENCASCADE_TKBO}
${OPENCASCADE_TKBool}
${OPENCASCADE_TKBRep}
${OPENCASCADE_TKCAF}
${OPENCASCADE_TKCDF}
${OPENCASCADE_TKernel}
${OPENCASCADE_TKG2d}
${OPENCASCADE_TKG3d}
${OPENCASCADE_TKGeomAlgo}
${OPENCASCADE_TKGeomBase}
${OPENCASCADE_TKHLR}
${OPENCASCADE_TKIGES}
${OPENCASCADE_TKLCAF}
${OPENCASCADE_TKMath}
${OPENCASCADE_TKMesh}
${OPENCASCADE_TKPrim}
${OPENCASCADE_TKService}
${OPENCASCADE_TKShHealing}
${OPENCASCADE_TKSTEP}
${OPENCASCADE_TKSTEP209}
${OPENCASCADE_TKSTEPAttr}
${OPENCASCADE_TKSTEPBase}
${OPENCASCADE_TKTopAlgo}
${OPENCASCADE_TKV3d}
${OPENCASCADE_TKXCAF}
${OPENCASCADE_TKXDEIGES}
${OPENCASCADE_TKXDESTEP}
${OPENCASCADE_TKXSBase}
)
endif ("${OPENCASCADE_LIBRARY_TYPE}" STREQUAL "Shared")
SET(OPENCASCADE_FOUND "NO")
IF(OPENCASCADE_LIBRARY AND OPENCASCADE_INCLUDE_DIR)
SET(OPENCASCADE_FOUND "YES")
ENDIF(OPENCASCADE_LIBRARY AND OPENCASCADE_INCLUDE_DIR)
IF(OPENCASCADE_INCLUDE_DIR)
SET(OPENCASCADE_FOUND "YES")
ENDIF(OPENCASCADE_INCLUDE_DIR)

View File

@@ -9,6 +9,7 @@
#
# Created by Robert Osfield.
FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/ImfIO.h
$ENV{OPENEXR_DIR}/include
$ENV{OPENEXR_DIR}
@@ -23,78 +24,38 @@ FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/ImfIO.h
/usr/freeware/include
)
FIND_LIBRARY(OPENEXR_IlmIlf_LIBRARY
NAMES IlmImf
PATHS
$ENV{OPENEXR_DIR}/lib
$ENV{OPENEXR_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
# Macro to find exr libraries (deduplicating search paths)
# example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf)
MACRO(OPENEXR_FIND_VAR varname libname)
FIND_LIBRARY( ${varname}
NAMES ${libname} ${libname}-2_1 ${libname}-2_2
PATHS
$ENV{OPENEXR_DIR}/lib
$ENV{OPENEXR_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
ENDMACRO(OPENEXR_FIND_VAR)
FIND_LIBRARY(OPENEXR_IlmThread_LIBRARY
NAMES IlmThread
PATHS
$ENV{OPENEXR_DIR}/lib
$ENV{OPENEXR_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
# Macro to find exr libraries (and debug versions)
# example: OPENEXR_FIND(IlmImf)
MACRO(OPENEXR_FIND libname)
OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY ${libname})
OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY_DEBUG ${libname}d)
ENDMACRO(OPENEXR_FIND)
FIND_LIBRARY(OPENEXR_Iex_LIBRARY
NAMES Iex
PATHS
$ENV{OPENEXR_DIR}/lib
$ENV{OPENEXR_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
FIND_LIBRARY(OPENEXR_Half_LIBRARY
NAMES Half
PATHS
$ENV{OPENEXR_DIR}/lib
$ENV{OPENEXR_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
OPENEXR_FIND(IlmImf)
SET(OPENEXR_FOUND "NO")
IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmIlf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY)
SET(OPENEXR_LIBRARIES
${OPENEXR_IlmIlf_LIBRARY}
${OPENEXR_IlmThread_LIBRARY}
${OPENEXR_Half_LIBRARY}
${OPENEXR_Iex_LIBRARY}
)
IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY)
SET(OPENEXR_LIBRARIES ${OPENEXR_IlmImf_LIBRARY} )
SET(OPENEXR_LIBRARIES_VARS OPENEXR_IlmImf_LIBRARY )
SET(OPENEXR_FOUND "YES")
ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmIlf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY)
ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY)

View File

@@ -17,6 +17,16 @@
#
# Created by Eric Wing.
# prefer FindOpenThreads from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindOpenThreads.cmake)
include(${CMAKE_ROOT}/Modules/FindOpenThreads.cmake)
if(OPENTHREADS_FOUND)
return()
endif()
endif()
# Header files are presumed to be included like
# #include <OpenThreads/Thread>

View File

@@ -1,270 +0,0 @@
# - find DCMTK libraries
#
# DCMTK_INCLUDE_DIRS - Directories to include to use DCMTK
# DCMTK_LIBRARIES - Files to link against to use DCMTK
# DCMTK_FOUND - If false, don't try to use DCMTK
# DCMTK_DIR - (optional) Source directory for DCMTK
#
# DCMTK_DIR can be used to make it simpler to find the various include
# directories and compiled libraries if you've just compiled it in the
# source tree. Just set it to the root of the tree where you extracted
# the source.
#
# Written for VXL by Amitha Perera.
# Modified by Robert Osfied to enable support for install placements of DCMTK 3.5.4 versions onwards
FIND_PATH( DCMTK_ROOT_INCLUDE_DIR dcmtk/config/osconfig.h
${DCMTK_DIR}/config/include
${DCMTK_DIR}/include
/usr/local/dicom/include
/usr/local/include/
/usr/include/
/usr/local/dicom/include/
)
FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/config
${DCMTK_DIR}/config/include
${DCMTK_DIR}/include
/usr/local/dicom/include
/usr/local/include/dcmtk/config
/usr/include/dcmtk/config
/usr/local/dicom/include/dcmtk/config
)
FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/ofstd
${DCMTK_DIR}/ofstd/include
${DCMTK_DIR}/include/ofstd
/usr/local/dicom/include/dcmtk/ofstd
/usr/local/include/dcmtk/ofstd
/usr/include/dcmtk/ofstd
/usr/local/dicom/include/dcmtk/ofstd
)
FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
PATHS
${DCMTK_DIR}/ofstd/libsrc
${DCMTK_DIR}/ofstd/libsrc/Release
${DCMTK_DIR}/ofstd/libsrc/Debug
${DCMTK_DIR}/ofstd/Release
${DCMTK_DIR}/ofstd/Debug
${DCMTK_DIR}/lib
/usr/local/dicom/lib
/usr/local/lib64
/usr/lib64
/usr/local/lib
/usr/lib
/usr/local/dicom/lib
PATH_SUFFIXES dcmtk
)
FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmdata
${DCMTK_DIR}/dcmdata/include
${DCMTK_DIR}/include/dcmdata
/usr/local/dicom/include/dcmtk/dcmdata
/usr/local/include/dcmtk/dcmdata
/usr/include/dcmtk/dcmdata
/usr/local/dicom/include/dcmtk/dcmdata
)
FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
PATHS
${DCMTK_DIR}/dcmdata/libsrc
${DCMTK_DIR}/dcmdata/libsrc/Release
${DCMTK_DIR}/dcmdata/libsrc/Debug
${DCMTK_DIR}/dcmdata/Release
${DCMTK_DIR}/dcmdata/Debug
${DCMTK_DIR}/lib
/usr/local/dicom/lib
/usr/local/lib64
/usr/lib64
/usr/local/lib
/usr/lib
/usr/local/dicom/lib
PATH_SUFFIXES dcmtk
)
FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmimgle
${DCMTK_DIR}/dcmimgle/include
${DCMTK_DIR}/include/dcmimgle
/usr/local/dicom/include/dcmtk/dcmimgle
/usr/local/include/dcmtk/dcmimgle
/usr/include/dcmtk/dcmimgle
/usr/local/dicom/include/dcmtk/dcmimgle
)
FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
PATHS
${DCMTK_DIR}/dcmimgle/libsrc
${DCMTK_DIR}/dcmimgle/libsrc/Release
${DCMTK_DIR}/dcmimgle/libsrc/Debug
${DCMTK_DIR}/dcmimgle/Release
${DCMTK_DIR}/dcmimgle/Debug
${DCMTK_DIR}/lib
/usr/local/dicom/lib
/usr/local/lib64
/usr/lib64
/usr/local/lib
/usr/lib
/usr/local/dicom/lib
PATH_SUFFIXES dcmtk
)
FIND_PATH( DCMTK_dcmimage_INCLUDE_DIR diregist.h
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmimage
${DCMTK_DIR}/dcmimage/include
${DCMTK_DIR}/include/dcmimage
/usr/local/dicom/include/dcmtk/dcmimage
/usr/local/include/dcmtk/dcmimage
/usr/include/dcmtk/dcmimage
/usr/local/dicom/include/dcmtk/dcmimage
)
FIND_LIBRARY( DCMTK_dcmimage_LIBRARY dcmimage
PATHS
${DCMTK_DIR}/dcmimage/libsrc
${DCMTK_DIR}/dcmimage/libsrc/Release
${DCMTK_DIR}/dcmimage/libsrc/Debug
${DCMTK_DIR}/dcmimage/Release
${DCMTK_DIR}/dcmimage/Debug
${DCMTK_DIR}/lib
/usr/local/dicom/lib
/usr/local/lib64
/usr/lib64
/usr/local/lib
/usr/lib
/usr/local/dicom/lib
PATH_SUFFIXES dcmtk
)
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
PATHS
${DCMTK_DIR}/imagectn/libsrc/Release
${DCMTK_DIR}/imagectn/libsrc/
${DCMTK_DIR}/imagectn/libsrc/Debug
${DCMTK_DIR}/lib
/usr/local/dicom/lib
/usr/local/lib64
/usr/lib64
/usr/local/lib
/usr/lib
/usr/local/dicom/lib
PATH_SUFFIXES dcmtk
)
FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
PATHS
${DCMTK_DIR}/dcmnet/libsrc/Release
${DCMTK_DIR}/dcmnet/libsrc/Debug
${DCMTK_DIR}/dcmnet/libsrc/
${DCMTK_DIR}/lib
/usr/local/dicom/lib
/usr/local/lib64
/usr/lib64
/usr/local/lib
/usr/lib
/usr/local/dicom/lib
PATH_SUFFIXES dcmtk
)
FIND_LIBRARY(DCMTK_oflog_LIBRARY oflog
PATHS
${DCMTK_DIR}/dcmnet/libsrc/Release
${DCMTK_DIR}/dcmnet/libsrc/Debug
${DCMTK_DIR}/dcmnet/libsrc/
${DCMTK_DIR}/lib
/usr/local/dicom/lib
/usr/local/lib64
/usr/lib64
/usr/local/lib
/usr/lib
/usr/local/dicom/lib
PATH_SUFFIXES dcmtk
)
FIND_LIBRARY(DCMTK_ofstd_LIBRARY ofstd
PATHS
${DCMTK_DIR}/dcmnet/libsrc/Release
${DCMTK_DIR}/dcmnet/libsrc/Debug
${DCMTK_DIR}/dcmnet/libsrc/
${DCMTK_DIR}/lib
/usr/local/dicom/lib
/usr/local/lib64
/usr/lib64
/usr/local/lib
/usr/lib
/usr/local/dicom/lib
PATH_SUFFIXES dcmtk
)
IF( DCMTK_config_INCLUDE_DIR
AND DCMTK_ofstd_INCLUDE_DIR
AND DCMTK_ofstd_LIBRARY
AND DCMTK_dcmdata_INCLUDE_DIR
AND DCMTK_dcmdata_LIBRARY
AND DCMTK_dcmimgle_INCLUDE_DIR
AND DCMTK_dcmimgle_LIBRARY
AND DCMTK_dcmimage_INCLUDE_DIR
AND DCMTK_dcmimage_LIBRARY )
SET( DCMTK_FOUND "YES" )
SET( DCMTK_INCLUDE_DIRS
${DCMTK_config_INCLUDE_DIR}
${DCMTK_ofstd_INCLUDE_DIR}
${DCMTK_dcmdata_INCLUDE_DIR}
${DCMTK_dcmimgle_INCLUDE_DIR}
${DCMTK_dcmimage_INCLUDE_DIR}
)
SET( DCMTK_LIBRARIES
${DCMTK_dcmimgle_LIBRARY}
${DCMTK_dcmimage_LIBRARY}
${DCMTK_dcmdata_LIBRARY}
${DCMTK_ofstd_LIBRARY}
${DCMTK_config_LIBRARY}
)
IF(DCMTK_imagedb_LIBRARY)
SET( DCMTK_LIBRARIES
${DCMTK_LIBRARIES}
${DCMTK_imagedb_LIBRARY}
)
ENDIF()
IF(DCMTK_dcmnet_LIBRARY)
SET( DCMTK_LIBRARIES
${DCMTK_LIBRARIES}
${DCMTK_dcmnet_LIBRARY}
)
ENDIF()
IF(DCMTK_oflog_LIBRARY)
SET( DCMTK_LIBRARIES
${DCMTK_LIBRARIES}
${DCMTK_oflog_LIBRARY}
)
ENDIF()
IF(DCMTK_ofstd_LIBRARY)
SET( DCMTK_LIBRARIES
${DCMTK_LIBRARIES}
${DCMTK_ofstd_LIBRARY}
)
ENDIF()
IF( WIN32 )
SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
ENDIF()
ENDIF()
IF( NOT DCMTK_FOUND )
SET( DCMTK_DIR "" CACHE PATH "Root of DCMTK source tree (optional)." )
MARK_AS_ADVANCED( DCMTK_DIR )
ENDIF()

View File

@@ -1,13 +1,14 @@
# Locate QuickTime
# This module defines
# QUICKTIME_LIBRARY
# QUICKTIME_FOUND, if false, do not try to link to gdal
# QUICKTIME_FOUND, if false, do not try to link to gdal
# QUICKTIME_INCLUDE_DIR, where to find the headers
#
# $QUICKTIME_DIR is an environment variable that would
# correspond to the ./configure --prefix=$QUICKTIME_DIR
#
# Created by Eric Wing.
# Created by Eric Wing.
# QuickTime on OS X looks different than QuickTime for Windows,
# so I am going to case the two.
@@ -54,19 +55,20 @@ ELSE()
#Quicktime is not supported under 64bit OSX build so we need to detect it and disable it.
#First check to see if we are running with a native 64-bit compiler (10.6 default) and implicit arch
IF(NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(QUICKTIME_FOUND "NO")
MESSAGE("Disabling QuickTime on 64-bit architectures")
SET(QUICKTIME_FOUND "NO")
ELSEIF(OSG_OSX_VERSION VERSION_GREATER 10.6)
# Quicktime officially deprecated starting 10.7
MESSAGE("Disabling QuickTime because it's not supported by the selected SDK ${OSG_OSX_VERSION}")
SET(QUICKTIME_FOUND "NO")
ELSE()
#Otherwise check to see if 64-bit is explicitly called for.
LIST(FIND CMAKE_OSX_ARCHITECTURES "x86_64" has64Compile)
IF(NOT has64Compile EQUAL -1)
SET(QUICKTIME_FOUND "NO")
ENDIF()
ENDIF()
# Disable quicktime for >= 10.7, as it's officially deprecated
IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.7" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.9")
MESSAGE("disabling quicktime because it's not supported by the selected SDK ${OSG_OSX_SDK_NAME}")
#Otherwise check to see if 64-bit is explicitly called for.
LIST(FIND CMAKE_OSX_ARCHITECTURES "x86_64" has64Compile)
IF(NOT has64Compile EQUAL -1)
MESSAGE("Disabling QuickTime on 64-bit architectures")
SET(QUICKTIME_FOUND "NO")
ENDIF()
ENDIF()
ENDIF()
ENDIF()

View File

@@ -5,7 +5,9 @@ IF(PKG_CONFIG_FOUND)
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(RSVG librsvg-2.0)
#Version 2.35 introduces the rsvg_cleanup function which is used
PKG_CHECK_MODULES(RSVG librsvg-2.0>=2.35)
PKG_CHECK_MODULES(CAIRO cairo)
IF (RSVG_FOUND AND NOT CAIRO_FOUND)

178
CMakeModules/FindSDL2.cmake Normal file
View File

@@ -0,0 +1,178 @@
# - Locate SDL library
# This module defines
# SDL2_LIBRARY, the name of the library to link against
# SDL2_FOUND, if false, do not try to link to SDL
# SDL2_INCLUDE_DIR, where to find SDL.h
# SDL2_VERSION_STRING, human-readable string containing the version of SDL
#
# This module responds to the flag:
# SDL2_BUILDING_LIBRARY
# If this is defined, then no SDL2_main will be linked in because
# only applications need main().
# Otherwise, it is assumed you are building an application and this
# module will attempt to locate and set the proper link flags
# as part of the returned SDL2_LIBRARY variable.
#
# Don't forget to include SDLmain.h and SDLmain.m your project for the
# OS X framework based version. (Other versions link to -lSDLmain which
# this module will try to find on your behalf.) Also for OS X, this
# module will automatically add the -framework Cocoa on your behalf.
#
#
# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration
# and no SDL2_LIBRARY, it means CMake did not find your SDL library
# (SDL.dll, libsdl.so, SDL.framework, etc).
# Set SDL2_LIBRARY_TEMP to point to your SDL library, and configure again.
# Similarly, if you see an empty SDL2MAIN_LIBRARY, you should set this value
# as appropriate. These values are used to generate the final SDL2_LIBRARY
# variable, but when these values are unset, SDL2_LIBRARY does not get created.
#
#
# $SDLDIR is an environment variable that would
# correspond to the ./configure --prefix=$SDLDIR
# used in building SDL.
# l.e.galup 9-20-02
#
# Modified by Eric Wing.
# Added code to assist with automated building by using environmental variables
# and providing a more controlled/consistent search behavior.
# Added new modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
# Also corrected the header search path to follow "proper" SDL guidelines.
# Added a search for SDLmain which is needed by some platforms.
# Added a search for threads which is needed by some platforms.
# Added needed compile switches for MinGW.
#
# On OSX, this will prefer the Framework version (if found) over others.
# People will have to manually change the cache values of
# SDL2_LIBRARY to override this selection or set the CMake environment
# CMAKE_INCLUDE_PATH to modify the search paths.
#
# Note that the header path has changed from SDL/SDL.h to just SDL.h
# This needed to change because "proper" SDL convention
# is #include "SDL.h", not <SDL/SDL.h>. This is done for portability
# reasons because not all systems place things in SDL/ (see FreeBSD).
#=============================================================================
# Copyright 2003-2009 Kitware, Inc.
# Copyright 2012 Benjamin Eikel
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
find_path(SDL2_INCLUDE_DIR SDL.h
HINTS
ENV SDL2DIR
PATH_SUFFIXES include/SDL2
)
# SDL-1.1 is the name used by FreeBSD ports...
# don't confuse it for the version number.
find_library(SDL2_LIBRARY_TEMP
NAMES SDL2
HINTS
ENV SDL2DIR
PATH_SUFFIXES lib
)
if(NOT SDL2_BUILDING_LIBRARY)
if(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
# Non-OS X framework versions expect you to also dynamically link to
# SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms
# seem to provide SDLmain for compatibility even though they don't
# necessarily need it.
find_library(SDL2MAIN_LIBRARY
NAMES SDL2main
HINTS
ENV SDL2DIR
PATH_SUFFIXES lib
PATHS
/sw
/opt/local
/opt/csw
/opt
)
endif()
endif()
# SDL may require threads on your system.
# The Apple build may not need an explicit flag because one of the
# frameworks may already provide it.
# But for non-OSX systems, I will use the CMake Threads package.
if(NOT APPLE)
find_package(Threads)
endif()
# MinGW needs an additional library, mwindows
# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -lmwindows
# (Actually on second look, I think it only needs one of the m* libraries.)
if(MINGW)
set(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
endif()
if(SDL2_LIBRARY_TEMP)
# For SDLmain
if(SDL2MAIN_LIBRARY AND NOT SDL2_BUILDING_LIBRARY)
list(FIND SDL2_LIBRARY_TEMP "${SDL2MAIN_LIBRARY}" _SDL2_MAIN_INDEX)
if(_SDL2_MAIN_INDEX EQUAL -1)
set(SDL2_LIBRARY_TEMP "${SDL2MAIN_LIBRARY}" ${SDL2_LIBRARY_TEMP})
endif()
unset(_SDL2_MAIN_INDEX)
endif()
# For OS X, SDL uses Cocoa as a backend so it must link to Cocoa.
# CMake doesn't display the -framework Cocoa string in the UI even
# though it actually is there if I modify a pre-used variable.
# I think it has something to do with the CACHE STRING.
# So I use a temporary variable until the end so I can set the
# "real" variable in one-shot.
if(APPLE)
set(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
endif()
# For threads, as mentioned Apple doesn't need this.
# In fact, there seems to be a problem if I used the Threads package
# and try using this line, so I'm just skipping it entirely for OS X.
if(NOT APPLE)
set(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
endif()
# For MinGW library
if(MINGW)
set(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
endif()
# Set the final string here so the GUI reflects the final state.
set(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found")
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
set(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
endif()
if(SDL2_INCLUDE_DIR AND EXISTS "${SDL2_INCLUDE_DIR}/SDL2_version.h")
file(STRINGS "${SDL2_INCLUDE_DIR}/SDL2_version.h" SDL2_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL2_MAJOR_VERSION[ \t]+[0-9]+$")
file(STRINGS "${SDL2_INCLUDE_DIR}/SDL2_version.h" SDL2_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL2_MINOR_VERSION[ \t]+[0-9]+$")
file(STRINGS "${SDL2_INCLUDE_DIR}/SDL2_version.h" SDL2_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL2_PATCHLEVEL[ \t]+[0-9]+$")
string(REGEX REPLACE "^#define[ \t]+SDL2_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_MAJOR "${SDL2_VERSION_MAJOR_LINE}")
string(REGEX REPLACE "^#define[ \t]+SDL2_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_MINOR "${SDL2_VERSION_MINOR_LINE}")
string(REGEX REPLACE "^#define[ \t]+SDL2_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_PATCH "${SDL2_VERSION_PATCH_LINE}")
set(SDL2_VERSION_STRING ${SDL2_VERSION_MAJOR}.${SDL2_VERSION_MINOR}.${SDL2_VERSION_PATCH})
unset(SDL2_VERSION_MAJOR_LINE)
unset(SDL2_VERSION_MINOR_LINE)
unset(SDL2_VERSION_PATCH_LINE)
unset(SDL2_VERSION_MAJOR)
unset(SDL2_VERSION_MINOR)
unset(SDL2_VERSION_PATCH)
endif()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR
VERSION_VAR SDL2_VERSION_STRING)

45
CMakeModules/FindV8.cmake Normal file
View File

@@ -0,0 +1,45 @@
# Locate V8
# This module defines
# V8_LIBRARY
# V8_FOUND, if false, do not try to link to gdal
# V8_INCLUDE_DIR, where to find the headers
#
# $V8_DIR is an environment variable that would
# correspond to the ./configure --prefix=$V8_DIR
#
# Created by Robert Osfield (based on FindFLTK.cmake)
FIND_PATH(V8_INCLUDE_DIR v8.h
$ENV{V8_DIR}/include
$ENV{V8_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
)
FIND_LIBRARY(V8_LIBRARY
NAMES v8 libv8
PATHS
$ENV{V8_DIR}/lib
$ENV{V8_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
SET(V8_FOUND "NO")
IF(V8_LIBRARY AND V8_INCLUDE_DIR)
SET(V8_FOUND "YES")
ENDIF()

View File

@@ -1,48 +0,0 @@
# Locate zlib
# This module defines
# ZLIB_LIBRARY
# ZLIB_FOUND, if false, do not try to link to zlib
# ZLIB_INCLUDE_DIR, where to find the headers
#
# $ZLIB_DIR is an environment variable that would
# correspond to the ./configure --prefix=$ZLIB_DIR
# used in building zlib.
#
# Created by Ulrich Hertlein.
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
$ENV{ZLIB_DIR}/include
$ENV{ZLIB_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
)
FIND_LIBRARY(ZLIB_LIBRARY
NAMES z libz zlib
PATHS
$ENV{ZLIB_DIR}/lib
$ENV{ZLIB_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
SET(ZLIB_FOUND "NO")
IF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
SET(ZLIB_FOUND "YES")
ENDIF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)

0
CMakeModules/FindZeroConf.cmake Executable file → Normal file
View File

View File

@@ -0,0 +1,63 @@
# Locate ILMBASE
# This module defines
# ILMBASE_LIBRARY
# ILMBASE_FOUND, if false, do not try to link to ILMBASE
# ILMBASE_INCLUDE_DIR, where to find the headers
#
# $ILMBASE_DIR is an environment variable that would
# correspond to the ./configure --prefix=$ILMBASE_DIR
#
# Created by Robert Osfield.
FIND_PATH(ILMBASE_INCLUDE_DIR OpenEXR/ImathVec.h
$ENV{ILMBASE_DIR}/include
$ENV{ILMBASE_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
)
# Macro to find ilmbase libraries
# example: ILMBASE_FIND_VAR(OPENEXR_IlmThread_LIBRARY IlmThread)
MACRO(ILMBASE_FIND_VAR varname libname)
FIND_LIBRARY( ${varname}
NAMES ${libname} ${libname}-2_1 ${libname}-2_2
PATHS
$ENV{ILMBASE_DIR}/lib
$ENV{ILMBASE_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
ENDMACRO(ILMBASE_FIND_VAR)
# Macro to find exr libraries (and debug versions)
# example: ILMBASE_FIND(OPENEXR_IlmThread_LIBRARY IlmThread)
MACRO(ILMBASE_FIND libname)
ILMBASE_FIND_VAR(ILMBASE_${libname}_LIBRARY ${libname})
ILMBASE_FIND_VAR(ILMBASE_${libname}_LIBRARY_DEBUG ${libname}d)
ENDMACRO(ILMBASE_FIND)
ILMBASE_FIND(IlmThread)
ILMBASE_FIND(Iex)
ILMBASE_FIND(Half)
SET(ILMBASE_FOUND "NO")
IF(ILMBASE_INCLUDE_DIR AND ILMBASE_IlmThread_LIBRARY AND ILMBASE_Iex_LIBRARY AND ILMBASE_Half_LIBRARY)
SET(ILMBASE_LIBRARIES ${ILMBASE_IlmThread_LIBRARY} ${ILMBASE_Half_LIBRARY} ${ILMBASE_Iex_LIBRARY} )
SET(ILMBASE_LIBRARIES_VARS ILMBASE_IlmThread_LIBRARY ILMBASE_Half_LIBRARY ILMBASE_Iex_LIBRARY )
SET(ILMBASE_FOUND "YES")
ENDIF(ILMBASE_INCLUDE_DIR AND ILMBASE_IlmThread_LIBRARY AND ILMBASE_Iex_LIBRARY AND ILMBASE_Half_LIBRARY)

View File

@@ -25,14 +25,6 @@ IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
HANDLE_MSVC_DLL()
ENDIF()
IF(ANDROID)
INSTALL (
FILES ${TARGET_H}
DESTINATION ${INSTALL_INCDIR}/${LIB_NAME}
COMPONENT libopenscenegraph-dev
)
ELSE(ANDROID)
INSTALL(
TARGETS ${LIB_NAME}
RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph
@@ -40,6 +32,21 @@ INSTALL(
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev
)
IF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
GET_TARGET_PROPERTY(PREFIX ${LIB_NAME} PREFIX)
IF("${PREFIX}" STREQUAL PREFIX-NOTFOUND) # Fix for PREFIX-NOTFOUND left in file names
SET(PREFIX "")
ENDIF()
IF ( ${CMAKE_GENERATOR} STREQUAL "Ninja" )
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${LIB_NAME}${CMAKE_RELEASE_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS Release)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${LIB_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS RelWithDebInfo)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${LIB_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS Debug)
ELSE ( ${CMAKE_GENERATOR} STREQUAL "Ninja" )
INSTALL(FILES ${OUTPUT_BINDIR}/${PREFIX}${LIB_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS RelWithDebInfo)
INSTALL(FILES ${OUTPUT_BINDIR}/${PREFIX}${LIB_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS Debug)
ENDIF ( ${CMAKE_GENERATOR} STREQUAL "Ninja" )
ENDIF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
IF(NOT OSG_COMPILE_FRAMEWORKS)
INSTALL (
FILES ${TARGET_H}
@@ -59,4 +66,3 @@ ELSE()
# MESSAGE("${OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR}")
ENDIF()
ENDIF(ANDROID)

View File

@@ -67,7 +67,7 @@ MACRO(ANDROID_3RD_PARTY)
#JPEG
################################################
FIND_PATH(JPEG_INCLUDE_DIR Android.mk
${CMAKE_SOURCE_DIR}/3rdparty/libjpeg
${CMAKE_SOURCE_DIR}/3rdparty/libjpeg NO_CMAKE_FIND_ROOT_PATH
)
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libjpeg")
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${JPEG_INCLUDE_DIR}/Android.mk \n")
@@ -82,7 +82,7 @@ MACRO(ANDROID_3RD_PARTY)
#PNG
################################################
FIND_PATH(PNG_INCLUDE_DIR Android.mk
${CMAKE_SOURCE_DIR}/3rdparty/libpng
${CMAKE_SOURCE_DIR}/3rdparty/libpng NO_CMAKE_FIND_ROOT_PATH
)
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libpng")
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${PNG_INCLUDE_DIR}/Android.mk \n")
@@ -97,7 +97,7 @@ MACRO(ANDROID_3RD_PARTY)
#GIF
################################################
FIND_PATH(GIFLIB_INCLUDE_DIR Android.mk
${CMAKE_SOURCE_DIR}/3rdparty/giflib
${CMAKE_SOURCE_DIR}/3rdparty/giflib NO_CMAKE_FIND_ROOT_PATH
)
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libgif")
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${GIFLIB_INCLUDE_DIR}/Android.mk \n")
@@ -112,7 +112,7 @@ MACRO(ANDROID_3RD_PARTY)
#TIF
################################################
FIND_PATH(TIFF_INCLUDE_DIR Android.mk
${CMAKE_SOURCE_DIR}/3rdparty/libtiff
${CMAKE_SOURCE_DIR}/3rdparty/libtiff NO_CMAKE_FIND_ROOT_PATH
)
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libtiff")
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${TIFF_INCLUDE_DIR}/Android.mk \n")
@@ -142,7 +142,7 @@ MACRO(ANDROID_3RD_PARTY)
#CURL
################################################
FIND_PATH(CURL_DIR Android.mk
${CMAKE_SOURCE_DIR}/3rdparty/curl
${CMAKE_SOURCE_DIR}/3rdparty/curl NO_CMAKE_FIND_ROOT_PATH
)
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libcurl")
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${CURL_DIR}/Android.mk \n")
@@ -159,11 +159,11 @@ MACRO(ANDROID_3RD_PARTY)
#FREETYPE
################################################
FIND_PATH(FREETYPE_DIR Android.mk
${CMAKE_SOURCE_DIR}/3rdparty/freetype
${CMAKE_SOURCE_DIR}/3rdparty/freetype NO_CMAKE_FIND_ROOT_PATH
)
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libft2")
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${FREETYPE_DIR}/Android.mk \n")
set(FREETYPE_INCLUDE_DIRS "${FREETYPE_DIR}/include ${FREETYPE_DIR}/include/freetype/config")
set(FREETYPE_INCLUDE_DIRS ${FREETYPE_DIR}/include ${FREETYPE_DIR}/include/freetype/config)
if(FREETYPE_DIR)
message(STATUS "FREETYPE found ${FREETYPE_DIR}" )
set(FREETYPE_FOUND "Yes")
@@ -175,7 +175,7 @@ MACRO(ANDROID_3RD_PARTY)
#GDAL
################################################
FIND_PATH(GDAL_DIR gdal.h
${CMAKE_SOURCE_DIR}/3rdparty/gdal/include
${CMAKE_SOURCE_DIR}/3rdparty/gdal/include NO_CMAKE_FIND_ROOT_PATH
)
set(GDAL_INCLUDE_DIR "${GDAL_DIR}")
if(GDAL_DIR)

View File

@@ -57,7 +57,7 @@ ENDIF()
SET(CPACK_SOURCE_GENERATOR "TGZ")
# for ms visual studio we use it's internally defined variable to get the configuration (debug,release, ...)
# for ms visual studio we use it's internally defined variable to get the configuration (debug,release, ...)
IF(MSVC_IDE)
SET(OSG_CPACK_CONFIGURATION "$(OutDir)")
SET(PACKAGE_TARGET_PREFIX "Package ")
@@ -84,9 +84,87 @@ ENDIF()
SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL")
ADD_CUSTOM_TARGET(${PACKAGE_ALL_TARGETNAME})
# cpack configuration for debian packages
IF(${CPACK_GENERATOR} STREQUAL "DEB")
SET(OPENSCENEGRAPH_PACKAGE_MAINTAINER
""
CACHE STRING
"Name and email address of the package maintainer, e.g., 'Jon Doe <jon.doe@superawesomemail.com>'"
)
SET(CPACK_LIBOPENSCENEGRAPH_DEPENDENCIES
"libopenthreads"
CACHE STRING
"Dependend packages for the openscenegraph library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_LIBOPENSCENEGRAPH-DEV_DEPENDENCIES
"libopenscenegraph"
CACHE STRING
"Dependend packages for the openscenegraph development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_LIBOPENTHREADS_DEPENDENCIES
""
CACHE STRING
"Dependend packages for the openthreads library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_LIBOPENTHREADS-DEV_DEPENDENCIES
"libopenthreads"
CACHE STRING
"Dependend packages for the openthreads development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_OPENSCENEGRAPH_DEPENDENCIES
"libopenscenegraph"
CACHE STRING
"Dependend packages for the openscenegraph main package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_OPENSCENEGRAPH-ALL_DEPENDENCIES
""
CACHE STRING
"Dependend packages for the openscenegraph package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_LIBOPENSCENEGRAPH_CONFLICTS
""
CACHE STRING
"Conflicting packages for the openscenegraph library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_LIBOPENSCENEGRAPH-DEV_CONFLICTS
""
CACHE STRING
"Conflicting packages for the openscenegraph development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_LIBOPENTHREADS_CONFLICTS
""
CACHE STRING
"Conflicting packages for the openthreads library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_LIBOPENTHREADS-DEV_CONFLICTS
""
CACHE STRING
"Conflicting packages for the openthreads development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_OPENSCENEGRAPH_CONFLICTS
""
CACHE STRING
"Conflicting packages for the openscenegraph main package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_OPENSCENEGRAPH-ALL_CONFLICTS
""
CACHE STRING
"Conflicting packages for the openscenegraph package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
ENDIF()
MACRO(GENERATE_PACKAGING_TARGET package_name)
SET(CPACK_PACKAGE_NAME ${package_name})
# set debian dependencies AND conflicts
IF(${CPACK_GENERATOR} STREQUAL "DEB")
STRING(TOUPPER CPACK_${package_name}_DEPENDENCIES DEPENDENCIES_VAR)
STRING(TOUPPER CPACK_${package_name}_CONFLICTS CONFLICTS_VAR)
SET(OSG_PACKAGE_DEPENDS "${${DEPENDENCIES_VAR}}")
SET(OSG_PACKAGE_CONFLICTS "${${CONFLICTS_VAR}}")
ENDIF()
# the doc packages don't need a system-arch specification
IF(${package} MATCHES -doc)
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION})
@@ -114,7 +192,7 @@ MACRO(GENERATE_PACKAGING_TARGET package_name)
ELSE()
SET(ARCHIVE_EXT "tar.gz")
ENDIF()
# Create a target that creates the current package
# and rename the package to give it proper filename
ADD_CUSTOM_TARGET(${PACKAGE_TARGETNAME})
@@ -124,8 +202,8 @@ MACRO(GENERATE_PACKAGING_TARGET package_name)
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
COMMENT "Run CPack packaging for ${package_name}..."
)
# Add the exact same custom command to the all package generating target.
# I can't use add_dependencies to do this because it would allow parallell building of packages so am going brute here
# Add the exact same custom command to the all package generating target.
# I can't use add_dependencies to do this because it would allow parallel building of packages so am going brute here
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_ALL_TARGETNAME}
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
)

View File

@@ -53,7 +53,7 @@ SET(CPACK_NSIS_INSTALLER_ICON_CODE "")
SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
SET(CPACK_OUTPUT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackConfig-${OSG_CPACK_COMPONENT}.cmake")
SET(CPACK_PACKAGE_DEFAULT_LOCATION "/")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenSceneGraph_SOURCE_DIR}/README.txt")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenSceneGraph_SOURCE_DIR}/README.md")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The OpenSceneGraph is an open source high performance 3d graphics toolkit")
SET(CPACK_PACKAGE_FILE_NAME "${OSG_PACKAGE_FILE_NAME}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
@@ -66,6 +66,16 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "${OPENSCENEGRAPH_MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${OPENSCENEGRAPH_MINOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_PATCH "${OPENSCENEGRAPH_PATCH_VERSION}")
SET(CPACK_RESOURCE_FILE_LICENSE "${OpenSceneGraph_SOURCE_DIR}/LICENSE.txt")
SET(CPACK_RESOURCE_FILE_README "${OpenSceneGraph_SOURCE_DIR}/README.txt")
SET(CPACK_RESOURCE_FILE_README "${OpenSceneGraph_SOURCE_DIR}/README.md")
SET(CPACK_RESOURCE_FILE_WELCOME "${OpenSceneGraph_SOURCE_DIR}/NEWS.txt")
SET(CPACK_STRIP_FILES "ON")
# DEBIAN OPTIONS
IF(${CPACK_GENERATOR} STREQUAL "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${OPENSCENEGRAPH_PACKAGE_MAINTAINER}")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.openscenegraph.org")
SET(CPACK_DEBIAN_PACKAGE_SECTION "Development")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${OSG_PACKAGE_DEPENDS}")
SET(CPACK_DEBIAN_PACKAGE_CONFLICTS "${OSG_PACKAGE_CONFLICTS}")
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${OpenSceneGraph_SOURCE_DIR}/debian_scripts/postinst;")
ENDIF()

View File

@@ -0,0 +1,22 @@
# - If Windows is used, this script sets the variable WIN32_WINNT to the corresponding windows version
if (WIN32)
message(STATUS "Checking windows version...")
macro(get_WIN32_WINNT version)
if (CMAKE_SYSTEM_VERSION)
set(ver ${CMAKE_SYSTEM_VERSION})
string(REGEX MATCH "^([0-9]+).([0-9])" ver ${ver})
string(REGEX MATCH "^([0-9]+)" verMajor ${ver})
# Check for Windows 10, b/c we'll need to convert to hex 'A'.
if ("${verMajor}" MATCHES "10")
set(verMajor "A")
string(REGEX REPLACE "^([0-9]+)" ${verMajor} ver ${ver})
endif ("${verMajor}" MATCHES "10")
# Remove all remaining '.' characters.
string(REPLACE "." "" ver ${ver})
# Prepend each digit with a zero.
string(REGEX REPLACE "([0-9A-Z])" "0\\1" ver ${ver})
set(${version} "0x${ver}")
endif(CMAKE_SYSTEM_VERSION)
endmacro(get_WIN32_WINNT)
endif(WIN32)

View File

@@ -4,8 +4,8 @@
# full path of the library name. in order to differentiate release and debug, this macro get the
# NAME of the variables, so the macro gets as arguments the target name and the following list of parameters
# is intended as a list of variable names each one containing the path of the libraries to link to
# The existance of a variable name with _DEBUG appended is tested and, in case it' s value is used
# for linking to when in debug mode
# The existence of a variable name with _DEBUG appended is tested and, in case it' s value is used
# for linking to when in debug mode
# the content of this library for linking when in debugging
#######################################################################################################
@@ -27,15 +27,10 @@ MACRO(BUILDER_VERSION_GREATER MAJOR_VER MINOR_VER PATCH_VER)
ENDIF()
ENDMACRO(BUILDER_VERSION_GREATER MAJOR_VER MINOR_VER PATCH_VER)
# CMAKE24: if CMake version is <2.6.0.
SET(CMAKE24 OFF)
IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} LESS 5)
SET(CMAKE24 ON)
ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} LESS 5)
# CMAKE_VERSION_TEST: Define whether "IF(${CMAKE_VERSION} VERSION_LESS "x.y.z")" can be used or not.
BUILDER_VERSION_GREATER(2 6 3)
SET(CMAKE_VERSION_TEST ${VALID_BUILDER_VERSION}) # >= 2.6.4
BUILDER_VERSION_GREATER(2 8 0)
SET(CMAKE_VERSION_TEST ${VALID_BUILDER_VERSION}) # >= 2.8.0
SET(VALID_BUILDER_VERSION OFF)
@@ -43,9 +38,13 @@ SET(VALID_BUILDER_VERSION OFF)
MACRO(LINK_WITH_VARIABLES TRGTNAME)
FOREACH(varname ${ARGN})
IF(${varname}_DEBUG)
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
IF(${varname}_RELEASE)
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")
ELSE(${varname}_RELEASE)
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
ENDIF(${varname}_RELEASE)
ELSE(${varname}_DEBUG)
TARGET_LINK_LIBRARIES(${TRGTNAME} "${${varname}}" )
TARGET_LINK_LIBRARIES(${TRGTNAME} ${${varname}} )
ENDIF(${varname}_DEBUG)
ENDFOREACH(varname)
ENDMACRO(LINK_WITH_VARIABLES TRGTNAME)
@@ -83,16 +82,16 @@ ENDMACRO(LINK_EXTERNAL TRGTNAME)
MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME)
#SET(ALL_GL_LIBRARIES ${OPENGL_LIBRARIES})
SET(ALL_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE)
SET(ALL_GL_LIBRARIES ${ALL_GL_LIBRARIES} ${OPENGL_egl_LIBRARY})
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE OR OSG_GLES3_AVAILABLE)
SET(ALL_GL_LIBRARIES ${ALL_GL_LIBRARIES} ${EGL_LIBRARY})
ENDIF()
LINK_EXTERNAL(${CORELIB_NAME} ${ALL_GL_LIBRARIES})
LINK_EXTERNAL(${CORELIB_NAME} ${ALL_GL_LIBRARIES})
LINK_WITH_VARIABLES(${CORELIB_NAME} OPENTHREADS_LIBRARY)
IF(OPENSCENEGRAPH_SONAMES)
SET_TARGET_PROPERTIES(${CORELIB_NAME} PROPERTIES VERSION ${OPENSCENEGRAPH_VERSION} SOVERSION ${OPENSCENEGRAPH_SOVERSION})
ENDIF(OPENSCENEGRAPH_SONAMES)
ENDMACRO(LINK_CORELIB_DEFAULT CORELIB_NAME)
@@ -112,20 +111,20 @@ MACRO(SETUP_LINK_LIBRARIES)
######################################################################
#
# This set up the libraries to link to, it assumes there are two variable: one common for a group of examples or plugins
# kept in the variable TARGET_COMMON_LIBRARIES and an example or plugin specific kept in TARGET_ADDED_LIBRARIES
# they are combined in a single list checked for unicity
# kept in the variable TARGET_COMMON_LIBRARIES and an example or plugin specific kept in TARGET_ADDED_LIBRARIES
# they are combined in a single list checked for unicity
# the suffix ${CMAKE_DEBUG_POSTFIX} is used for differentiating optimized and debug
#
# a second variable TARGET_EXTERNAL_LIBRARIES hold the list of libraries not differentiated between debug and optimized
# a second variable TARGET_EXTERNAL_LIBRARIES hold the list of libraries not differentiated between debug and optimized
##################################################################################
SET(TARGET_LIBRARIES ${TARGET_COMMON_LIBRARIES})
FOREACH(LINKLIB ${TARGET_ADDED_LIBRARIES})
SET(TO_INSERT TRUE)
FOREACH (value ${TARGET_COMMON_LIBRARIES})
IF (${value} STREQUAL ${LINKLIB})
IF ("${value}" STREQUAL "${LINKLIB}")
SET(TO_INSERT FALSE)
ENDIF (${value} STREQUAL ${LINKLIB})
ENDIF ("${value}" STREQUAL "${LINKLIB}")
ENDFOREACH (value ${TARGET_COMMON_LIBRARIES})
IF(TO_INSERT)
LIST(APPEND TARGET_LIBRARIES ${LINKLIB})
@@ -134,8 +133,8 @@ MACRO(SETUP_LINK_LIBRARIES)
#SET(ALL_GL_LIBRARIES ${OPENGL_LIBRARIES})
SET(ALL_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE)
SET(ALL_GL_LIBRARIES ${ALL_GL_LIBRARIES} ${OPENGL_egl_LIBRARY})
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE OR OSG_GLES3_AVAILABLE)
SET(ALL_GL_LIBRARIES ${ALL_GL_LIBRARIES} ${EGL_LIBRARY})
ENDIF()
# FOREACH(LINKLIB ${TARGET_LIBRARIES})
@@ -151,7 +150,7 @@ MACRO(SETUP_LINK_LIBRARIES)
ENDIF(TARGET_LIBRARIES_VARS)
IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
#when using full path name to specify linkage, it seems that already linked libs must be specified
LINK_EXTERNAL(${TARGET_TARGETNAME} ${ALL_GL_LIBRARIES})
LINK_EXTERNAL(${TARGET_TARGETNAME} ${ALL_GL_LIBRARIES})
ENDIF(MSVC AND OSG_MSVC_VERSIONED_DLL)
ENDMACRO(SETUP_LINK_LIBRARIES)
@@ -212,9 +211,10 @@ ENDMACRO(SET_OUTPUT_DIR_PROPERTY_260 TARGET_TARGETNAME RELATIVE_OUTDIR)
##########################################################################################################
MACRO(SETUP_LIBRARY LIB_NAME)
IF(ANDROID)
SETUP_ANDROID_LIBRARY(${LIB_NAME})
ELSE()
IF(GLCORE_FOUND)
INCLUDE_DIRECTORIES( ${GLCORE_INCLUDE_DIR} )
ENDIF()
SET(TARGET_NAME ${LIB_NAME} )
SET(TARGET_TARGETNAME ${LIB_NAME} )
ADD_LIBRARY(${LIB_NAME}
@@ -224,10 +224,16 @@ MACRO(SETUP_LIBRARY LIB_NAME)
${TARGET_SRC}
)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES FOLDER "OSG Core")
IF(APPLE)
IF(OSG_BUILD_PLATFORM_IPHONE)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
ENDIF()
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
ENDIF()
IF(TARGET_LABEL)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}")
ENDIF(TARGET_LABEL)
IF(TARGET_LIBRARIES)
LINK_INTERNAL(${LIB_NAME} ${TARGET_LIBRARIES})
ENDIF()
@@ -238,15 +244,14 @@ MACRO(SETUP_LIBRARY LIB_NAME)
LINK_WITH_VARIABLES(${LIB_NAME} ${TARGET_LIBRARIES_VARS})
ENDIF(TARGET_LIBRARIES_VARS)
LINK_CORELIB_DEFAULT(${LIB_NAME})
ENDIF()
INCLUDE(ModuleInstall OPTIONAL)
ENDMACRO(SETUP_LIBRARY LIB_NAME)
MACRO(SETUP_PLUGIN PLUGIN_NAME)
IF(ANDROID)
SETUP_ANDROID_LIBRARY(${TARGET_DEFAULT_PREFIX}${PLUGIN_NAME})
ELSE()
IF(GLCORE_FOUND)
INCLUDE_DIRECTORIES( ${GLCORE_INCLUDE_DIR} )
ENDIF()
SET(TARGET_NAME ${PLUGIN_NAME} )
@@ -264,42 +269,54 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
## plugins gets put in libopenscenegraph by default
IF(${ARGC} GREATER 1)
SET(PACKAGE_COMPONENT libopenscenegraph-${ARGV1})
# add cpack config variables for plugin with own package
IF(BUILD_OSG_PACKAGES)
IF("${CPACK_GENERATOR}" STREQUAL "DEB")
STRING(TOUPPER ${PACKAGE_COMPONENT} UPPER_PACKAGE_COMPONENT)
SET(CPACK_${UPPER_PACKAGE_COMPONENT}_DEPENDENCIES
"libopenscenegraph"
CACHE STRING
"Dependend packages for the ${PACKAGE_COMPONENT} package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
SET(CPACK_${UPPER_PACKAGE_COMPONENT}_CONFLICTS
""
CACHE STRING
"Conflicting packages for the ${PACKAGE_COMPONENT} package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
)
ENDIF()
ENDIF()
ELSE(${ARGC} GREATER 1)
SET(PACKAGE_COMPONENT libopenscenegraph)
ENDIF(${ARGC} GREATER 1)
# Add the VisualStudio versioning info
# Add the VisualStudio versioning info
SET(TARGET_SRC ${TARGET_SRC} ${OPENSCENEGRAPH_VERSIONINFO_RC})
# here we use the command to generate the library
# here we use the command to generate the library
IF (DYNAMIC_OPENSCENEGRAPH)
ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC} ${TARGET_H})
ELSE (DYNAMIC_OPENSCENEGRAPH)
ADD_LIBRARY(${TARGET_TARGETNAME} STATIC ${TARGET_SRC} ${TARGET_H})
ENDIF(DYNAMIC_OPENSCENEGRAPH)
#not sure if needed, but for plugins only Msvc need the d suffix
IF(NOT MSVC)
IF(NOT UNIX)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_POSTFIX "")
ENDIF(NOT UNIX)
ELSE(NOT MSVC)
IF(MSVC)
IF(NOT CMAKE24)
SET_OUTPUT_DIR_PROPERTY_260(${TARGET_TARGETNAME} "${OSG_PLUGINS}") # Sets the ouput to be /osgPlugin-X.X.X ; also ensures the /Debug /Release are removed
ELSE(NOT CMAKE24)
IF(OSG_MSVC_VERSIONED_DLL)
IF(OSG_MSVC_VERSIONED_DLL)
#this is a hack... the build place is set to lib/<debug or release> by LIBARARY_OUTPUT_PATH equal to OUTPUT_LIBDIR
#the .lib will be crated in ../ so going straight in lib by the IMPORT_PREFIX property
#because we want dll placed in OUTPUT_BINDIR ie the bin folder sibling of lib, we can use ../../bin to go there,
#it is hardcoded, we should compute OUTPUT_BINDIR position relative to OUTPUT_LIBDIR ... to be implemented
#changing bin to something else breaks this hack
#the dll are placed in bin/${OSG_PLUGINS}
#the dll are placed in bin/${OSG_PLUGINS}
IF(NOT MSVC_IDE)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PREFIX "../bin/${OSG_PLUGINS}/")
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PREFIX "../bin/${OSG_PLUGINS}/")
ELSE(NOT MSVC_IDE)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PREFIX "../../bin/${OSG_PLUGINS}/" IMPORT_PREFIX "../")
ENDIF(NOT MSVC_IDE)
@@ -313,26 +330,39 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
ENDIF(OSG_MSVC_VERSIONED_DLL)
ENDIF(NOT CMAKE24)
ENDIF(NOT MSVC)
ENDIF(MSVC)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}")
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES FOLDER "Plugins")
IF(APPLE)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
IF(OSG_BUILD_PLATFORM_IPHONE)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
ENDIF()
ENDIF()
SETUP_LINK_LIBRARIES()
#the installation path are differentiated for win32 that install in bib versus other architecture that install in lib${LIB_POSTFIX}/${OSG_PLUGINS}
#the installation path are differentiated for win32 that install in bin versus other architecture that install in lib${LIB_POSTFIX}/${OSG_PLUGINS}
IF(WIN32)
INSTALL(TARGETS ${TARGET_TARGETNAME}
INSTALL(TARGETS ${TARGET_TARGETNAME}
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev
LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT})
IF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
IF( ${CMAKE_GENERATOR} STREQUAL "Ninja" )
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS RelWithDebInfo)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS Debug)
ELSE( ${CMAKE_GENERATOR} STREQUAL "Ninja" )
INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS RelWithDebInfo)
INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS Debug)
ENDIF( ${CMAKE_GENERATOR} STREQUAL "Ninja" )
ENDIF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
ELSE(WIN32)
INSTALL(TARGETS ${TARGET_TARGETNAME}
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
ARCHIVE DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev
LIBRARY DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT})
ENDIF(WIN32)
ENDIF()
ENDMACRO(SETUP_PLUGIN)
@@ -342,6 +372,10 @@ ENDMACRO(SETUP_PLUGIN)
MACRO(SETUP_EXE IS_COMMANDLINE_APP)
#MESSAGE("in -->SETUP_EXE<-- ${TARGET_NAME}-->${TARGET_SRC} <--> ${TARGET_H}<--")
IF(GLCORE_FOUND)
INCLUDE_DIRECTORIES( ${GLCORE_INCLUDE_DIR} )
ENDIF()
IF(NOT TARGET_TARGETNAME)
SET(TARGET_TARGETNAME "${TARGET_DEFAULT_PREFIX}${TARGET_NAME}")
ENDIF(NOT TARGET_TARGETNAME)
@@ -350,11 +384,11 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP)
ENDIF(NOT TARGET_LABEL)
IF(${IS_COMMANDLINE_APP})
ADD_EXECUTABLE(${TARGET_TARGETNAME} ${TARGET_SRC} ${TARGET_H})
ELSE(${IS_COMMANDLINE_APP})
IF(APPLE)
# SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION}")
# Short Version is the "marketing version". It is the version
@@ -363,6 +397,8 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP)
# Bundle version is the version the OS looks at.
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION}")
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "org.openscenegraph.${TARGET_TARGETNAME}" )
# replace underscore by hyphen
STRING(REGEX REPLACE "_" "-" MACOSX_BUNDLE_GUI_IDENTIFIER ${MACOSX_BUNDLE_GUI_IDENTIFIER})
SET(MACOSX_BUNDLE_BUNDLE_NAME "${TARGET_NAME}" )
# SET(MACOSX_BUNDLE_ICON_FILE "myicon.icns")
# SET(MACOSX_BUNDLE_COPYRIGHT "")
@@ -382,7 +418,7 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP)
ENDIF(APPLE)
ADD_EXECUTABLE(${TARGET_TARGETNAME} ${PLATFORM_SPECIFIC_CONTROL} ${TARGET_SRC} ${TARGET_H})
ENDIF(${IS_COMMANDLINE_APP})
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}")
@@ -396,7 +432,14 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP)
SET_OUTPUT_DIR_PROPERTY_260(${TARGET_TARGETNAME} "") # Ensure the /Debug /Release are removed
ENDIF(MSVC_IDE AND OSG_MSVC_VERSIONED_DLL)
SETUP_LINK_LIBRARIES()
IF(APPLE)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
IF(OSG_BUILD_PLATFORM_IPHONE)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
ENDIF()
ENDIF()
SETUP_LINK_LIBRARIES()
ENDMACRO(SETUP_EXE)
@@ -410,15 +453,19 @@ MACRO(SETUP_APPLICATION APPLICATION_NAME)
ELSE(${ARGC} GREATER 1)
SET(IS_COMMANDLINE_APP 0)
ENDIF(${ARGC} GREATER 1)
SETUP_EXE(${IS_COMMANDLINE_APP})
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES FOLDER "Applications")
IF(APPLE)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin BUNDLE DESTINATION bin)
ELSE(APPLE)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph )
IF(MSVC)
INSTALL(FILES ${OUTPUT_BINDIR}/${TARGET_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph CONFIGURATIONS RelWithDebInfo)
INSTALL(FILES ${OUTPUT_BINDIR}/${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph CONFIGURATIONS Debug)
ENDIF(MSVC)
ENDIF(APPLE)
ENDMACRO(SETUP_APPLICATION)
@@ -439,15 +486,19 @@ MACRO(SETUP_EXAMPLE EXAMPLE_NAME)
ELSE(${ARGC} GREATER 1)
SET(IS_COMMANDLINE_APP 0)
ENDIF(${ARGC} GREATER 1)
SETUP_EXE(${IS_COMMANDLINE_APP})
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES FOLDER "Examples")
IF(APPLE)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin )
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin )
ELSE(APPLE)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples )
IF(MSVC)
INSTALL(FILES ${OUTPUT_BINDIR}/${TARGET_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS RelWithDebInfo)
INSTALL(FILES ${OUTPUT_BINDIR}/${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS Debug)
ENDIF(MSVC)
ENDIF(APPLE)
ENDMACRO(SETUP_EXAMPLE)
@@ -483,7 +534,7 @@ MACRO(HANDLE_MSVC_DLL)
ENDIF(${ARGC} GREATER 1)
SET_OUTPUT_DIR_PROPERTY_260(${LIB_NAME} "") # Ensure the /Debug /Release are removed
IF(NOT MSVC_IDE)
IF(NOT MSVC_IDE)
IF (NOT CMAKE24)
BUILDER_VERSION_GREATER(2 8 0)
IF(NOT VALID_BUILDER_VERSION)
@@ -516,8 +567,12 @@ MACRO(HANDLE_MSVC_DLL)
ELSE (NOT CMAKE24)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
ENDIF (NOT CMAKE24)
ENDIF(NOT MSVC_IDE)
ENDIF(NOT MSVC_IDE)
# SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../../bin/osg${OPENSCENEGRAPH_SOVERSION}-")
# SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
ENDMACRO(HANDLE_MSVC_DLL)
MACRO(REMOVE_CXX_FLAG flag)
STRING(REPLACE "${flag}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ENDMACRO()

177215
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
OpenSceneGraph Public License, Version 0.0
OpenSceneGraph Public License, Version 1.0
==========================================
Copyright (C) 2002 Robert Osfield.
Copyright (C) 2018 Robert Osfield.
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
@@ -12,18 +12,19 @@
This library is free software; you can redistribute it and/or modify it
under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0
or later.
Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid
out in the wxWindows section below. The LGPL is contained in the
final section of this license.
Notes: the OSGPL is based on the LGPL-2.1-only WITH WxWindows-exception-3.1,
with the 4 exceptions laid out in the wxWindows section below. The LGPL is
contained in the final section of this license.
-------------------------------------------------------------------------------
wxWindows Library Licence, Version 3
====================================
Copyright (C) 1998 Julian Smart, Robert Roebling [, ...]
wxWindows Library Licence, Version 3.1
======================================
Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
@@ -43,20 +44,20 @@
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxWindows Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
either version 3.1 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version
3.1 of the Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
under your own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
@@ -71,11 +72,13 @@
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
------------------------------------------------------------------------------
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -86,7 +89,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -131,7 +134,7 @@ modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
@@ -187,8 +190,8 @@ modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
@@ -222,7 +225,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -234,7 +237,7 @@ Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
@@ -292,7 +295,7 @@ instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
@@ -343,7 +346,7 @@ Library will still fall under Section 6.)
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
@@ -405,7 +408,7 @@ restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
@@ -446,7 +449,7 @@ subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
@@ -498,7 +501,7 @@ conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
@@ -508,7 +511,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -531,8 +534,8 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest

950
NEWS.txt

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@ APP_PROJECT_PATH := $(call my-dir)
APP_OPTIM := ${ANDROID_RELEASE_OPTIM}
APP_PLATFORM := ${ANDROID_PLATFORM}
APP_PLATFORM := android-${ANDROID_PLATFORM}
APP_STL := ${ANDROID_STL}
APP_CPPFLAGS := -fexceptions -frtti
#APP_CPPFLAGS := -Os -mthumb-interwork -fno-short-enums

File diff suppressed because it is too large Load Diff

125
README.md Normal file
View File

@@ -0,0 +1,125 @@
[![Build Status](https://travis-ci.org/openscenegraph/OpenSceneGraph.svg?branch=master)](https://travis-ci.org/openscenegraph/OpenSceneGraph)
[![Coverity Status](https://scan.coverity.com/projects/9159/badge.svg)](https://scan.coverity.com/projects/openscenegraph-openscenegraph)
[![Documentation](https://codedocs.xyz/openscenegraph/OpenSceneGraph.svg)](https://codedocs.xyz/openscenegraph/OpenSceneGraph/)
[ABI Tracker](https://abi-laboratory.pro/tracker/timeline/openscenegraph/ "ABI Tracker")
# Introduction
Welcome to the OpenSceneGraph (OSG).
For information on the project, in-depth details on how to compile and run libraries and examples, see the documentation on the OpenSceneGraph website:
http://www.openscenegraph.org/index.php/documentation
For support please use the github OpenSceneGraph Discussions forum:
https://github.com/openscenegraph/OpenSceneGraph/discussions
For the impatient, we've included quick build instructions below, these are are broken down is three parts:
1) General notes on building the OpenSceneGraph
2) macOS release notes
3) iOS release notes
If details below are not sufficient then head over to the openscenegraph.org to the Documentation/GettingStarted and Documentation/PlatformSpecifics sections for more indepth instructions.
Robert Osfield.
Project Lead.
31th January 2020.
---
## Section 1. How to build OpenSceneGraph
If you are using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager you can download and install OpenSceneGraph from source with CMake integration using a single command:
```
vcpkg install osg
```
The OpenSceneGraph uses the CMake build system to generate a platform-specific build environment. CMake reads the `CMakeLists.txt` files that you'll find throughout the OpenSceneGraph directories, checks for installed dependencies and then generates files for the selected build system.
If you don't already have CMake installed on your system you can grab it from http://www.cmake.org, use version 2.8.0 or later. Details on the OpenSceneGraph's CMake build can be found at:
http://www.openscenegraph.org/projects/osg/wiki/Build/CMake
Under Unix-like systems (i.e. Linux, IRIX, Solaris, Free-BSD, HP-UX, AIX, macOS) use the `cmake` or `ccmake` command-line utils. Note that `cmake .` defaults to building Release to ensure that you get the best performance from your final libraries/applications.
cd OpenSceneGraph
cmake .
make
sudo make install
Alternatively, you can create an out-of-source build directory and run cmake or ccmake from there. The advantage to this approach is that the temporary files created by CMake won't clutter the OpenSceneGraph source directory, and also makes it possible to have multiple independent build targets by creating multiple build directories. In a directory alongside the OpenSceneGraph use:
mkdir build
cd build
cmake ../OpenSceneGraph
make
sudo make install
Under Windows use the GUI tool CMakeSetup to build your VisualStudio files. The following page on our wiki dedicated to the CMake build system should help guide you through the process:
http://www.openscenegraph.org/index.php/documentation/platform-specifics/windows
Under macOS you can either use the CMake build system above, or use the Xcode projects that you will find in the OpenSceneGraph/Xcode directory. See release notes on macOS CMake build below.
For further details on compilation, installation and platform-specific information read "Getting Started" guide:
http://www.openscenegraph.org/index.php/documentation/10-getting-started
## Section 2. Release notes on macOS build, by Eric Sokolowski et al.
There are two ways to compile OpenSceneGraph under macOS. The recommended way is to use CMake to generate Xcode project files and then use Xcode to build the library. The default project will be able to build Debug or Release libraries, examples, and sample applications.
The alternative is to build OpenSceneGraph from the command line using `make` or `ninja` using the instructions for Unix-like systems above.
Here are some key settings to consider when using CMake:
- BUILD_OSG_EXAMPLES - By default this is turned off. Turn this setting on to compile many great example programs.
- CMAKE_OSX_ARCHITECTURES - Xcode can create applications, executables, libraries, and frameworks that can be run on more than one architecture. Use this setting to indicate the architectures on which to build OSG. x86_64 is the only supported value for OS versions > 10.7.
- OSG_BUILD_APPLICATION_BUNDLES - Normally only executable binaries are created for the examples and sample applications. Turn this option on if you want to create real macOS .app bundles. There are caveats to creating `.app` bundles, see below.
- OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX - By default macOS uses the `imageio` plugin instead of the plugins for the individual file types (e.g. `jpg`, `gif`, etc.) to load image file types. The `imageio` plugin can handle all popular file formats through the ImageIO framework.
- OSG_WINDOWING_SYSTEM - You have the choice to use Cocoa, Carbon, or X11 when building applications on macOS. Cocoa is the default for OS versions >= 10.5. Carbon and X11 are no longer actively supported, either by Apple or the OSG community.
### APPLICATION BUNDLES (.app bundles)
The example programs when built as application bundles only contain the executable file. They do not contain the dependent libraries as would a normal bundle, so they are not generally portable to other machines.
They also do not know where to find plugins. An environmental variable OSG_LIBRARY_PATH may be set to point to the location where the plugin .so files are located. OSG_FILE_PATH may be set to point to the location where data files are located. Setting OSG_FILE_PATH to the OpenSceneGraph-Data directory is very useful when testing OSG by running the example programs.
Many of the example programs use command-line arguments. When double-clicking on an application (or using the equivalent "open" command on the command line) only those examples and applications that do not require command-line arguments will successfully run. The executable file within the .app bundle can be run from the command-line if command-line arguments are needed.
## Section 3. Release notes on iOS build, by Thomas Hogarth
With CMake 3.11, XCode 9.4 and the iOS sdk 11.4 installed you can generate an iOS XCode project using the following command line:
export THIRDPARTY_PATH=/path/to/3rdParty
cmake ./ -G Xcode -DOSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-DIPHONE_SDKVER="11.4" \
-DIPHONE_VERSION_MIN="10.0" \
-DOPENGL_PROFILE:STRING=GLES3 \
-DOSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=ON \
-DBUILD_OSG_APPLICATIONS:BOOL=OFF \
-DBUILD_OSG_EXAMPLES:BOOL=ON \
-DOSG_WINDOWING_SYSTEM:STRING=IOS \
-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX="imageio" \
-DDYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-DDYNAMIC_OPENTHREADS:BOOL=OFF \
-DCURL_INCLUDE_DIR:PATH="$THIRDPARTY_PATH/curl-ios-device/include" \
-DCURL_LIBRARY:PATH="$THIRDPARTY_PATH/curl-ios-device/lib/libcurl.a" \
-DFREETYPE_INCLUDE_DIR_freetype2:PATH="$THIRDPARTY_PATH/freetype-ios-universal/include/freetype" \
-DFREETYPE_INCLUDE_DIR_ft2build:PATH="$THIRDPARTY_PATH/freetype-ios-universal/include" \
-DFREETYPE_LIBRARY:PATH="$THIRDPARTY_PATH/freetype-ios-universal/lib/libFreetype2.a" \
-DTIFF_INCLUDE_DIR:PATH="$THIRDPARTY_PATH/tiff-ios-device/include" \
-DTIFF_LIBRARY:PATH="$THIRDPARTY_PATH/tiff-ios-device/lib/libtiff.a" \
-DGDAL_INCLUDE_DIR:PATH="$THIRDPARTY_PATH/gdal-ios-device/include" \
-DGDAL_LIBRARY:PATH="$THIRDPARTY_PATH/gdal-ios-device/lib/libgdal.a"
Be sure to set the THIRDPARTY_PATH to the path containing your thirdparty dependencies. Set IPHONE_SDKVER to the version of the iOS sdk you have installed, in this instance 11.4. IPHONE_VERSION_MIN controls the deployment sdk used by xcode, and lastly set OPENGL_PROFILE to the version of GLES you want to use.
Once this completes an XCode project will have been generated in the osg root folder. Open the generated Xcode project, select the example_osgViewerIPhone target. In 'General' tab set a development team.
Once this is done you should be able to build and deploy the `example_osgViewerIPhone` target on your device.

View File

@@ -1,214 +0,0 @@
Welcome to the OpenSceneGraph (OSG).
For up-to-date information on the project, in-depth details on how to
compile and run libraries and examples, see the documentation on the
OpenSceneGraph website:
http://www.openscenegraph.org
For support subscribe to our public mailing list:
http://www.openscenegraph.org/projects/osg/wiki/MailingLists
or forum:
http://forum.openscenegraph.org/
For the impatient, we've included quick build instructions below, these
are are broken down is three parts:
1) General notes on building the OpenSceneGraph
2) OSX release notes
3) iOS release notes
If details below are not sufficient then head over to the openscenegraph.org
to the Documentation/GettingStarted and Documentation/PlatformSpecifics sections for
more indepth instructions.
Robert Osfield.
Project Lead.
26th April 2013.
--
Section 1. How to build the OpenSceneGraph
==========================================
The OpenSceneGraph uses the CMake build system to generate a
platform-specific build environment. CMake reads the CMakeLists.txt
files that you'll find throughout the OpenSceneGraph directories,
checks for installed dependenciesand then generates the appropriate
build system.
If you don't already have CMake installed on your system you can grab
it from http://www.cmake.org, use version 2.4.6 or later. Details on the
OpenSceneGraph's CMake build can be found at:
http://www.openscenegraph.org/projects/osg/wiki/Build/CMake
Under unices (i.e. Linux, IRIX, Solaris, Free-BSD, HP-Ux, AIX, OSX)
use the cmake or ccmake command-line utils, or use the included tiny
configure script that'll run cmake for you. The configure script
simply runs 'cmake . -DCMAKE_BUILD_TYPE=Release' to ensure that you
get the best performance from your final libraries/applications.
cd OpenSceneGraph
./configure
make
sudo make install
Alternatively, you can create an out-of-source build directory and run
cmake or ccmake from there. The advantage to this approach is that the
temporary files created by CMake won't clutter the OpenSceneGraph
source directory, and also makes it possible to have multiple
independent build targets by creating multiple build directories. In a
directory alongside the OpenSceneGraph use:
mkdir build
cd build
cmake ../OpenSceneGraph -DCMAKE_BUILD_TYPE=Release
make
sudo make install
Under Windows use the GUI tool CMakeSetup to build your VisualStudio
files. The following page on our wiki dedicated to the CMake build
system should help guide you through the process:
http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio
Under OSX you can either use the CMake build system above, or use the
Xcode projects that you will find in the OpenSceneGraph/Xcode
directory. See release notes on OSX CMake build below.
For further details on compilation, installation and platform-specific
information read "Getting Started" guide:
http://www.openscenegraph.org/projects/osg/wiki/Support/GettingStarted
Section 2. Release notes on OSX build, by Eric Sokolowsky, August 5, 2008
=========================================================================
There are several ways to compile OpenSceneGraph under OSX. The
recommended way is to use CMake 2.6 to generate Xcode projects, then use
Xcode to build the library. The default project will be able to build
Debug or Release libraries, examples, and sample applications. Here are
some key settings to consider when using CMake:
BUILD_OSG_EXAMPLES - By default this is turned off. Turn this setting on
to compile many great example programs.
CMAKE_OSX_ARCHITECTURES - Xcode can create applications, executables,
libraries, and frameworks that can be run on more than one architecture.
Use this setting to indicate the architectures on which to build OSG.
Possibilities include ppc, ppc64, i386, and x86_64. Building OSG using
either of the 64-bit options (ppc64 and x86_64) has its own caveats
below.
OSG_BUILD_APPLICATION_BUNDLES - Normally only executable binaries are
created for the examples and sample applications. Turn this option on if
you want to create real OSX .app bundles. There are caveats to creating
.app bundles, see below.
OSG_WINDOWING_SYSTEM - You have the choice to use Carbon or X11 when
building applications on OSX. Under Leopard and later, X11 applications,
when started, will automatically launch X11 when needed. However,
full-screen X11 applications will still show the menu bar at the top of
the screen. Since many parts of the Carbon user interface are not
64-bit, X11 is the only supported option for OSX applications compiled
for ppc64 or x86_64.
There is an Xcode directory in the base of the OSG software
distribution, but its future is limited, and will be discontinued once
the CMake project generator completely implements its functionality.
APPLICATION BUNDLES (.app bundles)
The example programs when built as application bundles only contain the
executable file. They do not contain the dependent libraries as would a
normal bundle, so they are not generally portable to other machines.
They also do not know where to find plugins. An environmental variable
OSG_LIBRARY_PATH may be set to point to the location where the plugin
.so files are located. OSG_FILE_PATH may be set to point to the location
where data files are located. Setting OSG_FILE_PATH to the
OpenSceneGraph-Data directory is very useful when testing OSG by running
the example programs.
Many of the example programs use command-line arguments. When
double-clicking on an application (or using the equivalent "open"
command on the command line) only those examples and applications that
do not require command-line arguments will successfully run. The
executable file within the .app bundle can be run from the command-line
if command-line arguments are needed.
64-BIT APPLICATION SUPPORT
OpenSceneGraph will not compile successfully when OSG_WINDOWING_SYSTEM is
Carbon and either x86_64 or ppc64 is selected under CMAKE_OSX_ARCHITECTURES,
as Carbon is a 32bit only API. A version of the osgviewer library written in
Cocoa is needed. However, OSG may be compiled under 64-bits if the X11
windowing system is selected. However, Two parts of the OSG default
distribution will not work with 64-bit X11: the osgviewerWX example
program and the osgdb_qt (Quicktime) plugin. These must be removed from
the Xcode project after Cmake generates it in order to compile with
64-bit architectures. The lack of the latter means that images such as
jpeg, tiff, png, and gif will not work, nor will animations dependent on
Quicktime. A new ImageIO-based plugin is being developed to handle the
still images, and a QTKit plugin will need to be developed to handle
animations.
Section 3. Release notes on iOS build, by Thomas Hoghart
=========================================================
* Run CMake with either OSG_BUILD_PLATFORM_IPHONE or OSG_BUILD_PLATFORM_IPHONE_SIMULATOR set:
$ mkdir build-iOS ; cd build-iOS
$ ccmake -DOSG_BUILD_PLATFORM_IPHONE_SIMULATOR=YES -G Xcode ..
* Check that CMAKE_OSX_ARCHITECTURE is i386 for the simulator or armv6;armv7 for the device
* Disable DYNAMIC_OPENSCENEGRAPH, DYNAMIC_OPENTHREADS
This will give us the static build we need for iPhone.
* Disable OSG_GL1_AVAILABLE, OSG_GL2_AVAILABLE, OSG_GL3_AVAILABLE,
OSG_GL_DISPLAYLISTS_AVAILABLE, OSG_GL_VERTEX_FUNCS_AVAILABLE
* Enable OSG_GLES1_AVAILABLE *OR* OSG_GLES2_AVAILABLE
* Ensure OSG_WINDOWING_SYSTEM is set to IOS
* Change FREETYPE include and library paths to an iPhone version
(OpenFrameworks has one bundled with its distribution)
* Ensure that CMake_OSX_SYSROOT points to your iOS SDK.
* Generate the Xcode project
* Open the Xcode project
$ open OpenSceneGraph.xcodeproj
* Under Sources -> osgDB, select FileUtils.cpp and open the 'Get Info' panel, change File Type
to source.cpp.objcpp
Here's an example for the command-line:
$ cmake -G Xcode \
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-D CMAKE_CXX_FLAGS:STRING="-ftree-vectorize -fvisibility-inlines-hidden -mno-thumb -arch armv6 -pipe -no-cpp-precomp -miphoneos-version-min=3.1 -mno-thumb" \
-D BUILD_OSG_APPLICATIONS:BOOL=OFF \
-D OSG_BUILD_FRAMEWORKS:BOOL=OFF \
-D OSG_WINDOWING_SYSTEM:STRING=IOS \
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-D CMAKE_OSX_ARCHITECTURES:STRING="armv6;armv7" \
-D CMAKE_OSX_SYSROOT:STRING=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk \
-D OSG_GL1_AVAILABLE:BOOL=OFF \
-D OSG_GL2_AVAILABLE:BOOL=OFF \
-D OSG_GLES1_AVAILABLE:BOOL=ON \
-D OSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-D OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
-D OSG_GL_LIBRARY_STATIC:BOOL=OFF \
-D OSG_GL_MATRICES_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-D DYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-D DYNAMIC_OPENTHREADS:BOOL=OFF .
Known issues:
* When Linking final app against ive plugin, you need to add -lz to
the 'Other linker flags' list.
* Apps and exes don't get created
* You can only select Simulator, or Device projects. In the XCode
project you will see both types but the sdk they link will
be the same.

View File

@@ -1,9 +1,9 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This application is open source and may be redistributed and/or modified
* This application is open source and may be redistributed and/or modified
* freely and without restriction, both in commercial and non commercial applications,
* as long as this copyright notice is maintained.
*
*
* This application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -26,12 +26,12 @@ int main( int argc, char **argv )
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is an application for collecting a set of separate files into a single archive file that can be later read in OSG applications..");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
// if user request help write it out to cout.
if (arguments.read("-h") || arguments.read("--help"))
{
@@ -49,14 +49,14 @@ int main( int argc, char **argv )
{
insert = true;
}
bool extract = false;
while (arguments.read("-e") || arguments.read("--extract"))
{
extract = true;
}
bool list = false;
bool list = false;
while (arguments.read("-l") || arguments.read("--list"))
{
list = true;
@@ -93,7 +93,7 @@ int main( int argc, char **argv )
}
}
}
// any option left unread are converted into errors to write out later.
arguments.reportRemainingOptionsAsUnrecognized();
@@ -103,7 +103,7 @@ int main( int argc, char **argv )
arguments.writeErrorMessages(std::cout);
return 1;
}
if (archiveFilename.empty())
{
std::cout<<"Please specify an archive name using --archive filename"<<std::endl;
@@ -115,7 +115,7 @@ int main( int argc, char **argv )
std::cout<<"Please specify an operation on the archive, either --insert, --extract or --list"<<std::endl;
return 1;
}
if (insert && extract)
{
std::cout<<"Cannot insert and extract files from the archive at one time, please use either --insert or --extract."<<std::endl;
@@ -127,7 +127,7 @@ int main( int argc, char **argv )
if (insert)
{
archive = osgDB::openArchive(archiveFilename, osgDB::Archive::WRITE);
if (archive.valid())
{
for (FileNameList::iterator itr=files.begin();
@@ -135,7 +135,7 @@ int main( int argc, char **argv )
++itr)
{
std::cout<<"reading "<<*itr<<std::endl;
osg::ref_ptr<osg::Object> obj = osgDB::readObjectFile(*itr);
osg::ref_ptr<osg::Object> obj = osgDB::readRefObjectFile(*itr);
if (obj.valid())
{
std::cout<<" write to archive "<<*itr<<std::endl;
@@ -152,10 +152,10 @@ int main( int argc, char **argv )
}
}
}
else
else
{
archive = osgDB::openArchive(archiveFilename, osgDB::Archive::READ);
if (extract && archive.valid())
{
for (FileNameList::iterator itr=files.begin();
@@ -175,7 +175,7 @@ int main( int argc, char **argv )
}
if (list && archive.valid())
{
{
std::cout<<"List of files in archive:"<<std::endl;
osgDB::Archive::FileNameList fileNames;
if (archive->getFileNames(fileNames))
@@ -187,11 +187,11 @@ int main( int argc, char **argv )
std::cout<<" "<<*itr<<std::endl;
}
}
std::cout<<std::endl;
std::cout<<"Master file "<<archive->getMasterFileName()<<std::endl;
}
return 0;
}

View File

@@ -45,6 +45,8 @@ class MyGraphicsContext {
traits->doubleBuffer = false;
traits->sharedContext = 0;
traits->pbuffer = true;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
_gc = osg::GraphicsContext::createGraphicsContext(traits.get());
@@ -157,6 +159,7 @@ public:
}
osg::ref_ptr<osg::State> state = new osg::State;
state->initializeExtensionProcs();
for(TextureSet::iterator itr=_textureSet.begin();
itr!=_textureSet.end();
@@ -174,7 +177,7 @@ public:
{
texture->setInternalFormatMode(_internalFormatMode);
// need to disable the unref after apply, other the image could go out of scope.
// need to disable the unref after apply, otherwise the image could go out of scope.
bool unrefImageDataAfterApply = texture->getUnRefImageDataAfterApply();
texture->setUnRefImageDataAfterApply(false);
@@ -373,16 +376,6 @@ public:
++_numStateSetRemoved;
}
for(unsigned int i=0;i<node.getNumDrawables();++i)
{
osg::Drawable* drawable = node.getDrawable(i);
if (drawable && drawable->getStateSet())
{
drawable->setStateSet(0);
++_numStateSetRemoved;
}
}
traverse(node);
}
@@ -557,6 +550,7 @@ int main( int argc, char **argv )
// if user request help write it out to cout.
if (arguments.read("-h") || arguments.read("--help"))
{
osg::setNotifyLevel(osg::NOTICE);
usage( arguments.getApplicationName().c_str(), 0 );
//arguments.getApplicationUsage()->write(std::cout);
return 1;
@@ -633,13 +627,19 @@ int main( int argc, char **argv )
while (arguments.read("-e",ext))
{
std::string libName = osgDB::Registry::instance()->createLibraryNameForExtension(ext);
osgDB::Registry::instance()->loadLibrary(libName);
if (osgDB::Registry::instance()->loadLibrary(libName)==osgDB::Registry::NOT_LOADED)
{
OSG_NOTICE<<"Unable to load library : "<<libName<<std::endl;
}
}
std::string libName;
while (arguments.read("-l",libName))
{
osgDB::Registry::instance()->loadLibrary(libName);
if (osgDB::Registry::instance()->loadLibrary(libName)==osgDB::Registry::NOT_LOADED)
{
OSG_NOTICE<<"Unable to load library : "<<libName<<std::endl;
}
}
while (arguments.read("-o",str))
@@ -742,7 +742,7 @@ int main( int argc, char **argv )
while(arguments.read("--addMissingColours") || arguments.read("--addMissingColors")) { addMissingColours = true; }
bool do_overallNormal = false;
while(arguments.read("--overallNormal") || arguments.read("--overallNormal")) { do_overallNormal = true; }
while(arguments.read("--overallNormal")) { do_overallNormal = true; }
bool enableObjectCache = false;
while(arguments.read("--enable-object-cache")) { enableObjectCache = true; }
@@ -771,7 +771,7 @@ int main( int argc, char **argv )
osgDB::Registry::instance()->getOptions()->setObjectCacheHint(osgDB::Options::CACHE_ALL);
}
std::string fileNameOut("converted.osg");
std::string fileNameOut("converted.osgt");
if (fileNames.size()>1)
{
fileNameOut = fileNames.back();
@@ -780,29 +780,66 @@ int main( int argc, char **argv )
osg::Timer_t startTick = osg::Timer::instance()->tick();
osg::ref_ptr<osg::Node> root = osgDB::readNodeFiles(fileNames);
typedef std::vector< osg::ref_ptr<osg::Image> > Images;
typedef std::vector< osg::ref_ptr<osg::Node> > Nodes;
typedef std::vector< osg::ref_ptr<osg::Object> > Objects;
if (root.valid())
Images images;
Nodes nodes;
Objects objects;
for(FileNameList::iterator itr = fileNames.begin();
itr != fileNames.end();
++itr)
{
osg::Timer_t endTick = osg::Timer::instance()->tick();
osg::notify(osg::INFO)<<"Time to load files "<<osg::Timer::instance()->delta_m(startTick, endTick)<<" ms"<<std::endl;
osg::ref_ptr<osg::Object> object = osgDB::readObjectFile(*itr);
if (object.valid())
{
if (object->asNode()) nodes.push_back(object->asNode());
else if (object->asImage()) images.push_back(object->asImage());
else objects.push_back(object);
}
}
if (images.empty() && nodes.empty() && objects.empty())
{
osg::notify(osg::NOTICE)<<"Warning: failed to load any files"<<std::endl;
return 1;
}
if (pruneStateSet)
{
PruneStateSetVisitor pssv;
root->accept(pssv);
}
osg::Timer_t endTick = osg::Timer::instance()->tick();
osg::notify(osg::INFO)<<"Time to load files "<<osg::Timer::instance()->delta_m(startTick, endTick)<<" ms"<<std::endl;
if (fixTransparencyMode != FixTransparencyVisitor::NO_TRANSPARANCY_FIXING)
osg::ref_ptr<osg::Node> root;
if (nodes.size()==1) root = nodes.front();
else if (nodes.size()>1)
{
FixTransparencyVisitor atv(fixTransparencyMode);
root->accept(atv);
osg::ref_ptr<osg::Group> group = new osg::Group;
for(Nodes::iterator itr = nodes.begin();
itr != nodes.end();
++itr)
{
group->addChild(itr->get());
}
root = group;
}
if ( root.valid() )
{
if (pruneStateSet)
{
PruneStateSetVisitor pssv;
root->accept(pssv);
}
if (fixTransparencyMode != FixTransparencyVisitor::NO_TRANSPARANCY_FIXING)
{
FixTransparencyVisitor atv(fixTransparencyMode);
root->accept(atv);
}
if (smooth)
{
@@ -816,7 +853,7 @@ int main( int argc, char **argv )
root->accept(av);
}
// optimize the scene graph, remove rendundent nodes and state etc.
// optimize the scene graph, remove redundant nodes and state etc.
osgUtil::Optimizer optimizer;
optimizer.optimize(root.get());
@@ -825,7 +862,7 @@ int main( int argc, char **argv )
if (internalFormatMode != osg::Texture::USE_IMAGE_DATA_FORMAT)
{
std::string ext = osgDB::getFileExtension(fileNameOut);
ext = osgDB::getFileExtension(fileNameOut);
CompressTexturesVisitor ctv(internalFormatMode);
root->accept(ctv);
ctv.compress();
@@ -868,6 +905,20 @@ int main( int argc, char **argv )
osg::notify(osg::NOTICE)<<result.message()<< std::endl;
}
}
else if (!images.empty())
{
if (images.size()>1)
{
OSG_NOTICE<<"Warning: osgconv does not support writing multiple to a single file."<<std::endl;
return 1;
}
osgDB::writeImageFile(*images.front(), fileNameOut);
}
else if (!objects.empty())
{
osgDB::writeObjectFile(*images.front(), fileNameOut);
}
else
{
osg::notify(osg::NOTICE)<<"Error no data loaded."<< std::endl;

View File

@@ -1,9 +1,9 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This application is open source and may be redistributed and/or modified
* This application is open source and may be redistributed and/or modified
* freely and without restriction, both in commercial and non commercial applications,
* as long as this copyright notice is maintained.
*
*
* This application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -32,7 +32,10 @@
#include <signal.h>
#include <stdlib.h>
static bool s_ExitApplication = false;
#include <OpenThreads/Atomic>
static OpenThreads::Atomic s_ExitApplication;
static OpenThreads::Atomic s_SigValue;
struct Extents
{
@@ -46,20 +49,20 @@ struct Extents
_maxLevel(maxLevel),
_min(minX, minY),
_max(maxX, maxY) {}
Extents(const Extents& extents):
_maxLevel(extents._maxLevel),
_min(extents._min),
_max(extents._max) {}
Extents& operator = (const Extents& rhs)
{
if (&rhs == this) return *this;
_maxLevel = rhs._maxLevel;
_min = rhs._min;
_max = rhs._max;
return *this;
}
@@ -69,10 +72,10 @@ struct Extents
osg::notify(osg::INFO)<<" _maxLevel="<<_maxLevel<<", _min="<<_min<<" _max="<<_max<<std::endl;
if (level>_maxLevel) return false;
osg::Vec2d union_min, union_max;
// handle mins
// handle mins
if (_min.x()!=DBL_MAX && in_min.x()!=DBL_MAX)
{
// both _min.x() and in_min.x() are defined so use max of two
@@ -95,7 +98,7 @@ struct Extents
union_min.y() = _min.y()<in_min.y() ? _min.y() : in_min.y();
}
// handle maxs
// handle maxs
if (_max.x()!=-DBL_MAX && in_max.x()!=-DBL_MAX)
{
// both _max.x() and in_max.x() are defined so use max of two
@@ -121,7 +124,7 @@ struct Extents
bool result = union_min.x()<union_max.x() && union_min.y()<union_max.y() ;
osg::notify(osg::INFO)<<" union_min="<<union_min<<" union_max="<<union_max<<" result = "<<result<<std::endl;
return result;
}
@@ -140,7 +143,7 @@ public:
_currentLevel(0) {}
void setFileCache(osgDB::FileCache* fileCache) { _fileCache = fileCache; }
void addExtents(unsigned int maxLevel, double minX, double minY, double maxX, double maxY)
{
_extentsList.push_back(Extents(maxLevel, minX, minY, maxX, maxY));
@@ -154,16 +157,16 @@ public:
void apply(osg::CoordinateSystemNode& cs)
{
_csnStack.push_back(&cs);
if (!s_ExitApplication) traverse(cs);
_csnStack.pop_back();
}
void apply(osg::Group& group)
{
if (s_ExitApplication) return;
osgTerrain::TerrainTile* terrainTile = dynamic_cast<osgTerrain::TerrainTile*>(&group);
osgTerrain::Locator* locator = terrainTile ? terrainTile->getLocator() : 0;
if (locator)
@@ -196,7 +199,7 @@ public:
return;
}
traverse(group);
}
@@ -217,11 +220,11 @@ public:
void apply(osg::PagedLOD& plod)
{
if (s_ExitApplication) return;
++_currentLevel;
initBound();
// first compute the bounds of this subgraph
for(unsigned int i=0; i<plod.getNumFileNames(); ++i)
{
@@ -230,7 +233,7 @@ public:
traverse(plod);
}
}
if (intersects())
{
for(unsigned int i=0; i<plod.getNumFileNames(); ++i)
@@ -239,7 +242,7 @@ public:
if (!plod.getFileName(i).empty())
{
std::string filename;
if (!plod.getDatabasePath().empty())
if (!plod.getDatabasePath().empty())
{
filename = plod.getDatabasePath() + plod.getFileName(i);
}
@@ -255,10 +258,10 @@ public:
}
}
}
--_currentLevel;
}
void apply(osg::Geode& geode)
{
for(unsigned int i=0; i<geode.getNumDrawables(); ++i)
@@ -271,10 +274,10 @@ public:
}
}
}
osg::Node* readNodeFileAndWriteToCache(const std::string& filename)
osg::ref_ptr<osg::Node> readNodeFileAndWriteToCache(const std::string& filename)
{
osg::Node* node = 0;
osg::ref_ptr<osg::Node> node = 0;
if (_fileCache.valid() )
{
if (_fileCache->existsInCache(filename))
@@ -286,7 +289,7 @@ public:
{
osg::notify(osg::NOTICE)<<"reading : "<<filename<<std::endl;
node = osgDB::readNodeFile(filename);
node = osgDB::readRefNodeFile(filename);
if (node)
{
osg::notify(osg::NOTICE)<<"write to FileCache : "<<filename<<std::endl;
@@ -298,7 +301,7 @@ public:
else
{
osg::notify(osg::NOTICE)<<"reading : "<<filename<<std::endl;
node = osgDB::readNodeFile(filename);
node = osgDB::readRefNodeFile(filename);
}
return node;
}
@@ -307,18 +310,18 @@ public:
protected:
inline void pushMatrix(osg::Matrix& matrix) { _matrixStack.push_back(matrix); }
inline void popMatrix() { _matrixStack.pop_back(); }
void convertXYZToLatLongHeight(osg::EllipsoidModel* em, osg::Vec3d& v)
{
em->convertXYZToLatLongHeight(v.x(), v.y(), v.z(),
v.y(), v.x(), v.z());
v.x() = osg::RadiansToDegrees(v.x());
v.y() = osg::RadiansToDegrees(v.y());
}
void initBound()
{
_min.set(DBL_MAX, DBL_MAX);
@@ -332,16 +335,16 @@ protected:
if (v.x() > _max.x()) _max.x() = v.x();
if (v.y() > _max.y()) _max.y() = v.y();
}
void updateBound(osg::Vec3Array& vertices)
{
// set up matrix
osg::Matrix matrix;
if (!_matrixStack.empty()) matrix = _matrixStack.back();
// set up ellipsoid model
osg::EllipsoidModel* em = !_csnStack.empty() ? _csnStack.back()->getEllipsoidModel() : 0;
for(osg::Vec3Array::iterator itr = vertices.begin();
itr != vertices.end();
++itr)
@@ -352,7 +355,7 @@ protected:
updateBound(v);
}
}
bool intersects()
{
osg::notify(osg::INFO)<<"intersects() _min = "<<_min<<" _max = "<<_max<<std::endl;
@@ -362,7 +365,7 @@ protected:
{
if (itr->intersects(_currentLevel, _min, _max)) return true;
}
return false;
}
@@ -376,15 +379,15 @@ protected:
unsigned int _currentLevel;
MatrixStack _matrixStack;
CSNStack _csnStack;
osg::Vec2d _min;
osg::Vec2d _max;
};
static void signalHandler(int sig)
{
printf("\nCaught signal %d, requesting exit...\n\n",sig);
s_ExitApplication = true;
s_SigValue.exchange(sig);
s_ExitApplication.exchange(1);
}
int main( int argc, char **argv )
@@ -403,7 +406,7 @@ int main( int argc, char **argv )
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is an application for collecting a set of separate files into a single archive file that can be later read in OSG applications..");
@@ -412,21 +415,21 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->addCommandLineOption("-e level minX minY maxX maxY","Read down to <level> across the extents minX, minY to maxY, maxY. Note, for geocentric datase X and Y are longitude and latitude respectively.");
arguments.getApplicationUsage()->addCommandLineOption("-c directory","Shorthand for --file-cache directory.");
arguments.getApplicationUsage()->addCommandLineOption("--file-cache directory","Set directory as to place cache download files.");
// if user request help write it out to cout.
if (arguments.read("-h") || arguments.read("--help"))
{
arguments.getApplicationUsage()->write(std::cout);
return 1;
}
LoadDataVisitor ldv;
std::string fileCachePath;
while(arguments.read("--file-cache",fileCachePath) || arguments.read("-c",fileCachePath)) {}
if (fileCachePath.empty())
{
{
const char* env_fileCachePath = getenv("OSG_FILE_CACHE");
if (env_fileCachePath)
{
@@ -439,7 +442,7 @@ int main( int argc, char **argv )
std::cout<<"No path to the file cache defined, please set OSG_FILE_PATH env var, or use --file-cache <directory> to set a suitable directory for the file cache."<<std::endl;
return 1;
}
ldv.setFileCache(new osgDB::FileCache(fileCachePath));
unsigned int maxLevels = 0;
@@ -447,14 +450,14 @@ int main( int argc, char **argv )
{
ldv.addExtents(maxLevels);
}
double minX, maxX, minY, maxY;
while(arguments.read("-e",maxLevels, minX, minY, maxX, maxY))
{
ldv.addExtents(maxLevels, minX, minY, maxX, maxY);
}
std::string filename;
for(int i=1; i<arguments.argc(); ++i)
{
@@ -464,26 +467,26 @@ int main( int argc, char **argv )
break;
}
}
if (filename.empty())
if (filename.empty())
{
std::cout<<"No file to load specified."<<std::endl;
return 1;
}
osg::ref_ptr<osg::Node> loadedModel = ldv.readNodeFileAndWriteToCache(filename);
if (!loadedModel)
{
std::cout<<"No data loaded, please specify a database to load"<<std::endl;
return 1;
}
loadedModel->accept(ldv);
if (s_ExitApplication)
{
std::cout<<"osgfilecache cleanly exited in response to signal."<<std::endl;
std::cout<<"osgfilecache exited in response to signal : "<<s_SigValue<<std::endl;
}
return 0;

View File

@@ -254,7 +254,37 @@ const char* invalidNames[] =
"GraphicsContext*",
"Apple",
"GeometryNew",
"FrameBufferObject"
"FrameBufferObject",
"Lua",
"VolumeTile",
"PushStackValueVisitor",
"RayIntersector",
"OpenSceneGraph-Data",
"Node",
"AlphaFunc",
"CompositeViewer",
"OpenSceneGraph-3",
"DisplaySettings::SHADER_NONE",
"CodeDocs",
"Mon",
"Tue",
"Wed",
"Fri",
"Sat",
"Sun",
"I",
"TriangleFunctor",
"PrimitiveFunctor",
"OpenMW",
"StreamOperator",
"SceneLoader",
"OpenGL",
"FindLIBLAS",
"PissedCapslock",
"MinGW",
"Haojia521",
"Github",
"It"
};
@@ -347,6 +377,7 @@ TypoCorrection typoCorrections[] =
{"Krulthof", "Kruithof"},
{"Lagrade", "Lagarde"},
{"Largade", "Lagarde"},
{"Largarde", "Lagarde"},
{"Larshkari", "Lashkari"},
{"Lashakari", "Lashkari"},
{"Lashari", "Lashkari"},
@@ -454,7 +485,31 @@ TypoCorrection typoCorrections[] =
{"Eskland","Ekstrand"},
{"Baeuerele","Baeuerle"},
{"Bauerle","Baeuerle"},
{"Baeurele","Baeuerle"}
{"Baeurele","Baeuerle"},
{"Nillson","Nilsson"},
{"Bjorn","Bj<EFBFBD>rn"},
{"Björn","Bj<EFBFBD>rn"},
{"Stepan","Stephan"},
{"Kristoger","Kristofer"},
{"Blessing","Blissing"},
{"Dannahuer","Dannhauer"},
{"Chebeav", "Chebaev"},
{"Messershmidt","Messerschmidt"},
{"Auelien","Aurelien"},
{"Aurélien","Aur<EFBFBD>lien"},
{"McDonnel","Mc Donnell"},
{"McDonnell","Mc Donnell"},
{"Delallée","Delall<EFBFBD>e"},
{"Gjøl","Gj<EFBFBD>l"},
{"Ravšelj","Rav<EFBFBD>elj"},
{"Ravsel", "Rav<EFBFBD>elj"},
{"Ravselj", "Rav<EFBFBD>elj"},
{"Janik", "Jannik"},
{"Viganò", "Vigan<EFBFBD>"},
{"Vigano", "Vigan<EFBFBD>"},
{"Frashud", "Farshid"},
{"Dannahauer","Dannahauer"},
{"Sando","Sandro"}
};
@@ -468,6 +523,18 @@ struct NameCorrection
NameCorrection nameCorrections[] =
{
{"LaurensVoerman","GetScalarValue",
"Laurens", "Voerman"},
{"LaurensVoerman","Meta_Shape",
"Laurens", "Voerman"},
{"LaurensVoerman","OpenCascade",
"Laurens", "Voerman"},
{"LaurensVoerman","Fri",
"Laurens", "Voerman"},
{"LaurensVoerman","",
"Laurens", "Voerman"},
{"Laurens","Loerman",
"Laurens", "Voerman"},
{"FrancoisTigeot","",
"Francois", "Tigeot"},
{"Juan","Manuel",
@@ -562,6 +629,8 @@ NameCorrection nameCorrections[] =
"Melchior", "Franz"},
{"Glen", "Waldon",
"Glenn", "Waldron"},
{"Glen", "Waldron",
"Glenn", "Waldron"},
{"Ralf", "Karn",
"Ralf", "Kern"},
{"Donny", "Cipperly",
@@ -594,6 +663,8 @@ NameCorrection nameCorrections[] =
"Romano", "Jos<EFBFBD> Magacho da Silva"},
{"Rommano", "Silva",
"Romano", "Jos<EFBFBD> Magacho da Silva"},
{"Romano", "Magacho",
"Romano", "Jos<EFBFBD> Magacho da Silva"},
{"Leandro", "Motta",
"Leandro", "Motta Barros"},
{"Leandro", "Motto",
@@ -619,7 +690,29 @@ NameCorrection nameCorrections[] =
{"Tyge", "",
"Tyge", "L<EFBFBD>vset"},
{"Ricard", "Schmidt",
"Richard", "Schmidt"}
"Richard", "Schmidt"},
{"Matthias", "Helsing",
"Mattias", "Helsing"},
{"Clement", "Boesch",
"Cl<EFBFBD>ment", "B<EFBFBD>sch"},
{"Lauren", "Voerman",
"Laurens", "Voerman"},
{"Pjotr", "Sventachov",
"Pjotr", "Svetachov"},
{"Bradley", "Baker",
"Bradley", "Baker Searles"},
{"PawelKsiezopolski", "",
"Pawel", "Ksiezopolski"},
{"Albert", "Luaces",
"Alberto","Luaces"},
{"KOS", "",
"Konstantin","Matveyev"},
{"WeSee", "",
"Alois", "Wismer"},
{"We", "See",
"Alois", "Wismer"},
{"AnyOldName3", "",
"Chris", "Djali"}
};
@@ -951,7 +1044,9 @@ void printContributors(const std::string& changeLog, bool printNumEntries)
cout << "-------------------------" << endl;
for (SortedNameMap::reverse_iterator sitr = sortedNames.rbegin(); sitr != sortedNames.rend(); ++sitr)
{
cout << sitr->first << "\t" << sitr->second.first << " " << sitr->second.second << endl;
cout << sitr->first << "\t" << sitr->second.first;
if (!sitr->second.second.empty()) cout << " " << sitr->second.second;
cout << endl;
}
}
else
@@ -960,7 +1055,9 @@ void printContributors(const std::string& changeLog, bool printNumEntries)
cout << "-----------------" << endl;
for (SortedNameMap::reverse_iterator sitr = sortedNames.rbegin(); sitr != sortedNames.rend(); ++sitr)
{
cout << sitr->second.first << " " << sitr->second.second << endl;
cout << sitr->second.first;
if (!sitr->second.second.empty()) cout << " " << sitr->second.second;
cout << endl;
}
}
}

View File

@@ -1,5 +1,5 @@
// The majority of the application is dedicated to building the
// current contribitors list by parsing the ChangeLog, it just takes
// current contributors list by parsing the ChangeLog, it just takes
// one line in the main itself to report the version number.
#include <set>
@@ -17,6 +17,7 @@
#include <osg/Plane>
#include <osg/BoundingBox>
#include <osg/BoundingSphere>
#include <osg/Quat>
#ifdef BUILD_CONTRIBUTORS
extern void printContributors(const std::string& changeLog, bool printNumEntries);
@@ -40,6 +41,7 @@ int main( int argc, char** argv)
arguments.getApplicationUsage()->addCommandLineOption("Plane::value_type", "Print the value of Plane::value_type");
arguments.getApplicationUsage()->addCommandLineOption("BoundingSphere::value_type", "Print the value of BoundingSphere::value_type");
arguments.getApplicationUsage()->addCommandLineOption("BoundingBox::value_type", "Print the value of BoundingBox::value_type");
arguments.getApplicationUsage()->addCommandLineOption("Quat::value_type", "Print the value of Quat::value_type");
#ifdef BUILD_CONTRIBUTORS
arguments.getApplicationUsage()->addCommandLineOption("-r <file> or --read <file>", "Read the ChangeLog to generate an estimated contributors list.");
@@ -139,6 +141,12 @@ int main( int argc, char** argv)
return 0;
}
if (arguments.read("Quat::value_type"))
{
cout << ((sizeof(osg::Quat::value_type) == 4) ? "float" : "double") << endl;
return 0;
}
cout << osgGetLibraryName() << " " << osgGetVersion() << endl << endl;
#ifdef BUILD_CONTRIBUTORS

View File

@@ -14,6 +14,7 @@
#include <osg/CoordinateSystemNode>
#include <osg/Switch>
#include <osg/Types>
#include <osgText/Text>
#include <osgViewer/Viewer>
@@ -32,111 +33,6 @@
#include <iostream>
#include <osg/GLExtensions>
#ifndef GL_ARB_sync
#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
#define GL_OBJECT_TYPE 0x9112
#define GL_SYNC_CONDITION 0x9113
#define GL_SYNC_STATUS 0x9114
#define GL_SYNC_FLAGS 0x9115
#define GL_SYNC_FENCE 0x9116
#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
#define GL_UNSIGNALED 0x9118
#define GL_SIGNALED 0x9119
#define GL_ALREADY_SIGNALED 0x911A
#define GL_TIMEOUT_EXPIRED 0x911B
#define GL_CONDITION_SATISFIED 0x911C
#define GL_WAIT_FAILED 0x911D
#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
#endif
class MySwapBuffersCallback : public osg::GraphicsContext::SwapCallback
{
public:
MySwapBuffersCallback():
_extensionInitialized(false),
_glFenceSync(0),
_glIsSync(0),
_glDeleteSync(0),
_glClientWaitSync(0),
_glWaitSync(0),
_glGetInteger64v(0),
_glGetSynciv(0),
_previousSync(0)
{
OSG_NOTICE<<"Created Swap callback."<<std::endl;
}
void setUpExtensions()
{
_extensionInitialized = true;
osg::setGLExtensionFuncPtr(_glFenceSync, "glFenceSync");
osg::setGLExtensionFuncPtr(_glIsSync, "glIsSync");
osg::setGLExtensionFuncPtr(_glDeleteSync, "glDeleteSync");
osg::setGLExtensionFuncPtr(_glClientWaitSync, "glClientWaitSync");
osg::setGLExtensionFuncPtr(_glWaitSync, "glWaitSync");
osg::setGLExtensionFuncPtr(_glGetInteger64v, "glGetInteger64v");
osg::setGLExtensionFuncPtr(_glGetSynciv, "glGetSynciv");
}
virtual void swapBuffersImplementation(osg::GraphicsContext* gc)
{
// OSG_NOTICE<<"Before swap - place to do swap ready sync"<<std::endl;
gc->swapBuffersImplementation();
//glFinish();
if (!_extensionInitialized) setUpExtensions();
if (_glClientWaitSync)
{
if (_previousSync)
{
unsigned int num_seconds = 1;
GLuint64 timeout = num_seconds * ((GLuint64)1000 * 1000 * 1000);
_glClientWaitSync(_previousSync, 0, timeout);
_glDeleteSync(_previousSync);
}
_previousSync = _glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
}
//gc->getState()->checkGLErrors("after glWaitSync");
//OSG_NOTICE<<"After swap"<<std::endl;
}
#ifdef _WIN32
typedef __int64 GLint64;
typedef unsigned __int64 GLuint64;
#else
typedef int64_t GLint64;
typedef uint64_t GLuint64;
#endif
typedef struct __GLsync *GLsync;
typedef GLsync (GL_APIENTRY * PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
typedef GLboolean (GL_APIENTRY * PFNGLISSYNCPROC) (GLsync sync);
typedef void (GL_APIENTRY * PFNGLDELETESYNCPROC) (GLsync sync);
typedef GLenum (GL_APIENTRY * PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
typedef void (GL_APIENTRY * PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
typedef void (GL_APIENTRY * PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params);
typedef void (GL_APIENTRY * PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
bool _extensionInitialized;
PFNGLFENCESYNCPROC _glFenceSync;
PFNGLISSYNCPROC _glIsSync;
PFNGLDELETESYNCPROC _glDeleteSync;
PFNGLCLIENTWAITSYNCPROC _glClientWaitSync;
PFNGLWAITSYNCPROC _glWaitSync;
PFNGLGETINTEGER64VPROC _glGetInteger64v;
PFNGLGETSYNCIVPROC _glGetSynciv;
GLsync _previousSync;
};
int main(int argc, char** argv)
{
@@ -152,6 +48,7 @@ int main(int argc, char** argv)
arguments.getApplicationUsage()->addCommandLineOption("-p <filename>","Play specified camera path animation file, previously saved with 'z' key.");
arguments.getApplicationUsage()->addCommandLineOption("--speed <factor>","Speed factor for animation playing (1 == normal speed).");
arguments.getApplicationUsage()->addCommandLineOption("--device <device-name>","add named device to the viewer");
arguments.getApplicationUsage()->addCommandLineOption("--stats","print out load and compile timing stats");
osgViewer::Viewer viewer(arguments);
@@ -175,26 +72,24 @@ int main(int argc, char** argv)
return 1;
}
bool printStats = arguments.read("--stats");
std::string url, username, password;
while(arguments.read("--login",url, username, password))
{
if (!osgDB::Registry::instance()->getAuthenticationMap())
{
osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(
url,
new osgDB::AuthenticationDetails(username, password)
);
}
osgDB::Registry::instance()->getOrCreateAuthenticationMap()->addAuthenticationDetails(
url,
new osgDB::AuthenticationDetails(username, password)
);
}
std::string device;
while(arguments.read("--device", device))
{
osg::ref_ptr<osgGA::Device> dev = osgDB::readFile<osgGA::Device>(device);
osg::ref_ptr<osgGA::Device> dev = osgDB::readRefFile<osgGA::Device>(device);
if (dev.valid())
{
viewer.addDevice(dev.get());
viewer.addDevice(dev);
}
}
@@ -217,7 +112,7 @@ int main(int argc, char** argv)
while (arguments.read("-p",pathfile))
{
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
if (apm || !apm->valid())
if (apm && !apm->getAnimationPath()->empty())
{
apm->setTimeScale(animationSpeed);
@@ -231,8 +126,6 @@ int main(int argc, char** argv)
viewer.setCameraManipulator( keyswitchManipulator.get() );
}
bool doArbSync = arguments.read("--sync");
// add the state manipulator
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
@@ -257,14 +150,25 @@ int main(int argc, char** argv)
// add the screen capture handler
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
osg::ElapsedTime elapsedTime;
// load the data
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFiles(arguments);
if (!loadedModel)
{
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
return 1;
}
if (printStats)
{
double loadTime = elapsedTime.elapsedTime_m();
std::cout<<"Load time "<<loadTime<<"ms"<<std::endl;
viewer.getStats()->collectStats("compile", true);
}
// any option left unread are converted into errors to write out later.
arguments.reportRemainingOptionsAsUnrecognized();
@@ -278,24 +182,12 @@ int main(int argc, char** argv)
// optimize the scene graph, remove redundant nodes and state etc.
osgUtil::Optimizer optimizer;
optimizer.optimize(loadedModel.get());
optimizer.optimize(loadedModel);
viewer.setSceneData( loadedModel.get() );
viewer.setSceneData(loadedModel);
viewer.realize();
if (doArbSync)
{
osgViewer::ViewerBase::Contexts contexts;
viewer.getContexts(contexts);
for(osgViewer::ViewerBase::Contexts::iterator itr = contexts.begin();
itr != contexts.end();
++itr)
{
(*itr)->setSwapCallback(new MySwapBuffersCallback);
}
}
return viewer.run();
}

View File

@@ -54,7 +54,7 @@ IF (NOT DYNAMIC_OPENSCENEGRAPH)
osgdb_openflight
osgdb_obj
)
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES}
osgdb_deprecated_osg osgdb_deprecated_osgparticle osgdb_deprecated_osganimation
osgdb_deprecated_osgfx osgdb_deprecated_osgsim osgdb_deprecated_osgtext

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include "Cluster.h"
@@ -15,8 +16,9 @@
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <errno.h>
#if !defined (WIN32) || defined(__CYGWIN__)
#if !defined (_WIN32) || defined(__CYGWIN__)
#include <sys/ioctl.h>
#include <sys/uio.h>
#include <sys/socket.h>
@@ -33,21 +35,23 @@
#if defined(__linux)
#include <unistd.h>
#include <linux/sockios.h>
#elif defined(__FreeBSD__) || defined(__DragonFly__)
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
#include <unistd.h>
#include <sys/sockio.h>
#elif defined(__sgi)
#include <unistd.h>
#include <net/soioctl.h>
#elif defined(__CYGWIN__)
#elif defined(__CYGWIN__)
#include <unistd.h>
#elif defined(__sun)
#elif defined (__GNU__)
#include <unistd.h>
#elif defined(__sun)
#include <unistd.h>
#include <sys/sockio.h>
#elif defined (__APPLE__)
#include <unistd.h>
#include <sys/sockio.h>
#elif defined (WIN32)
#elif defined (_WIN32)
#include <winsock.h>
#include <stdio.h>
#elif defined (__hpux)
@@ -59,7 +63,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
#include <winsock.h>
#else
#include <unistd.h>
@@ -202,7 +206,8 @@ void DataConverter::write(CameraPacket& cameraPacket)
itr != cameraPacket._events.end();
++itr)
{
write(*(*itr));
osgGA::GUIEventAdapter* event = (*itr)->asGUIEventAdapter();
if (event) write(*(event));
}
}
@@ -249,7 +254,7 @@ void CameraPacket::writeEventQueue(osgViewer::Viewer& viewer)
//////////////////////////////////////////////////////////////////////////////
//
// Reciever
// Receiver
//
Receiver::Receiver( void )
{
@@ -260,7 +265,7 @@ Receiver::Receiver( void )
Receiver::~Receiver( void )
{
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
closesocket( _so);
#else
close( _so );
@@ -269,7 +274,7 @@ Receiver::~Receiver( void )
bool Receiver::init( void )
{
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__)
WORD version = MAKEWORD(1,1);
WSADATA wsaData;
// First, we start up Winsock
@@ -287,18 +292,27 @@ bool Receiver::init( void )
perror( "Socket" );
return false;
}
#if defined (WIN32) && !defined(__CYGWIN__)
int result = 0;
#if defined (_WIN32) && !defined(__CYGWIN__)
// const BOOL on = TRUE;
// setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(int));
#else
int on = 1;
setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
result = setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
#endif
if (result)
{
OSG_NOTICE<<"Warning: Receiver::init() setsockopt(..) failed, errno="<<errno<<std::endl;
return false;
}
// struct sockaddr_in saddr;
saddr.sin_family = AF_INET;
saddr.sin_port = htons( _port );
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
saddr.sin_addr.s_addr = htonl(INADDR_ANY);
#else
saddr.sin_addr.s_addr = 0;
@@ -337,8 +351,8 @@ void Receiver::sync( void )
}
#if defined(__linux) || defined(__FreeBSD__) || defined( __APPLE__ ) || \
defined(__DragonFly__)
socklen_t
defined(__DragonFly__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
socklen_t
#else
int
#endif
@@ -352,13 +366,19 @@ void Receiver::sync( void )
tv.tv_sec = 0;
tv.tv_usec = 0;
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
// saddr.sin_port = htons( _port );
recvfrom( _so, (char *)_buffer, _buffer_size, 0, (sockaddr*)&saddr, &size );
int result = recvfrom( _so, (char *)_buffer, _buffer_size, 0, (sockaddr*)&saddr, &size );
// recvfrom(sock_Receive, szMessage, 256, 0, (sockaddr*)&addr_Cli, &clilen)
//int err = WSAGetLastError ();
//int *dum = (int*) _buffer;
if (result<0)
{
OSG_NOTICE<<"Warning: Receiver::sync() recvfrom(..) failed, errno="<<errno<<std::endl;
return;
}
while( select( _so+1, &fdset, 0L, 0L, &tv ) )
{
if( FD_ISSET( _so, &fdset ) )
@@ -367,7 +387,13 @@ void Receiver::sync( void )
}
}
#else
recvfrom( _so, (caddr_t)_buffer, _buffer_size, 0, 0, &size );
int result = recvfrom( _so, (caddr_t)_buffer, _buffer_size, 0, 0, &size );
if (result<0)
{
OSG_NOTICE<<"Warning: Receiver::sync() recvfrom(..) failed, errno="<<errno<<std::endl;
return;
}
while( select( _so+1, &fdset, 0L, 0L, &tv ) )
{
if( FD_ISSET( _so, &fdset ) )
@@ -381,7 +407,7 @@ void Receiver::sync( void )
//////////////////////////////////////////////////////////////////////////////
//
// Broadcaster
// Broadcaster
//
Broadcaster::Broadcaster( void )
{
@@ -393,7 +419,7 @@ Broadcaster::Broadcaster( void )
Broadcaster::~Broadcaster( void )
{
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
closesocket( _so);
#else
close( _so );
@@ -402,7 +428,7 @@ Broadcaster::~Broadcaster( void )
bool Broadcaster::init( void )
{
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
WORD version = MAKEWORD(1,1);
WSADATA wsaData;
// First, we start up Winsock
@@ -420,39 +446,44 @@ bool Broadcaster::init( void )
perror( "Socket" );
return false;
}
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
const BOOL on = TRUE;
#else
int on = 1;
#endif
#if defined (WIN32) && !defined(__CYGWIN__)
setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char *) &on, sizeof(int));
int result = 0;
#if defined (_WIN32) && !defined(__CYGWIN__)
result = setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char *) &on, sizeof(int));
#else
setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
result = setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
#endif
if (result) return false;
saddr.sin_family = AF_INET;
saddr.sin_port = htons( _port );
if( _address == 0 )
{
#if defined (WIN32) && !defined(__CYGWIN__)
setsockopt( _so, SOL_SOCKET, SO_BROADCAST, (const char *) &on, sizeof(int));
#if defined (_WIN32) && !defined(__CYGWIN__)
result = setsockopt( _so, SOL_SOCKET, SO_BROADCAST, (const char *) &on, sizeof(int));
#else
setsockopt( _so, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on));
result = setsockopt( _so, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on));
#endif
if (result) return false;
#if !defined (WIN32) || defined(__CYGWIN__)
#if !defined (_WIN32) || defined(__CYGWIN__)
struct ifreq ifr;
#endif
#if defined (__linux) || defined(__CYGWIN__)
strcpy( ifr.ifr_name, "eth0" );
#elif defined(__sun)
strcpy( ifr.ifr_name, "hme0" );
#elif !defined (WIN32)
#elif !defined (_WIN32)
strcpy( ifr.ifr_name, "ef0" );
#endif
#if defined (WIN32) // get the server address
#if defined (_WIN32) // get the server address
saddr.sin_addr.s_addr = htonl(INADDR_BROADCAST);
}
#else
@@ -511,14 +542,19 @@ void Broadcaster::sync( void )
return;
}
#if defined (WIN32) && !defined(__CYGWIN__)
int result = 0;
#if defined (_WIN32) && !defined(__CYGWIN__)
unsigned int size = sizeof( SOCKADDR_IN );
sendto( _so, (const char *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
result = sendto( _so, (const char *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
// int err = WSAGetLastError ();
// int *dum = (int*) _buffer;
#else
unsigned int size = sizeof( struct sockaddr_in );
sendto( _so, (const void *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
result = sendto( _so, (const void *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
#endif
if (result)
{
OSG_NOTICE<<"Warning: sentTo(...) failed : errno="<<errno<<std::endl;
}
}

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef CLUSTER_H
@@ -18,7 +19,7 @@
#include <osgViewer/Viewer>
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(_WIN32) || defined(__CYGWIN__)
#include <netinet/in.h>
#else
#include "winsock.h"
@@ -29,28 +30,28 @@
//
// Class definition for the recipient of a broadcasted message
//
class Receiver
class Receiver
{
public :
Receiver();
~Receiver();
Receiver();
~Receiver();
// setBuffer defines the buffer into which the broadcasted
// message will be received.
void setBuffer( void *buffer, const unsigned int size );
// setBuffer defines the buffer into which the broadcasted
// message will be received.
void setBuffer( void *buffer, const unsigned int size );
// Define what port to listen and bind to
void setPort( const short port );
// Define what port to listen and bind to
void setPort( const short port );
// Sync does a blocking wait to recieve next message
void sync( void );
// Sync does a blocking wait to receive next message
void sync( void );
private :
bool init( void );
bool init( void );
private :
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
SOCKET _so;
SOCKADDR_IN saddr;
#else
@@ -68,32 +69,32 @@ class Receiver
//
// Class definition for broadcasting a buffer to a LAN
//
class Broadcaster
class Broadcaster
{
public :
Broadcaster( void );
~Broadcaster( void );
Broadcaster( void );
~Broadcaster( void );
// Set the broadcast port
void setPort( const short port );
// Set the broadcast port
void setPort( const short port );
// Set the buffer to be broadcast
void setBuffer( void *buffer, const unsigned int buffer_size );
// Set the buffer to be broadcast
void setBuffer( void *buffer, const unsigned int buffer_size );
// Set a recipient host. If this is used, the Broadcaster
// no longer broadcasts, but rather directs UDP packets at
// host.
void setHost( const char *hostname );
// Set a recipient host. If this is used, the Broadcaster
// no longer broadcasts, but rather directs UDP packets at
// host.
void setHost( const char *hostname );
// Sync broadcasts the buffer
void sync( void );
// Sync broadcasts the buffer
void sync( void );
private :
bool init( void );
bool init( void );
private :
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__)
SOCKET _so;
#else
int _so;
@@ -102,7 +103,7 @@ class Broadcaster
short _port;
void *_buffer;
unsigned int _buffer_size;
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__)
SOCKADDR_IN saddr;
#else
struct sockaddr_in saddr;
@@ -112,15 +113,15 @@ class Broadcaster
class CameraPacket {
public:
static const unsigned int MAX_NUM_EVENTS;
static const unsigned int SWAP_BYTES_COMPARE;
CameraPacket():_masterKilled(false)
CameraPacket():_masterKilled(false)
{
_byte_order = SWAP_BYTES_COMPARE;
}
void setPacket(const osg::Matrix& matrix,const osg::FrameStamp* frameStamp)
{
_matrix = matrix;
@@ -129,20 +130,20 @@ class CameraPacket {
_frameStamp = *frameStamp;
}
}
void getModelView(osg::Matrix& matrix,float angle_offset=0.0f)
{
matrix = _matrix * osg::Matrix::rotate(osg::DegreesToRadians(angle_offset),0.0f,1.0f,0.0f);
}
void readEventQueue(osgViewer::Viewer& viewer);
void writeEventQueue(osgViewer::Viewer& viewer);
void setMasterKilled(const bool flag) { _masterKilled = flag; }
const bool getMasterKilled() const { return _masterKilled; }
bool getMasterKilled() const { return _masterKilled; }
unsigned int _byte_order;
bool _masterKilled;
osg::Matrix _matrix;
@@ -150,11 +151,11 @@ class CameraPacket {
// note don't use a ref_ptr as used elsewhere for FrameStamp
// since we don't want to copy the pointer - but the memory.
// FrameStamp doesn't have a private destructor to allow
// us to do this, even though its a reference counted object.
// us to do this, even though its a reference counted object.
osg::FrameStamp _frameStamp;
osgGA::EventQueue::Events _events;
};
class DataConverter
@@ -186,22 +187,22 @@ class DataConverter
{
if (_currentPtr+1>=_endPtr) return;
*(_currentPtr++) = *(ptr);
*(_currentPtr++) = *(ptr);
}
inline void read1(char* ptr)
{
if (_currentPtr+1>=_endPtr) return;
*(ptr) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
}
inline void write2(char* ptr)
{
if (_currentPtr+2>=_endPtr) return;
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr);
}
inline void read2(char* ptr)
@@ -210,13 +211,13 @@ class DataConverter
if (_swapBytes)
{
*(ptr+1) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
*(ptr+1) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
}
else
{
*(ptr++) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
}
}
@@ -224,10 +225,10 @@ class DataConverter
{
if (_currentPtr+4>=_endPtr) return;
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr);
}
inline void read4(char* ptr)
@@ -236,17 +237,17 @@ class DataConverter
if (_swapBytes)
{
*(ptr+3) = *(_currentPtr++);
*(ptr+2) = *(_currentPtr++);
*(ptr+1) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
*(ptr+3) = *(_currentPtr++);
*(ptr+2) = *(_currentPtr++);
*(ptr+1) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
}
else
{
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
}
}
@@ -254,15 +255,15 @@ class DataConverter
{
if (_currentPtr+8>=_endPtr) return;
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr++);
*(_currentPtr++) = *(ptr);
}
inline void read8(char* ptr)
@@ -272,27 +273,27 @@ class DataConverter
if (_swapBytes)
{
*(ptr+7) = *(_currentPtr++);
*(ptr+6) = *(_currentPtr++);
*(ptr+5) = *(_currentPtr++);
*(ptr+4) = *(_currentPtr++);
*(ptr+7) = *(_currentPtr++);
*(ptr+6) = *(_currentPtr++);
*(ptr+5) = *(_currentPtr++);
*(ptr+4) = *(_currentPtr++);
*(ptr+3) = *(_currentPtr++);
*(ptr+2) = *(_currentPtr++);
*(ptr+1) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
*(ptr+3) = *(_currentPtr++);
*(ptr+2) = *(_currentPtr++);
*(ptr+1) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
}
else
{
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr++) = *(_currentPtr++);
*(ptr) = *(_currentPtr++);
}
}
@@ -305,14 +306,14 @@ class DataConverter
inline void writeFloat(float c) { write4((char*)&c); }
inline void writeDouble(double c) { write8((char*)&c); }
inline char readChar() { char c; read1(&c); return c; }
inline unsigned char readUChar() { unsigned char c; read1((char*)&c); return c; }
inline short readShort() { short c; read2((char*)&c); return c; }
inline unsigned short readUShort() { unsigned short c; read2((char*)&c); return c; }
inline int readInt() { int c; read4((char*)&c); return c; }
inline unsigned int readUInt() { unsigned int c; read4((char*)&c); return c; }
inline float readFloat() { float c; read4((char*)&c); return c; }
inline double readDouble() { double c; read8((char*)&c); return c; }
inline char readChar() { char c=0; read1(&c); return c; }
inline unsigned char readUChar() { unsigned char c=0; read1((char*)&c); return c; }
inline short readShort() { short c=0; read2((char*)&c); return c; }
inline unsigned short readUShort() { unsigned short c=0; read2((char*)&c); return c; }
inline int readInt() { int c=0; read4((char*)&c); return c; }
inline unsigned int readUInt() { unsigned int c=0; read4((char*)&c); return c; }
inline float readFloat() { float c=0.0f; read4((char*)&c); return c; }
inline double readDouble() { double c=0.0; read8((char*)&c); return c; }
void write(const osg::FrameStamp& fs);
void read(osg::FrameStamp& fs);
@@ -322,13 +323,13 @@ class DataConverter
void write(const osgGA::GUIEventAdapter& event);
void read(osgGA::GUIEventAdapter& event);
void write(CameraPacket& cameraPacket);
void read(CameraPacket& cameraPacket);
char* startPtr() { return _startPtr; }
unsigned int numBytes() { return _numBytes; }
protected:
char* _startPtr;
@@ -341,4 +342,4 @@ class DataConverter
#endif
#endif

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include "ExportHTML.h"
@@ -46,16 +47,16 @@ public:
void setSnapImageOnNextFrame(bool flag) { _snapImageOnNextFrame = flag; }
bool getSnapImageOnNextFrame() const { return _snapImageOnNextFrame; }
virtual void operator () (const osg::Camera& camera) const
{
if (!_snapImageOnNextFrame) return;
int x = static_cast<int>(camera.getViewport()->x());
int y = static_cast<int>(camera.getViewport()->y());
unsigned int width = static_cast<unsigned int>(camera.getViewport()->width());
unsigned int height = static_cast<unsigned int>(camera.getViewport()->height());
osg::ref_ptr<osg::Image> image = new osg::Image;
image->readPixels(x,y,width,height,
GL_RGB,GL_UNSIGNED_BYTE);
@@ -64,16 +65,16 @@ public:
{
osg::notify(osg::NOTICE) << "Saved screen image to `"<<_filename<<"`"<< std::endl;
}
_snapImageOnNextFrame = false;
}
protected:
std::string _filename;
mutable bool _snapImageOnNextFrame;
};
std::string ExportHTML::createFileName(const std::string& basename, unsigned int page, const std::string& ext)
@@ -102,7 +103,7 @@ bool ExportHTML::write(osgPresentation::SlideEventHandler* seh, osgViewer::Viewe
image_basename = osgDB::getNameLessExtension(filename);
image_ext = ".jpg";
}
std::cout<<"Writing slides to "<<image_basename<<"_[slidenumber]"<<image_ext<<std::endl;
osg::ref_ptr<SnapImageDrawCallback> sidc = new SnapImageDrawCallback;
@@ -169,7 +170,7 @@ bool ExportHTML::write(osgPresentation::SlideEventHandler* seh, osgViewer::Viewe
}
fout<<"</tr>"<<std::endl;
fout<<"</table>"<<std::endl;
fout<<"<img src=\""<<osgDB::getSimpleFileName(os.str())<<"\">"<<std::endl;
fout<<"<img src=\""<<osgDB::getSimpleFileName(os.str())<<"\">"<<std::endl;
fout<<"</html>"<<std::endl;
}
else

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef EXPORTHTML_H

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include "PointsEventHandler.h"
@@ -54,11 +55,6 @@ bool PointsEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActio
return false;
}
void PointsEventHandler::accept(osgGA::GUIEventHandlerVisitor& v)
{
v.visit(*this);
}
void PointsEventHandler::getUsage(osg::ApplicationUsage& usage) const
{
usage.addKeyboardMouseBinding("+","Increase point size");

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef POINTSEVENTHANDLER
@@ -22,25 +23,23 @@ class PointsEventHandler : public osgGA::GUIEventHandler
{
public:
PointsEventHandler();
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&);
virtual void accept(osgGA::GUIEventHandlerVisitor& v);
void getUsage(osg::ApplicationUsage& usage) const;
void setStateSet(osg::StateSet* stateset) { _stateset=stateset; }
osg::StateSet* getStateSet() { return _stateset.get(); }
const osg::StateSet* getStateSet() const { return _stateset.get(); }
void setPointSize(float psize);
float getPointSize() const;
void changePointSize(float delta);
void changePointAttenuation(float scale);
osg::ref_ptr<osg::StateSet> _stateset;

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include "ReadShowFile.h"
@@ -35,7 +36,7 @@ class AddVolumeEditingCallbackVisitor : public osg::NodeVisitor
public:
AddVolumeEditingCallbackVisitor():
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
void apply(osg::Group& group)
{
osgVolume::VolumeTile* volumeTile = dynamic_cast<osgVolume::VolumeTile*>(&group);
@@ -51,7 +52,7 @@ public:
traverse(group);
}
}
};
bool p3d::getFileNames(osg::ArgumentParser& arguments, FileNameList& xmlFiles, FileNameList& normalFiles)
@@ -62,7 +63,7 @@ bool p3d::getFileNames(osg::ArgumentParser& arguments, FileNameList& xmlFiles, F
if (!arguments.isOption(pos))
{
std::string ext = osgDB::getFileExtension(arguments[pos]);
if (osgDB::equalCaseInsensitive(ext,"xml") || osgDB::equalCaseInsensitive(ext,"p3d"))
if (osgDB::equalCaseInsensitive(ext,"xml") || osgDB::equalCaseInsensitive(ext,"p3d"))
{
xmlFiles.push_back(arguments[pos]);
}
@@ -73,7 +74,7 @@ bool p3d::getFileNames(osg::ArgumentParser& arguments, FileNameList& xmlFiles, F
}
}
return (!xmlFiles.empty() || !normalFiles.empty());
}
}
bool p3d::readEnvVars(osg::ArgumentParser& arguments)
{
@@ -94,23 +95,23 @@ bool p3d::readEnvVars(osg::ArgumentParser& arguments)
{
osgDB::getDataFilePathList().push_front(path);
}
if (p3d::readEnvVars(file)) readVars = true;
}
}
}
}
return readVars;
}
bool p3d::readEnvVars(const std::string& fileName)
{
std::string ext = osgDB::getFileExtension(fileName);
if (!osgDB::equalCaseInsensitive(ext,"xml") &&
if (!osgDB::equalCaseInsensitive(ext,"xml") &&
!osgDB::equalCaseInsensitive(ext,"p3d")) return false;
osg::ref_ptr<osgDB::XmlNode> doc = new osgDB::XmlNode;
osgDB::XmlNode* root = 0;
@@ -146,7 +147,7 @@ bool p3d::readEnvVars(const std::string& fileName)
}
bool readVars = false;
for(osgDB::XmlNode::Children::iterator itr = root->children.begin();
itr != root->children.end();
++itr)
@@ -182,7 +183,7 @@ osgDB::Options* createOptions(const osgDB::ReaderWriter::Options* options)
osg::ref_ptr<osg::Node> p3d::readHoldingSlide(const std::string& filename)
{
std::string ext = osgDB::getFileExtension(filename);
if (!osgDB::equalCaseInsensitive(ext,"xml") &&
if (!osgDB::equalCaseInsensitive(ext,"xml") &&
!osgDB::equalCaseInsensitive(ext,"p3d")) return 0;
osg::ref_ptr<osgDB::ReaderWriter::Options> options = createOptions(0);
@@ -215,24 +216,24 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
std::string filename;
while (arguments.read("--image",filename))
{
osg::ref_ptr<osg::Image> image = readImageFile(filename.c_str(), local_options.get());
if (image.valid()) nodeList.push_back(osg::createGeodeForImage(image.get()));
osg::ref_ptr<osg::Image> image = readRefImageFile(filename.c_str(), local_options.get());
if (image.valid()) nodeList.push_back(osg::createGeodeForImage(image));
}
while (arguments.read("--movie",filename))
{
osg::ref_ptr<osg::Image> image = readImageFile(filename.c_str(), local_options.get());
osg::ref_ptr<osg::ImageStream> imageStream = dynamic_cast<osg::ImageStream*>(image.get());
if (image.valid())
osg::ref_ptr<osg::Image> image = readRefImageFile(filename.c_str(), local_options.get());
osg::ImageStream* imageStream = dynamic_cast<osg::ImageStream*>(image.get());
if (imageStream)
{
imageStream->play();
nodeList.push_back(osg::createGeodeForImage(imageStream.get()));
nodeList.push_back(osg::createGeodeForImage(imageStream));
}
}
while (arguments.read("--dem",filename))
{
osg::HeightField* hf = readHeightFieldFile(filename.c_str(), local_options.get());
osg::ref_ptr<osg::HeightField> hf = readRefHeightFieldFile(filename.c_str(), local_options.get());
if (hf)
{
osg::Geode* geode = new osg::Geode;
@@ -247,7 +248,7 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
if (!arguments.isOption(pos))
{
// not an option so assume string is a filename.
osg::Node *node = osgDB::readNodeFile( arguments[pos], local_options.get());
osg::ref_ptr<osg::Node> node = osgDB::readRefNodeFile( arguments[pos], local_options.get());
if(node)
{
@@ -256,16 +257,16 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
nodeList.push_back(node);
// make sure that this presentation isn't cached
osgDB::Registry::instance()->removeFromObjectCache( arguments[pos] );
osgDB::Registry::instance()->removeFromObjectCache( arguments[pos], local_options.get());
}
}
}
if (nodeList.empty())
{
return NULL;
}
osg::ref_ptr<osg::Node> root;
if (nodeList.size()==1)
@@ -274,7 +275,7 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
}
else // size >1
{
osg::Switch* sw = new osg::Switch;
for(NodeList::iterator itr=nodeList.begin();
itr!=nodeList.end();
@@ -283,7 +284,7 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
sw->addChild((*itr).get());
}
sw->setSingleChildOn(0);
sw->setEventCallback(new p3d::ShowEventHandler());
root = sw;
@@ -292,7 +293,7 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
if (root.valid())
{
osg::notify(osg::INFO)<<"Got node now adding callback"<<std::endl;
AddVolumeEditingCallbackVisitor avecv;
root->accept(avecv);
}

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef P3D_READFILE

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include <osgViewer/Viewer>
@@ -33,7 +34,7 @@ SDLIntegration::SDLIntegration()
atexit(SDL_Quit);
int numJoysticks = SDL_NumJoysticks();
if (_verbose)
{
std::cout<<"number of joysticks "<<numJoysticks<<std::endl;
@@ -42,9 +43,9 @@ SDLIntegration::SDLIntegration()
std::cout<<"Joystick name '"<<SDL_JoystickName(i)<<"'"<<std::endl;
}
}
_joystick = numJoysticks>0 ? SDL_JoystickOpen(0) : 0;
_numAxes = _joystick ? SDL_JoystickNumAxes(_joystick) : 0;
_numBalls = _joystick ? SDL_JoystickNumBalls(_joystick) : 0;
_numHats = _joystick ? SDL_JoystickNumHats(_joystick) : 0;
@@ -57,13 +58,13 @@ SDLIntegration::SDLIntegration()
std::cout<<"numHats = "<<_numHats<<std::endl;
std::cout<<"numButtons = "<<_numButtons<<std::endl;
}
addMouseButtonMapping(4, 1); // left
addMouseButtonMapping(5, 3); // right
addMouseButtonMapping(6, 2); // middle
addKeyMapping(10, ' '); // R2
addKeyMapping(0, '1'); // 1
addKeyMapping(1, '2'); // 2
addKeyMapping(2, '3'); // 3
@@ -88,7 +89,7 @@ void SDLIntegration::capture(ValueList& axisValues, ValueList& buttonValues) con
if (_joystick)
{
SDL_JoystickUpdate();
axisValues.resize(_numAxes);
for(int ai=0; ai<_numAxes; ++ai)
{
@@ -107,21 +108,21 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
{
if (_joystick)
{
ValueList newAxisValues;
ValueList newButtonValues;
capture(newAxisValues, newButtonValues);
unsigned int mouseXaxis = 0;
unsigned int mouseYaxis = 1;
float prev_mx = (float)_axisValues[mouseXaxis]/32767.0f;
float prev_my = -(float)_axisValues[mouseYaxis]/32767.0f;
float mx = (float)newAxisValues[mouseXaxis]/32767.0f;
float my = -(float)newAxisValues[mouseYaxis]/32767.0f;
osgGA::EventQueue* eq = viewer.getEventQueue();
double time = eq ? eq->getTime() : 0.0;
@@ -145,7 +146,7 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
}
}
}
for(int bi=0; bi<_numButtons; ++bi)
{
if (newButtonValues[bi]!=_buttonValues[bi])
@@ -171,11 +172,11 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
}
}
}
_axisValues.swap(newAxisValues);
_buttonValues.swap(newButtonValues);
}
}

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef SDLINTEGRATION
@@ -31,12 +32,12 @@ class SDLIntegration
typedef std::map<int, int> ButtonMap;
void update(osgViewer::Viewer& viewer);
void addMouseButtonMapping(int joystickButton, int mouseButton)
{
_mouseButtonMap[joystickButton] = mouseButton;
}
int getMouseButtonMapping(int joystickButton)
{
ButtonMap::const_iterator itr = _mouseButtonMap.find(joystickButton);
@@ -48,16 +49,16 @@ class SDLIntegration
{
_keyMap[joystickButton] = key;
}
int getKeyMapping(int joystickButton)
{
ButtonMap::const_iterator itr = _keyMap.find(joystickButton);
if (itr != _keyMap.end()) return itr->second;
else return -1;
}
protected:
void capture(ValueList& axisValues, ValueList& buttonValues) const;
SDL_Joystick* _joystick;
@@ -66,7 +67,7 @@ class SDLIntegration
int _numHats;
int _numButtons;
bool _verbose;
ValueList _axisValues;
ValueList _buttonValues;
ButtonMap _mouseButtonMap;

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include "ShowEventHandler.h"
@@ -28,13 +29,13 @@ bool ShowEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
case(osgGA::GUIEventAdapter::KEYUP):
{
osg::notify(osg::INFO)<<"ShowEventHandler KEYUP "<<(int)ea.getKey()<<std::endl;
if (ea.getKey()>=osgGA::GUIEventAdapter::KEY_F1 &&
if (ea.getKey()>=osgGA::GUIEventAdapter::KEY_F1 &&
ea.getKey()<=osgGA::GUIEventAdapter::KEY_F8)
{
unsigned int child = ea.getKey()-osgGA::GUIEventAdapter::KEY_F1;
osg::notify(osg::INFO)<<" Select "<<child<<std::endl;
osg::Switch* showSwitch = dynamic_cast<osg::Switch*>(object);
if (showSwitch)
if (showSwitch)
{
if (child<showSwitch->getNumChildren())
{
@@ -52,12 +53,6 @@ bool ShowEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
return false;
}
void ShowEventHandler::accept(osgGA::GUIEventHandlerVisitor& v)
{
v.visit(*this);
}
void ShowEventHandler::getUsage(osg::ApplicationUsage& /*usage*/) const
{
}

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef SHOWEVENTHANDLER
@@ -28,11 +29,9 @@ class ShowEventHandler : public osgGA::GUIEventHandler
ShowEventHandler();
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv);
virtual void accept(osgGA::GUIEventHandlerVisitor& v);
virtual void getUsage(osg::ApplicationUsage& usage) const;
};
}

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#include <osgDB/FileNameUtils>
@@ -86,7 +87,7 @@ bool SpellChecker::isCorrect(const std::string& word) const
return true;
}
SpellChecker::WordList SpellChecker::suggest(const std::string& word) const
SpellChecker::WordList SpellChecker::suggest(const std::string& /*word*/) const
{
return WordList();
}

View File

@@ -1,13 +1,14 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This software is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* OpenSceneGraph Public License for more details.
*/
#ifndef SPELLCHCKER_H

View File

@@ -1,17 +1,17 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
* This software is distributed in the hope that it will be useful,
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include <osg/Geometry>
#include <osg/CameraNode>
#include <osg/Texture2D>
#include <osg/AutoTransform>
#include <osg/Notify>
@@ -37,9 +37,10 @@
#include <osgGA/TerrainManipulator>
#include <osgGA/AnimationPathManipulator>
#include <osgGA/StateSetManipulator>
#include <osgGA/MultiTouchTrackballManipulator>
#include <osgPresentation/SlideEventHandler>
#include <osgPresentation/SlideShowConstructor>
#include <osgPresentation/Cursor>
#include "ReadShowFile.h"
#include "PointsEventHandler.h"
@@ -51,6 +52,7 @@
#include <fstream>
#include <iostream>
#include <string.h>
#ifdef USE_SDL
@@ -129,148 +131,103 @@ void setViewer(osgViewer::Viewer& viewer, float width, float height, float dista
viewer.getCamera()->setProjectionMatrixAsPerspective( vfov, width/height, 0.1, 1000.0);
OSG_NOTICE<<"setProjectionMatrixAsPerspective( "<<vfov<<", "<<width/height<<", "<<0.1<<", "<<1000.0<<");"<<std::endl;
OSG_INFO<<"setProjectionMatrixAsPerspective( "<<vfov<<", "<<width/height<<", "<<0.1<<", "<<1000.0<<");"<<std::endl;
}
class ForwardToDeviceEventHandler : public osgGA::GUIEventHandler {
public:
ForwardToDeviceEventHandler(osgGA::Device* device) : osgGA::GUIEventHandler(), _device(device) {}
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *)
ForwardToDeviceEventHandler(osgGA::Device* device, bool format_mouse_events) : osgGA::GUIEventHandler(), _device(device), _forwardMouseEvents(format_mouse_events) {}
virtual bool handle (const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /*aa*/, osg::Object *, osg::NodeVisitor *)
{
OSG_INFO<<"ForwardToDeviceEventHandler::setEvent("<<ea.getKey()<<")"<<std::endl;
_device->sendEvent(ea);
switch (ea.getEventType())
{
case osgGA::GUIEventAdapter::PUSH:
case osgGA::GUIEventAdapter::RELEASE:
case osgGA::GUIEventAdapter::MOVE:
case osgGA::GUIEventAdapter::DRAG:
case osgGA::GUIEventAdapter::SCROLL:
if (_forwardMouseEvents)
_device->sendEvent(ea);
break;
default:
_device->sendEvent(ea);
break;
}
return false;
}
private:
osg::ref_ptr<osgGA::Device> _device;
};
class FollowMouseCallback: public osgGA::GUIEventHandler
{
public:
FollowMouseCallback():
_mousePostition(0.5,0.5) {}
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv)
bool handle(osgGA::Event* event, osg::Object* object, osg::NodeVisitor* nv)
{
if (event->asGUIEventAdapter())
return osgGA::GUIEventHandler::handle(event, object, nv);
else
{
osg::AutoTransform* transform = dynamic_cast<osg::AutoTransform*>(object);
if (!transform) return false;
osg::NotifySeverity level = osg::INFO;
switch(ea.getEventType())
{
case(osgGA::GUIEventAdapter::PUSH):
case(osgGA::GUIEventAdapter::RELEASE):
case(osgGA::GUIEventAdapter::MOVE):
case(osgGA::GUIEventAdapter::DRAG):
osg::notify(level)<<std::endl<<"ea.getGraphicsContext()="<<ea.getGraphicsContext()<<std::endl;
osg::notify(level)<<"ea.getWindowWidth()="<<ea.getWindowWidth()<<std::endl;
osg::notify(level)<<"ea.getWindowHeight()="<<ea.getWindowHeight()<<std::endl;
osg::notify(level)<<"ea.getX()="<<ea.getX()<<std::endl;
osg::notify(level)<<"ea.getXin()="<<ea.getXmin()<<std::endl;
osg::notify(level)<<"ea.getXmax()="<<ea.getXmax()<<std::endl;
osg::notify(level)<<"ea.getY()="<<ea.getY()<<std::endl;
osg::notify(level)<<"ea.getYin()="<<ea.getYmin()<<std::endl;
osg::notify(level)<<"ea.getYmax()="<<ea.getYmax()<<std::endl;
_mousePostition.set(ea.getXnormalized(), ea.getYnormalized());
break;
case(osgGA::GUIEventAdapter::FRAME):
{
osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa);
osg::Camera* camera = view->getCamera();
osg::Matrix VP = camera->getViewMatrix() * camera->getProjectionMatrix();
osg::Matrix inverse_VP;
inverse_VP.invert(VP);
osg::Vec3d start_eye(_mousePostition.x(), _mousePostition.y(), 0.0);
osg::Vec3d end_eye(_mousePostition.x(), _mousePostition.y(), 1.0);
osg::Vec3d start_world = start_eye * inverse_VP;
osg::Vec3d end_world = start_eye * inverse_VP;
osg::notify(level)<<"start_world="<<start_world<<std::endl;
osg::notify(level)<<"end_world="<<end_world<<std::endl;
if (end_world.valid()) transform->setPosition(end_world);
else
{
OSG_NOTICE<<"Ignoring invalid end_world position"<<std::endl;
}
break;
}
case(osgGA::GUIEventAdapter::KEYDOWN):
{
if (ea.getKey()=='c')
{
for(unsigned int i=0; i< transform->getNumChildren(); ++i)
{
osg::Node* node = transform->getChild(i);
node->setNodeMask(
node->getNodeMask()!=0 ?
0 :
0xffffff);
}
}
break;
}
default:
break;
}
_device->sendEvent(*event);
return false;
}
virtual void accept(osgGA::GUIEventHandlerVisitor& v)
{
v.visit(*this);
}
osg::Vec2d _mousePostition;
};
osg::Node* createCursorSubgraph(const std::string& filename, float size)
{
osg::Geode* geode = new osg::Geode;
size = 20.0f;
osg::Geometry* geom = osg::createTexturedQuadGeometry(osg::Vec3(-size*0.5f,-size*0.5f,0.0f),osg::Vec3(size,0.0f,0.0f),osg::Vec3(0.0f,size,0.0f));
geom->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
osg::Image* image = osgDB::readImageFile(osgDB::findDataFile(filename));
if (image)
{
osg::StateSet* stateset = geom->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, new osg::Texture2D(image),osg::StateAttribute::ON|osg::StateAttribute::PROTECTED);
stateset->setMode(GL_BLEND,osg::StateAttribute::ON|osg::StateAttribute::PROTECTED);
// stateset->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF);
stateset->setRenderBinDetails(1000, "DepthSortedBin");
}
geode->addDrawable(geom);
osg::AutoTransform* transform = new osg::AutoTransform;
transform->setAutoRotateMode(osg::AutoTransform::ROTATE_TO_CAMERA);
transform->setAutoScaleToScreen(true);
private:
osg::ref_ptr<osgGA::Device> _device;
bool _forwardMouseEvents;
};
transform->addChild(geode);
transform->setEventCallback(new FollowMouseCallback());
class DumpEventHandler : public osgGA::GUIEventHandler {
public:
DumpEventHandler() : osgGA::GUIEventHandler() {}
return transform;
virtual bool handle (const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /*aa*/, osg::Object *, osg::NodeVisitor *)
{
switch (ea.getEventType())
{
case osgGA::GUIEventAdapter::FRAME:
return false;
break;
case osgGA::GUIEventAdapter::PUSH:
std::cout << "PUSH: ";
break;
case osgGA::GUIEventAdapter::RELEASE:
std::cout << "RELEASE: ";
break;
case osgGA::GUIEventAdapter::MOVE:
std::cout << "MOVE: ";
break;
case osgGA::GUIEventAdapter::DRAG:
std::cout << "DRAG: ";
break;
case osgGA::GUIEventAdapter::SCROLL:
std::cout << "SCROLL: ";
break;
break;
default:
std::cout << ea.getEventType() << " ";
break;
}
std::cout << ea.getX() << "/" << ea.getY() << " " << ea.isMultiTouchEvent() << std::endl;
return false;
}
bool handle(osgGA::Event* event, osg::Object* object, osg::NodeVisitor* nv)
{
if (event->asGUIEventAdapter())
return osgGA::GUIEventHandler::handle(event, object, nv);
else
{
return false;
}
}
private:
};
}
enum P3DApplicationType
@@ -284,7 +241,7 @@ enum P3DApplicationType
void processLoadedModel(osg::ref_ptr<osg::Node>& loadedModel, int optimizer_options, const std::string& cursorFileName)
{
if (!loadedModel) return;
#if !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
// add back in enabling of the GL_ALPHA_TEST to get around the core OSG no longer setting it by default for opaque bins.
@@ -292,7 +249,7 @@ void processLoadedModel(osg::ref_ptr<osg::Node>& loadedModel, int optimizer_opti
loadedModel->getOrCreateStateSet()->setMode(GL_ALPHA_TEST, osg::StateAttribute::ON);
#endif
// optimize the scene graph, remove rendundent nodes and state etc.
// optimize the scene graph, remove redundant nodes and state etc.
osgUtil::Optimizer optimizer;
optimizer.optimize(loadedModel.get(), optimizer_options);
@@ -300,21 +257,24 @@ void processLoadedModel(osg::ref_ptr<osg::Node>& loadedModel, int optimizer_opti
{
osg::ref_ptr<osg::Group> group = new osg::Group;
group->addChild(loadedModel.get());
group->addChild(createCursorSubgraph(cursorFileName, 0.05f));
OSG_NOTICE<<"Creating Cursor"<<std::endl;
group->addChild(new osgPresentation::Cursor(cursorFileName, 20.0f));
loadedModel = group;
}
}
void addDeviceTo(osgViewer::Viewer& viewer, const std::string& device_name)
void addDeviceTo(osgViewer::Viewer& viewer, const std::string& device_name, bool forward_mouse_events)
{
osg::ref_ptr<osgGA::Device> dev = osgDB::readFile<osgGA::Device>(device_name);
osg::ref_ptr<osgGA::Device> dev = osgDB::readRefFile<osgGA::Device>(device_name);
if (dev.valid())
{
OSG_INFO << "Adding Device : " << device_name << std::endl;
viewer.addDevice(dev.get());
if (dev->getCapabilities() & osgGA::Device::SEND_EVENTS)
viewer.getEventHandlers().push_front(new ForwardToDeviceEventHandler(dev.get()));
if ((dev->getCapabilities() & osgGA::Device::SEND_EVENTS))
viewer.getEventHandlers().push_front(new ForwardToDeviceEventHandler(dev.get(), forward_mouse_events));
}
else
{
@@ -327,7 +287,7 @@ int main( int argc, char **argv )
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the application for presenting 3D interactive slide shows.");
@@ -348,6 +308,8 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->addCommandLineOption("--html <filename>","Print out slides to a series of html & image files.");
arguments.getApplicationUsage()->addCommandLineOption("--loop","Switch on looping of presentation.");
arguments.getApplicationUsage()->addCommandLineOption("--devices","Print the Video input capability via QuickTime and exit.");
arguments.getApplicationUsage()->addCommandLineOption("--forwardMouseEvents","forward also mouse/touch-events to the devices");
arguments.getApplicationUsage()->addCommandLineOption("--suppressEnvTags", "suppresses all found ENV-tags in the presentation");
// add alias from xml to p3d to provide backwards compatibility for old p3d files.
osgDB::Registry::instance()->addFileExtensionAlias("xml","p3d");
@@ -356,14 +318,17 @@ int main( int argc, char **argv )
if (arguments.read("-devices") || arguments.read("--devices"))
{
// Force load QuickTime plugin, probe video capability, exit
osgDB::readImageFile("devices.live");
osgDB::readRefImageFile("devices.live");
return 1;
}
bool suppress_env_tags = false;
if (arguments.read("--suppressEnvTags"))
suppress_env_tags = true;
// read any env vars from presentations before we create viewer to make sure the viewer
// utilises these env vars
if (p3d::readEnvVars(arguments))
if (!suppress_env_tags && p3d::readEnvVars(arguments))
{
osg::DisplaySettings::instance()->readEnvironmentalVariables();
}
@@ -372,24 +337,20 @@ int main( int argc, char **argv )
std::string url, username, password;
while(arguments.read("--login",url, username, password))
{
if (!osgDB::Registry::instance()->getAuthenticationMap())
{
osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(
url,
new osgDB::AuthenticationDetails(username, password)
);
}
osgDB::Registry::instance()->getOrCreateAuthenticationMap()->addAuthenticationDetails(
url,
new osgDB::AuthenticationDetails(username, password)
);
}
#ifdef USE_SDL
SDLIntegration sdlIntegration;
osg::notify(osg::INFO)<<"USE_SDL"<<std::endl;
#endif
#endif
bool doSetViewer = true;
std::string configurationFile;
@@ -402,7 +363,7 @@ int main( int argc, char **argv )
while (arguments.read("-c",configurationFile)) {}
osg::Vec4 clearColor(0.0f,0.0f,0.0f,0.0f);
while (arguments.read("--clear-color",clearColor[0],clearColor[1],clearColor[2],clearColor[3])) {}
std::string filename;
@@ -441,7 +402,7 @@ int main( int argc, char **argv )
// construct the viewer.
osgViewer::Viewer viewer(arguments);
// set clear colour to black by default.
viewer.getCamera()->setClearColor(clearColor);
@@ -451,6 +412,10 @@ int main( int argc, char **argv )
doSetViewer = false;
}
bool forwardMouseEvents = false;
if (arguments.read("--forwardMouseEvents"))
forwardMouseEvents = true;
const char* p3dDevice = getenv("P3D_DEVICE");
if (p3dDevice)
{
@@ -458,7 +423,7 @@ int main( int argc, char **argv )
osgDB::split(p3dDevice, devices);
for(osgDB::StringList::iterator i = devices.begin(); i != devices.end(); ++i)
{
addDeviceTo(viewer, *i);
addDeviceTo(viewer, *i, forwardMouseEvents);
}
}
@@ -466,13 +431,13 @@ int main( int argc, char **argv )
std::string device;
while (arguments.read("--device", device))
{
addDeviceTo(viewer, device);
addDeviceTo(viewer, device, forwardMouseEvents);
}
if (arguments.read("--http-control"))
{
std::string server_address = "localhost";
std::string server_port = "8080";
std::string document_root = "htdocs";
@@ -483,23 +448,33 @@ int main( int argc, char **argv )
osg::ref_ptr<osgDB::Options> device_options = new osgDB::Options("documentRegisteredHandlers");
osg::ref_ptr<osgGA::Device> rest_http_device = osgDB::readFile<osgGA::Device>(server_address+":"+server_port+"/"+document_root+".resthttp", device_options.get());
osg::ref_ptr<osgGA::Device> rest_http_device = osgDB::readRefFile<osgGA::Device>(server_address+":"+server_port+"/"+document_root+".resthttp", device_options.get());
if (rest_http_device.valid())
{
viewer.addDevice(rest_http_device.get());
}
}
// set up stereo masks
viewer.getCamera()->setCullMask(0xffffffff);
viewer.getCamera()->setCullMaskLeft(0x00000001);
viewer.getCamera()->setCullMaskRight(0x00000002);
viewer.getCamera()->setCullMaskRight(0x00000002);
bool assignLeftCullMaskForMono = true;
if (assignLeftCullMaskForMono)
{
viewer.getCamera()->setCullMask(viewer.getCamera()->getCullMaskLeft());
}
else
{
viewer.getCamera()->setCullMask(0xffffffff);
}
// set up the camera manipulators.
{
osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;
keyswitchManipulator->addMatrixManipulator( '1', "Trackball", new osgGA::TrackballManipulator() );
keyswitchManipulator->addMatrixManipulator( '1', "Trackball", new osgGA::MultiTouchTrackballManipulator() );
keyswitchManipulator->addMatrixManipulator( '2', "Flight", new osgGA::FlightManipulator() );
keyswitchManipulator->addMatrixManipulator( '3', "Drive", new osgGA::DriveManipulator() );
keyswitchManipulator->addMatrixManipulator( '4', "Terrain", new osgGA::TerrainManipulator() );
@@ -509,7 +484,7 @@ int main( int argc, char **argv )
while (arguments.read("-p",pathfile))
{
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
if (apm || !apm->valid())
if (apm && !apm->getAnimationPath()->empty())
{
unsigned int num = keyswitchManipulator->getNumMatrixManipulators();
keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
@@ -521,6 +496,8 @@ int main( int argc, char **argv )
viewer.setCameraManipulator( keyswitchManipulator.get() );
}
//viewer.getEventHandlers().push_front(new DumpEventHandler());
// add the state manipulator
osg::ref_ptr<osgGA::StateSetManipulator> ssManipulator = new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet());
ssManipulator->setKeyEventToggleTexturing('e');
@@ -531,7 +508,7 @@ int main( int argc, char **argv )
viewer.addEventHandler( new osgViewer::WindowSizeHandler() );
// neeed to address.
// need to address.
// viewer.getScene()->getUpdateVisitor()->setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);
@@ -547,12 +524,12 @@ int main( int argc, char **argv )
bool hideCursor = (showCursor=="No" || showCursor=="NO" || showCursor=="no");
while (arguments.read("--set-viewer")) { doSetViewer = true; }
while (arguments.read("--no-set-viewer")) { doSetViewer = false; }
// if we want to hide the cursor override the custom cursor.
if (hideCursor) cursorFileName.clear();
// cluster related entries.
int socketNumber=8100;
@@ -581,7 +558,7 @@ int main( int argc, char **argv )
while (arguments.read("--loop")) loopPresentation = true;
{
// set update hte default traversal mode settings for update visitor
// set update the default traversal mode settings for update visitor
// default to osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN.
osg::NodeVisitor::TraversalMode updateTraversalMode = osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN; // viewer.getUpdateVisitor()->getTraversalMode();
@@ -599,7 +576,7 @@ int main( int argc, char **argv )
viewer.getUpdateVisitor()->setTraversalMode(updateTraversalMode);
}
// register the slide event handler - which moves the presentation from slide to slide, layer to layer.
osg::ref_ptr<osgPresentation::SlideEventHandler> seh = new osgPresentation::SlideEventHandler(&viewer);
viewer.addEventHandler(seh.get());
@@ -619,19 +596,19 @@ int main( int argc, char **argv )
// set up optimizer options
unsigned int optimizer_options = osgUtil::Optimizer::DEFAULT_OPTIMIZATIONS;
bool relase_and_compile = false;
while (arguments.read("--release-and-compile"))
bool release_and_compile = false;
while (arguments.read("--release-and-compile"))
{
relase_and_compile = true;
release_and_compile = true;
}
seh->setReleaseAndCompileOnEachNewSlide(relase_and_compile);
if (relase_and_compile)
seh->setReleaseAndCompileOnEachNewSlide(release_and_compile);
if (release_and_compile)
{
// make sure that imagery stays around after being applied to textures.
viewer.getDatabasePager()->setUnrefImageDataAfterApplyPolicy(true,false);
optimizer_options &= ~osgUtil::Optimizer::OPTIMIZE_TEXTURE_SETTINGS;
}
//
//
// osgDB::Registry::instance()->getOrCreateDatabasePager()->setUnrefImageDataAfterApplyPolicy(true,false);
// optimizer_options &= ~osgUtil::Optimizer::OPTIMIZE_TEXTURE_SETTINGS;
// osg::Texture::getTextureObjectManager()->setExpiryDelay(0.0f);
@@ -657,7 +634,7 @@ int main( int argc, char **argv )
float width = osg::DisplaySettings::instance()->getScreenWidth();
float height = osg::DisplaySettings::instance()->getScreenHeight();
float distance = osg::DisplaySettings::instance()->getScreenDistance();
while (arguments.read("-s", width, height, distance))
while (arguments.read("-s", width, height, distance))
{
osg::DisplaySettings::instance()->setScreenDistance(distance);
osg::DisplaySettings::instance()->setScreenHeight(height);
@@ -672,9 +649,10 @@ int main( int argc, char **argv )
viewer.getUsage(*arguments.getApplicationUsage());
// if user request help write it out to cout.
if (arguments.read("-h") || arguments.read("--help"))
unsigned int helpType = 0;
if ((helpType = arguments.readHelpType()))
{
arguments.getApplicationUsage()->write(osg::notify(osg::NOTICE));
arguments.getApplicationUsage()->write(std::cout, helpType);
return 1;
}
@@ -687,11 +665,11 @@ int main( int argc, char **argv )
else if (strcmp(str,"master")==0) P3DApplicationType = MASTER;
else if (strcmp(str,"slave")==0) P3DApplicationType = SLAVE;
}
while (arguments.read("--viewer")) { P3DApplicationType = VIEWER; }
while (arguments.read("--master")) { P3DApplicationType = MASTER; }
while (arguments.read("--slave")) { P3DApplicationType = SLAVE; }
while (arguments.read("--version"))
{
std::string appTypeName = "invalid";
@@ -712,7 +690,7 @@ int main( int argc, char **argv )
// any option left unread are converted into errors to write out later.
//arguments.reportRemainingOptionsAsUnrecognized();
// report any errors if they have ocured when parsing the program aguments.
// report any errors if they have ocured when parsing the program arguments.
if (arguments.errors())
{
arguments.writeErrorMessages(osg::notify(osg::INFO));
@@ -769,6 +747,9 @@ int main( int argc, char **argv )
osg::ref_ptr<osgDB::ReaderWriter::Options> cacheAllOption = new osgDB::ReaderWriter::Options;
if(suppress_env_tags)
cacheAllOption->setPluginStringData("suppressEnvTags", "true");
cacheAllOption->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL);
osgDB::Registry::instance()->setOptions(cacheAllOption.get());
@@ -780,7 +761,7 @@ int main( int argc, char **argv )
// if no model has been successfully loaded report failure.
if (!loadedModel)
if (!loadedModel)
{
osg::notify(osg::INFO) << arguments.getApplicationName() <<": No data loaded" << std::endl;
return 1;
@@ -796,12 +777,12 @@ int main( int argc, char **argv )
for(unsigned int i=0; i<loadedModel->getNumDescriptions(); ++i)
{
const std::string& desc = loadedModel->getDescription(i);
if (desc=="loop")
if (desc=="loop")
{
osg::notify(osg::NOTICE)<<"Enabling looping"<<std::endl;
seh->setLoopPresentation(true);
}
else if (desc=="auto")
else if (desc=="auto")
{
osg::notify(osg::NOTICE)<<"Enabling auto run"<<std::endl;
seh->setAutoSteppingActive(true);
@@ -830,7 +811,7 @@ int main( int argc, char **argv )
}
// pass the model to the slide event handler so it knows which to manipulate.
seh->set(loadedModel.get());
@@ -843,7 +824,7 @@ int main( int argc, char **argv )
osgDB::writeNodeFile(*loadedModel,outputFileName);
return 0;
}
if (!cursorFileName.empty() || hideCursor)
{
@@ -863,12 +844,11 @@ int main( int argc, char **argv )
}
}
osg::Timer_t startOfFrameTick = osg::Timer::instance()->tick();
double targetFrameTime = 1.0/targetFrameRate;
if (exportName.empty())
{
// objects for managing the broadcasting and recieving of camera packets.
// objects for managing the broadcasting and receiving of camera packets.
CameraPacket cp;
Broadcaster bc;
Receiver rc;
@@ -880,123 +860,124 @@ int main( int argc, char **argv )
while( !viewer.done() && !masterKilled)
{
// wait for all cull and draw threads to complete.
viewer.advance();
osg::Timer_t startFrameTick = osg::Timer::instance()->tick();
osg::Timer_t currentTick = osg::Timer::instance()->tick();
double deltaTime = osg::Timer::instance()->delta_s(startOfFrameTick, currentTick);
if (deltaTime<targetFrameTime)
if (viewer.getRunFrameScheme()!=osgViewer::ViewerBase::ON_DEMAND || seh->checkNeedToDoFrame())
{
OpenThreads::Thread::microSleep(static_cast<unsigned int>((targetFrameTime-deltaTime)*1000000.0));
}
// do the normal frame.
startOfFrameTick = osg::Timer::instance()->tick();
// wait for all cull and draw threads to complete.
viewer.advance();
#if 0
if (kmcb)
{
double time = kmcb->getTime();
viewer.getFrameStamp()->setReferenceTime(time);
}
#endif
#ifdef USE_SDL
sdlIntegration.update(viewer);
#endif
if (P3DApplicationType==MASTER)
{
// take camera zero as the guide.
osg::Matrix modelview(viewer.getCamera()->getViewMatrix());
cp.setPacket(modelview,viewer.getFrameStamp());
// cp.readEventQueue(viewer);
scratchPad.reset();
scratchPad.write(cp);
scratchPad.reset();
scratchPad.read(cp);
bc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes());
std::cout << "bc.sync()"<<scratchPad.numBytes()<<std::endl;
bc.sync();
}
else if (P3DApplicationType==SLAVE)
{
rc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes());
rc.sync();
scratchPad.reset();
scratchPad.read(cp);
// cp.writeEventQueue(viewer);
if (cp.getMasterKilled())
#if 0
if (kmcb)
{
std::cout << "Received master killed."<<std::endl;
// break out of while (!done) loop since we've now want to shut down.
masterKilled = true;
double time = kmcb->getTime();
viewer.getFrameStamp()->setReferenceTime(time);
}
}
#endif
// update the scene by traversing it with the the update visitor which will
// call all node update callbacks and animations.
viewer.eventTraversal();
#ifdef USE_SDL
sdlIntegration.update(viewer);
#endif
if (seh->getRequestReload())
{
OSG_INFO<<"Reload requested"<<std::endl;
seh->setRequestReload(false);
int previous_ActiveSlide = seh->getActiveSlide();
int previous_ActiveLayer = seh->getActiveLayer();
// reset time so any event key generate
loadedModel = p3d::readShowFiles(arguments,cacheAllOption.get());
processLoadedModel(loadedModel, optimizer_options, cursorFileName);
if (!loadedModel)
if (P3DApplicationType==MASTER)
{
return 0;
// take camera zero as the guide.
osg::Matrix modelview(viewer.getCamera()->getViewMatrix());
cp.setPacket(modelview,viewer.getFrameStamp());
// cp.readEventQueue(viewer);
scratchPad.reset();
scratchPad.write(cp);
scratchPad.reset();
scratchPad.read(cp);
bc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes());
std::cout << "bc.sync()"<<scratchPad.numBytes()<<std::endl;
bc.sync();
}
else if (P3DApplicationType==SLAVE)
{
rc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes());
rc.sync();
scratchPad.reset();
scratchPad.read(cp);
// cp.writeEventQueue(viewer);
if (cp.getMasterKilled())
{
std::cout << "Received master killed."<<std::endl;
// break out of while (!done) loop since we've now want to shut down.
masterKilled = true;
}
}
viewer.setSceneData(loadedModel.get());
seh->set(loadedModel.get());
seh->selectSlide(previous_ActiveSlide, previous_ActiveLayer);
// update the scene by traversing it with the update visitor which will
// call all node update callbacks and animations.
viewer.eventTraversal();
continue;
if (seh->getRequestReload())
{
OSG_INFO<<"Reload requested"<<std::endl;
seh->setRequestReload(false);
int previous_ActiveSlide = seh->getActiveSlide();
int previous_ActiveLayer = seh->getActiveLayer();
// reset time so any event key generate
loadedModel = p3d::readShowFiles(arguments,cacheAllOption.get());
processLoadedModel(loadedModel, optimizer_options, cursorFileName);
if (!loadedModel)
{
return 0;
}
viewer.setSceneData(loadedModel.get());
seh->set(loadedModel.get());
seh->selectSlide(previous_ActiveSlide, previous_ActiveLayer);
continue;
}
// update the scene by traversing it with the update visitor which will
// call all node update callbacks and animations.
viewer.updateTraversal();
if (P3DApplicationType==SLAVE)
{
osg::Matrix modelview;
cp.getModelView(modelview,camera_offset);
viewer.getCamera()->setViewMatrix(modelview);
}
// fire off the cull and draw traversals of the scene.
if(!masterKilled)
viewer.renderingTraversals();
}
// update the scene by traversing it with the the update visitor which will
// call all node update callbacks and animations.
viewer.updateTraversal();
if (P3DApplicationType==SLAVE)
{
osg::Matrix modelview;
cp.getModelView(modelview,camera_offset);
viewer.getCamera()->setViewMatrix(modelview);
}
// fire off the cull and draw traversals of the scene.
if(!masterKilled)
viewer.renderingTraversals();
// work out if we need to force a sleep to hold back the frame rate
osg::Timer_t endFrameTick = osg::Timer::instance()->tick();
double frameTime = osg::Timer::instance()->delta_s(startFrameTick, endFrameTick);
if (frameTime < targetFrameTime) OpenThreads::Thread::microSleep(static_cast<unsigned int>(1000000.0*(targetFrameTime-frameTime)));
}
}
else
{
ExportHTML::write(seh.get(), viewer, exportName);
}
return 0;
}

1
configure vendored
View File

@@ -1 +0,0 @@
cmake . -DCMAKE_BUILD_TYPE=Release $@

1
debian_scripts/postinst Executable file
View File

@@ -0,0 +1 @@
ldconfig

View File

@@ -39,6 +39,7 @@ OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING = no_extension=C++
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO

View File

@@ -39,6 +39,7 @@ OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING = no_extension=C++
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
@@ -98,15 +99,16 @@ INPUT = ${OpenSceneGraph_SOURCE_DIR}/include/osg \
${OpenSceneGraph_SOURCE_DIR}/include/osgGA \
${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator \
${OpenSceneGraph_SOURCE_DIR}/include/osgParticle \
${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation \
${OpenSceneGraph_SOURCE_DIR}/include/osgShadow \
${OpenSceneGraph_SOURCE_DIR}/include/osgSim \
${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain \
${OpenSceneGraph_SOURCE_DIR}/include/osgText \
${OpenSceneGraph_SOURCE_DIR}/include/osgUI \
${OpenSceneGraph_SOURCE_DIR}/include/osgUtil \
${OpenSceneGraph_SOURCE_DIR}/include/osgViewer \
${OpenSceneGraph_SOURCE_DIR}/include/osgVolume \
${OpenSceneGraph_SOURCE_DIR}/include/osgWidget \
${OpenSceneGraph_SOURCE_DIR}/include/osgQt \
${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/auto_Mainpage
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *include* \

View File

@@ -169,6 +169,25 @@ OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
# Doxygen selects the parser to use depending on the extension of the files it
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
# Fortran. In the later case the parser tries to guess whether the code is fixed
# or free formatted code, this is the default for Fortran type files), VHDL. For
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
#
# Note: For files without extension you can use no_extension as a placeholder.
#
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
EXTENSION_MAPPING = no_extension=C++
# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
# the same type (for instance a group of public functions) to be put as a
# subgroup of that type (e.g. under the Public Functions section). Set it to

View File

@@ -29,6 +29,7 @@ OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING = no_extension=C++
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
@@ -88,15 +89,16 @@ INPUT = ${OpenSceneGraph_SOURCE_DIR}/include/osg \
${OpenSceneGraph_SOURCE_DIR}/include/osgGA \
${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator \
${OpenSceneGraph_SOURCE_DIR}/include/osgParticle \
${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation \
${OpenSceneGraph_SOURCE_DIR}/include/osgShadow \
${OpenSceneGraph_SOURCE_DIR}/include/osgSim \
${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain \
${OpenSceneGraph_SOURCE_DIR}/include/osgText \
${OpenSceneGraph_SOURCE_DIR}/include/osgUI \
${OpenSceneGraph_SOURCE_DIR}/include/osgUtil \
${OpenSceneGraph_SOURCE_DIR}/include/osgViewer \
${OpenSceneGraph_SOURCE_DIR}/include/osgVolume \
${OpenSceneGraph_SOURCE_DIR}/include/osgWidget \
${OpenSceneGraph_SOURCE_DIR}/include/osgQt \
${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/auto_Mainpage
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *include* \

View File

@@ -11,12 +11,12 @@ CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = "${OpenSceneGraph_SOURCE_DIR}/include/"
STRIP_FROM_INC_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = YES
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = NO
@@ -24,11 +24,12 @@ MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING = no_extension=C++
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
@@ -36,7 +37,6 @@ IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@@ -63,13 +63,13 @@ GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
FILE_VERSION_FILTER =
LAYOUT_FILE =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
@@ -79,26 +79,27 @@ WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = "${OpenSceneGraph_SOURCE_DIR}/include/osg" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgAnimation" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgDB" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgFX" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgGA" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgParticle" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgShadow" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgSim" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgText" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgUI" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgUtil" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgViewer" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgVolume" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgWidget" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgQt" \
"${OpenSceneGraph_SOURCE_DIR}/include/osgAnimation"
"${OpenSceneGraph_SOURCE_DIR}/include/osgWidget"
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *include* \
*.cpp
@@ -106,13 +107,13 @@ RECURSIVE = YES
EXCLUDE = .svn
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */.svn/*
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
@@ -130,16 +131,16 @@ VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 2
IGNORE_PREFIX =
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = OpenSceneGraphReferenceDocs
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_HEADER =
HTML_FOOTER = "${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/custom_Footer.html"
HTML_STYLESHEET =
HTML_STYLESHEET =
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
@@ -148,14 +149,14 @@ GENERATE_HTMLHELP = ${GENERATE_HTMLHELP}
CHM_FILE = "../${CMAKE_PROJECT_NAME}ReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm"
HHC_LOCATION = "${HTML_HELP_COMPILER}"
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHG_LOCATION =
QHG_LOCATION =
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
@@ -170,8 +171,8 @@ LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
@@ -183,8 +184,8 @@ GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
@@ -197,8 +198,6 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
@@ -210,37 +209,36 @@ GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
EXPAND_AS_DEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
TAGFILES =
GENERATE_TAGFILE = ${GENERATE_TAGFILE}
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10
DOT_FONTPATH =
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = NO
GROUP_GRAPHS = YES
@@ -254,7 +252,7 @@ GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH = "${DOXYGEN_DOT_PATH}"
DOTFILE_DIRS =
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = YES
@@ -262,6 +260,6 @@ DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = ${SEARCHENGINE}

View File

@@ -11,12 +11,12 @@ CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = "${OpenSceneGraph_SOURCE_DIR}/include/"
STRIP_FROM_INC_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = YES
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = NO
@@ -24,11 +24,12 @@ MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING = no_extension=C++
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
@@ -36,7 +37,6 @@ IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@@ -63,13 +63,13 @@ GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
FILE_VERSION_FILTER =
LAYOUT_FILE =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
@@ -79,7 +79,7 @@ WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
@@ -91,13 +91,13 @@ RECURSIVE = YES
EXCLUDE = .svn
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */.svn/*
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
@@ -115,16 +115,16 @@ VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 2
IGNORE_PREFIX =
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = OpenThreadsReferenceDocs
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_HEADER =
HTML_FOOTER = "${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/custom_Footer.html"
HTML_STYLESHEET =
HTML_STYLESHEET =
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
@@ -133,14 +133,14 @@ GENERATE_HTMLHELP = ${GENERATE_HTMLHELP}
CHM_FILE = "../OpenThreadsReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm"
HHC_LOCATION = "${HTML_HELP_COMPILER}"
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHG_LOCATION =
QHG_LOCATION =
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
@@ -155,8 +155,8 @@ LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
@@ -168,8 +168,8 @@ GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
@@ -182,8 +182,6 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
@@ -195,37 +193,36 @@ GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
EXPAND_AS_DEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
TAGFILES =
GENERATE_TAGFILE = ${GENERATE_TAGFILE}
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10
DOT_FONTPATH =
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = NO
GROUP_GRAPHS = YES
@@ -238,8 +235,8 @@ CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
DOT_PATH =
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = YES
@@ -247,6 +244,6 @@ DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = ${SEARCHENGINE}

View File

@@ -20,6 +20,7 @@ ELSE(ANDROID)
IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgsimpleMDI)
ADD_SUBDIRECTORY(osg2cpp)
ADD_SUBDIRECTORY(osganalysis)
ADD_SUBDIRECTORY(osganimate)
@@ -27,6 +28,7 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgautocapture)
ADD_SUBDIRECTORY(osgautotransform)
ADD_SUBDIRECTORY(osgbillboard)
ADD_SUBDIRECTORY(osgblenddrawbuffers)
ADD_SUBDIRECTORY(osgblendequation)
ADD_SUBDIRECTORY(osgcallback)
ADD_SUBDIRECTORY(osgcamera)
@@ -35,7 +37,7 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgcompositeviewer)
ADD_SUBDIRECTORY(osgcopy)
ADD_SUBDIRECTORY(osgcubemap)
ADD_SUBDIRECTORY(osgdelaunay)
ADD_SUBDIRECTORY(osgdeferred)
ADD_SUBDIRECTORY(osgcluster)
ADD_SUBDIRECTORY(osgdatabaserevisions)
ADD_SUBDIRECTORY(osgdepthpartition)
@@ -46,7 +48,6 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgfont)
ADD_SUBDIRECTORY(osgforest)
ADD_SUBDIRECTORY(osgfxbrowser)
ADD_SUBDIRECTORY(osgframerenderer)
ADD_SUBDIRECTORY(osgoutline)
ADD_SUBDIRECTORY(osggameoflife)
ADD_SUBDIRECTORY(osggeometry)
@@ -54,7 +55,6 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osghangglide)
ADD_SUBDIRECTORY(osghud)
ADD_SUBDIRECTORY(osgimagesequence)
ADD_SUBDIRECTORY(osgimpostor)
ADD_SUBDIRECTORY(osgintersection)
ADD_SUBDIRECTORY(osgkdtree)
ADD_SUBDIRECTORY(osgkeyboard)
@@ -65,9 +65,11 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osglightpoint)
ADD_SUBDIRECTORY(osglogicop)
ADD_SUBDIRECTORY(osglogo)
ADD_SUBDIRECTORY(osggpucull)
ADD_SUBDIRECTORY(osggpx)
ADD_SUBDIRECTORY(osggraphicscost)
ADD_SUBDIRECTORY(osgmanipulator)
ADD_SUBDIRECTORY(osgimpostor)
ADD_SUBDIRECTORY(osgmovie)
ADD_SUBDIRECTORY(osgmultiplemovies)
ADD_SUBDIRECTORY(osgmultiplerendertargets)
@@ -75,6 +77,7 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgmultitexturecontrol)
ADD_SUBDIRECTORY(osgmultitouch)
ADD_SUBDIRECTORY(osgmultiviewpaging)
ADD_SUBDIRECTORY(osgobjectcache)
ADD_SUBDIRECTORY(osgoccluder)
ADD_SUBDIRECTORY(osgocclusionquery)
ADD_SUBDIRECTORY(osgoit)
@@ -95,12 +98,16 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgprerendercubemap)
ADD_SUBDIRECTORY(osgreflect)
ADD_SUBDIRECTORY(osgrobot)
ADD_SUBDIRECTORY(osgSSBO)
ADD_SUBDIRECTORY(osgsampler)
ADD_SUBDIRECTORY(osgscalarbar)
ADD_SUBDIRECTORY(osgscribe)
ADD_SUBDIRECTORY(osgsequence)
ADD_SUBDIRECTORY(osgshaders)
ADD_SUBDIRECTORY(osgshaderpipeline)
ADD_SUBDIRECTORY(osgshadercomposition)
ADD_SUBDIRECTORY(osgshadergen)
ADD_SUBDIRECTORY(osgshadermultiviewport)
ADD_SUBDIRECTORY(osgshaderterrain)
# ADD_SUBDIRECTORY(osgshadercompositor)
ADD_SUBDIRECTORY(osgshadow)
@@ -118,14 +125,17 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgstereomatch)
ADD_SUBDIRECTORY(osgterrain)
ADD_SUBDIRECTORY(osgthreadedterrain)
ADD_SUBDIRECTORY(osgtransferfunction)
ADD_SUBDIRECTORY(osgtext)
ADD_SUBDIRECTORY(osgtext3D)
ADD_SUBDIRECTORY(osgtexture1D)
ADD_SUBDIRECTORY(osgtexture2D)
ADD_SUBDIRECTORY(osgtexture2DArray)
ADD_SUBDIRECTORY(osgtexture3D)
ADD_SUBDIRECTORY(osgtexturerectangle)
ADD_SUBDIRECTORY(osgtexturecompression)
ADD_SUBDIRECTORY(osgthirdpersonview)
ADD_SUBDIRECTORY(osgtransformfeedback)
ADD_SUBDIRECTORY(osguniformbuffer)
ADD_SUBDIRECTORY(osguserstats)
ADD_SUBDIRECTORY(osgvertexprogram)
@@ -158,10 +168,9 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgwidgettable)
ADD_SUBDIRECTORY(osgwidgetwindow)
ADD_SUBDIRECTORY(osguserdata)
# GL3/GL4 example
ADD_SUBDIRECTORY(osgsimplegl3)
ADD_SUBDIRECTORY(osgbindlesstext)
IF(OSG_CPP_EXCEPTIONS_AVAILABLE)
ADD_SUBDIRECTORY(osgunittests)
ADD_SUBDIRECTORY(osgmemorytest)
@@ -184,10 +193,6 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgpdf)
IF (GLUT_FOUND)
ADD_SUBDIRECTORY(osgviewerGLUT)
ENDIF(GLUT_FOUND)
IF (SDL_FOUND)
ADD_SUBDIRECTORY(osgviewerSDL)
ENDIF(SDL_FOUND)
@@ -206,20 +211,6 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ENDIF()
ENDIF()
IF ( (QT4_FOUND OR Qt5Widgets_FOUND) AND NOT OSG_GLES1_AVAILABLE AND NOT OSG_GLES2_AVAILABLE AND NOT OSG_GL3_AVAILABLE)
IF ( QT4_FOUND OR Qt5Widgets_FOUND)
ADD_SUBDIRECTORY(osgviewerQt)
ADD_SUBDIRECTORY(osgqfont)
ENDIF()
IF ( (QT4_FOUND AND QT_QTWEBKIT_FOUND) OR Qt5WebKitWidgets_FOUND )
ADD_SUBDIRECTORY(osgQtWidgets)
ADD_SUBDIRECTORY(osgQtBrowser)
ENDIF()
ENDIF()
IF (FLTK_FOUND AND FLTK_GL_LIBRARY)
ADD_SUBDIRECTORY(osgviewerFLTK)
ENDIF()
@@ -252,15 +243,12 @@ ELSE(DYNAMIC_OPENSCENEGRAPH)
#needed on win32 or the linker get confused by _declspec declarations
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ADD_SUBDIRECTORY(osgstaticviewer)
# IPHONE_PORT@tom
IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
IF(OSG_BUILD_PLATFORM_IPHONE)
ADD_SUBDIRECTORY(osgviewerIPhone)
ELSE()
ADD_SUBDIRECTORY(osgstaticviewer)
ENDIF()
# IPHONE_PORT@tom
ENDIF(DYNAMIC_OPENSCENEGRAPH)
ENDIF(ANDROID)

View File

@@ -7,7 +7,7 @@
#include <iostream>
// Search in str for all occurences of spat and replace them with rpat.
// Search in str for all occurrences of spat and replace them with rpat.
void searchAndReplace(std::string& str, const std::string& spat, const std::string& rpat)
{
std::string::size_type pos = 0;
@@ -30,13 +30,13 @@ void writeShader(osg::Shader* shader, const std::string& cppFileName, const std:
searchAndReplace(shaderSource, "\r\n", "\n");
searchAndReplace(shaderSource, "\r", "\n");
searchAndReplace(shaderSource, "\"", "\\\"");
std::string variableString = std::string("char ")+variableName+std::string("[] = ");
std::string::size_type startOfLine = 0;
std::string::size_type endOfLine = shaderSource.find_first_of('\n', startOfLine);
if (endOfLine==std::string::npos)
if (endOfLine==std::string::npos)
{
fout<<variableString<<shaderSource<<"\\n\";"<<std::endl;
}
@@ -63,25 +63,29 @@ int main( int argc, char **argv )
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is a utility for converting glsl shader files into char arrays that can be compiled into applications.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("--shader <filename>","Shader file to create a .cpp file for.");
arguments.getApplicationUsage()->addCommandLineOption("--write-to-source-file-directory","Use the path to the source filename as the directory to write to.");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display command line parameters");
// if user request help write it out to cout.
if (arguments.read("-h") || arguments.read("--help"))
{
{
arguments.getApplicationUsage()->write(std::cout);
return 1;
}
bool useSamePathAsSourceFile = false;
if (arguments.read("--write-to-source-file-directory")) useSamePathAsSourceFile = true;
std::string filename;
if (arguments.read("--shader",filename))
{
osg::ref_ptr<osg::Shader> shader = osgDB::readShaderFile(filename);
osg::ref_ptr<osg::Shader> shader = osgDB::readRefShaderFile(filename);
if (shader.valid())
{
std::string name = osgDB::getStrippedName(filename);
@@ -94,9 +98,11 @@ int main( int argc, char **argv )
name[pos] = '_';
pos = name.find_first_of(invalidCharacters);
}
std::string ext = osgDB::getFileExtension(filename);
std::string cppFileName = osgDB::concatPaths(path, name + "_" + ext + ".cpp");
std::string cppFileName = name + "_" + ext + ".cpp";
if (useSamePathAsSourceFile) cppFileName = osgDB::concatPaths(path, cppFileName);
std::string variableName = name + "_" + ext;
writeShader(shader.get(), cppFileName, variableName);
@@ -107,7 +113,7 @@ int main( int argc, char **argv )
std::cout<<"Error: could not find file '"<<filename<<"'"<<std::endl;
return 1;
}
}
std::cout<<"No appropriate command line options used."<<std::endl;

View File

@@ -5,7 +5,7 @@
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
<uses-feature android:glEsVersion="0x00010001"/> <!-- OpenGL min requierements (1.1) -->
<uses-feature android:glEsVersion="0x00010001"/> <!-- OpenGL min requirements (1.1) -->
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label="@string/app_name" android:icon="@drawable/osg">

View File

@@ -23,7 +23,7 @@ void OsgMainApp::loadModels(){
newModel = _vModelsToLoad[i];
osg::notify(osg::ALWAYS)<<"Loading: "<<newModel.filename<<std::endl;
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(newModel.filename);
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFile(newModel.filename);
if (loadedModel == 0) {
osg::notify(osg::ALWAYS)<<"Model not loaded"<<std::endl;
} else {

View File

@@ -5,7 +5,7 @@
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
<uses-feature android:glEsVersion="0x00020000"/> <!-- OpenGL min requierements (2.0) -->
<uses-feature android:glEsVersion="0x00020000"/> <!-- OpenGL min requirements (2.0) -->
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label="@string/app_name" android:icon="@drawable/osg">

View File

@@ -23,7 +23,7 @@ void OsgMainApp::loadModels(){
newModel = _vModelsToLoad[i];
osg::notify(osg::ALWAYS)<<"Loading: "<<newModel.filename<<std::endl;
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(newModel.filename);
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFile(newModel.filename);
if (loadedModel == 0) {
osg::notify(osg::ALWAYS)<<"Model not loaded"<<std::endl;
} else {
@@ -103,7 +103,9 @@ void OsgMainApp::initOsgWindow(int x,int y,int width,int height){
osg::notify(osg::ALWAYS)<<"Testing"<<std::endl;
_viewer = new osgViewer::Viewer();
_viewer->setUpViewerAsEmbeddedInWindow(x, y, width, height);
osgViewer::GraphicsWindowEmbedded* window = _viewer->setUpViewerAsEmbeddedInWindow(x, y, width, height);
_viewer->getEventQueue()->setGraphicsContext(window);
_viewer->getEventQueue()->syncWindowRectangleWithGraphicsContext();
_viewer->setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
_root = new osg::Group();

View File

@@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 2.6)
SET(PROJECT_NAME osgCMakeExample)
PROJECT(${PROJECT_NAME})
FIND_PACKAGE(OpenThreads)
FIND_PACKAGE(osg)
FIND_PACKAGE(osgDB)
FIND_PACKAGE(osgUtil)
FIND_PACKAGE(osgGA)
FIND_PACKAGE(osgViewer)
SET(SOURCES
main.cpp
)
INCLUDE_DIRECTORIES(${OPENTHREADS_INCLUDE_DIR} ${OSG_INCLUDE_DIR})
LINK_DIRECTORIES(${OSG_LIB_DIR})
ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OSG_LIBRARIES} ${OSGVIEWER_LIBRARIES} ${OSGUTIL_LIBRARIES} ${OSGDB_LIBRARIES} ${OSGGA_LIBRARIES} ${OPENTHREADS_LIBRARIES})

View File

@@ -0,0 +1,183 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
*
* This application is open source and may be redistributed and/or modified
* freely and without restriction, both in commercial and non commercial applications,
* as long as this copyright notice is maintained.
*
* This application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <osgDB/ReadFile>
#include <osgUtil/Optimizer>
#include <osg/CoordinateSystemNode>
#include <osg/Switch>
#include <osg/Types>
#include <osgText/Text>
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osgGA/TrackballManipulator>
#include <osgGA/FlightManipulator>
#include <osgGA/DriveManipulator>
#include <osgGA/KeySwitchMatrixManipulator>
#include <osgGA/StateSetManipulator>
#include <osgGA/AnimationPathManipulator>
#include <osgGA/TerrainManipulator>
#include <osgGA/SphericalManipulator>
#include <osgGA/Device>
#include <iostream>
int main(int argc, char** argv)
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("--image <filename>","Load an image and render it on a quad");
arguments.getApplicationUsage()->addCommandLineOption("--dem <filename>","Load an image/DEM and render it on a HeightField");
arguments.getApplicationUsage()->addCommandLineOption("--login <url> <username> <password>","Provide authentication information for http file access.");
arguments.getApplicationUsage()->addCommandLineOption("-p <filename>","Play specified camera path animation file, previously saved with 'z' key.");
arguments.getApplicationUsage()->addCommandLineOption("--speed <factor>","Speed factor for animation playing (1 == normal speed).");
arguments.getApplicationUsage()->addCommandLineOption("--device <device-name>","add named device to the viewer");
osgViewer::Viewer viewer(arguments);
unsigned int helpType = 0;
if ((helpType = arguments.readHelpType()))
{
arguments.getApplicationUsage()->write(std::cout, helpType);
return 1;
}
// report any errors if they have occurred when parsing the program arguments.
if (arguments.errors())
{
arguments.writeErrorMessages(std::cout);
return 1;
}
if (arguments.argc()<=1)
{
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
return 1;
}
std::string url, username, password;
while(arguments.read("--login",url, username, password))
{
if (!osgDB::Registry::instance()->getAuthenticationMap())
{
osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(
url,
new osgDB::AuthenticationDetails(username, password)
);
}
}
std::string device;
while(arguments.read("--device", device))
{
osg::ref_ptr<osgGA::Device> dev = osgDB::readRefFile<osgGA::Device>(device);
if (dev.valid())
{
viewer.addDevice(dev);
}
}
// set up the camera manipulators.
{
osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;
keyswitchManipulator->addMatrixManipulator( '1', "Trackball", new osgGA::TrackballManipulator() );
keyswitchManipulator->addMatrixManipulator( '2', "Flight", new osgGA::FlightManipulator() );
keyswitchManipulator->addMatrixManipulator( '3', "Drive", new osgGA::DriveManipulator() );
keyswitchManipulator->addMatrixManipulator( '4', "Terrain", new osgGA::TerrainManipulator() );
keyswitchManipulator->addMatrixManipulator( '5', "Orbit", new osgGA::OrbitManipulator() );
keyswitchManipulator->addMatrixManipulator( '6', "FirstPerson", new osgGA::FirstPersonManipulator() );
keyswitchManipulator->addMatrixManipulator( '7', "Spherical", new osgGA::SphericalManipulator() );
std::string pathfile;
double animationSpeed = 1.0;
while(arguments.read("--speed",animationSpeed) ) {}
char keyForAnimationPath = '8';
while (arguments.read("-p",pathfile))
{
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
if (apm && !apm->getAnimationPath()->empty())
{
apm->setTimeScale(animationSpeed);
unsigned int num = keyswitchManipulator->getNumMatrixManipulators();
keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
keyswitchManipulator->selectMatrixManipulator(num);
++keyForAnimationPath;
}
}
viewer.setCameraManipulator( keyswitchManipulator.get() );
}
// add the state manipulator
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
// add the thread model handler
viewer.addEventHandler(new osgViewer::ThreadingHandler);
// add the window size toggle handler
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
// add the stats handler
viewer.addEventHandler(new osgViewer::StatsHandler);
// add the help handler
viewer.addEventHandler(new osgViewer::HelpHandler(arguments.getApplicationUsage()));
// add the record camera path handler
viewer.addEventHandler(new osgViewer::RecordCameraPathHandler);
// add the LOD Scale handler
viewer.addEventHandler(new osgViewer::LODScaleHandler);
// add the screen capture handler
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
// load the data
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFiles(arguments);
if (!loadedModel)
{
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
return 1;
}
// any option left unread are converted into errors to write out later.
arguments.reportRemainingOptionsAsUnrecognized();
// report any errors if they have occurred when parsing the program arguments.
if (arguments.errors())
{
arguments.writeErrorMessages(std::cout);
return 1;
}
// optimize the scene graph, remove redundant nodes and state etc.
osgUtil::Optimizer optimizer;
optimizer.optimize(loadedModel);
viewer.setSceneData(loadedModel);
viewer.realize();
return viewer.run();
}

View File

@@ -1,25 +0,0 @@
SET(TARGET_SRC
osgQtBrowser.cpp
)
IF(CMAKE_COMPILER_IS_GNUCXX)
# Remove -pedantic flag as it barfs on Qt headers
STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ENDIF()
if ( QT4_FOUND )
SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY})
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTWEBKIT_INCLUDE_DIR} )
endif( QT4_FOUND )
SET(TARGET_ADDED_LIBRARIES osgWidget osgQt)
#### end var setup ###
SET ( EXAMPLE_NAME osgQtBrowser )
SETUP_EXAMPLE(${EXAMPLE_NAME})
IF ( Qt5Widgets_FOUND )
qt5_use_modules( example_${EXAMPLE_NAME} Widgets OpenGL WebKitWidgets )
ENDIF( Qt5Widgets_FOUND )

View File

@@ -1,145 +0,0 @@
/* OpenSceneGraph example, osgcompositeviewer.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <iostream>
#include <osg/Notify>
#include <osg/io_utils>
#include <osg/ArgumentParser>
#include <osgDB/WriteFile>
#include <osgGA/TrackballManipulator>
#include <osgGA/StateSetManipulator>
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osgWidget/Browser>
#include <QtGlobal>
#if QT_VERSION >= 0x050000
# include <QtWebKitWidgets>
#else
# include <QtWebKit>
#endif
#include <QWebSettings>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QApplication>
#include <QPainter>
#include <QtEvents>
#include <osgQt/QGraphicsViewAdapter>
#include <osgQt/QWebViewImage>
// Thread that runs the viewer's frame loop as we can't run Qt in the background...
class ViewerFrameThread : public OpenThreads::Thread
{
public:
ViewerFrameThread(osgViewer::ViewerBase* viewerBase, bool doQApplicationExit):
_viewerBase(viewerBase),
_doQApplicationExit(doQApplicationExit) {}
~ViewerFrameThread()
{
cancel();
while(isRunning())
{
OpenThreads::Thread::YieldCurrentThread();
}
}
int cancel()
{
_viewerBase->setDone(true);
return 0;
}
void run()
{
int result = _viewerBase->run();
if (_doQApplicationExit) QApplication::exit(result);
}
osg::ref_ptr<osgViewer::ViewerBase> _viewerBase;
bool _doQApplicationExit;
};
int main(int argc, char **argv)
{
// Qt requires that we construct the global QApplication before creating any widgets.
QApplication app(argc, argv);
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
bool useFrameLoopThread = false;
if (arguments.read("--no-frame-thread")) useFrameLoopThread = false;
if (arguments.read("--frame-thread")) useFrameLoopThread = true;
osg::ref_ptr<osgQt::QWebViewImage> image = new osgQt::QWebViewImage;
if (arguments.argc()>1) image->navigateTo((arguments[1]));
else image->navigateTo("http://www.youtube.com/");
osgWidget::GeometryHints hints(osg::Vec3(0.0f,0.0f,0.0f),
osg::Vec3(1.0f,0.0f,0.0f),
osg::Vec3(0.0f,0.0f,1.0f),
osg::Vec4(1.0f,1.0f,1.0f,1.0f),
osgWidget::GeometryHints::RESIZE_HEIGHT_TO_MAINTAINCE_ASPECT_RATIO);
osg::ref_ptr<osgWidget::Browser> browser = new osgWidget::Browser;
browser->assign(image.get(), hints);
// image->focusBrowser(true);
osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer(arguments);
viewer->setSceneData(browser.get());
viewer->setCameraManipulator(new osgGA::TrackballManipulator());
viewer->addEventHandler(new osgViewer::StatsHandler);
viewer->addEventHandler(new osgViewer::WindowSizeHandler);
if (useFrameLoopThread)
{
// create a thread to run the viewer's frame loop
ViewerFrameThread viewerThread(viewer.get(), true);
viewerThread.startThread();
// now start the standard Qt event loop, then exists when the viewerThead sends the QApplication::exit() signal.
return QApplication::exec();
}
else
{
// run the frame loop, interleaving Qt and the main OSG frame loop
while(!viewer->done())
{
// process Qt events - this handles both events and paints the browser image
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
viewer->frame();
}
return 0;
}
}

View File

@@ -1,23 +0,0 @@
SET(TARGET_SRC
osgQtWidgets.cpp
)
IF(CMAKE_COMPILER_IS_GNUCXX)
# Remove -pedantic flag as it barfs on Qt headers
STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ENDIF()
if ( QT4_FOUND )
SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY})
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTWEBKIT_INCLUDE_DIR} )
endif( QT4_FOUND )
SET(TARGET_ADDED_LIBRARIES osgWidget osgQt)
#### end var setup ###
SET ( EXAMPLE_NAME osgQtWidgets )
SETUP_EXAMPLE(${EXAMPLE_NAME})
IF ( Qt5Widgets_FOUND )
qt5_use_modules( example_${EXAMPLE_NAME} OpenGL WebKitWidgets )
ENDIF( Qt5Widgets_FOUND )

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
SET(TARGET_SRC osgSSBO.cpp )
SETUP_EXAMPLE(osgSSBO)

View File

@@ -0,0 +1,946 @@
//info : osgSSBO example,testing ShaderStorageBufferObjects ,Markus Hein, 2014, osg-3.2.1
//required hardware and driver must support GL >= GL 4.3 or GL ES 3.1 (GL ES not tested, would be nice if someone will test it on a small device)
//testing osg support for Shader Storage Buffer Objects
//version: "first take" from last night session..
#include <osg/StateAttributeCallback>
#include <osg/Texture2D>
#include <osg/Geometry>
#include <osg/DispatchCompute>
#include <osgDB/ReadFile>
#include <osgGA/StateSetManipulator>
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osg/Node>
#include <osg/PositionAttitudeTransform>
#include <osg/Geometry>
#include <osg/Notify>
#include <osg/MatrixTransform>
#include <osg/Texture2D>
#include <osg/TextureRectangle>
#include <osg/Stencil>
#include <osg/Depth>
#include <osg/Billboard>
#include <osg/Material>
#include <osg/AnimationPath>
#include <osgGA/TrackballManipulator>
#include <osgGA/FlightManipulator>
#include <osgGA/DriveManipulator>
#include <osgUtil/SmoothingVisitor>
#include <osgDB/Registry>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osgViewer/Renderer>
#include <osg/Array>
#include <osg/BoundingSphere>
#include <osg/BufferIndexBinding>
#include <osg/BufferObject>
#include <osg/Group>
#include <osg/Math>
#include <osg/MatrixTransform>
#include <osg/Program>
#include <osg/Shader>
#include <osg/Drawable>
#include <osg/CopyOp>
#include <osg/State>
#include <osg/Matrix>
#include <osg/ShapeDrawable>
#include <osg/GL>
#include <osg/StateSet>
#include <osg/Texture2D>
#include <osg/BlendFunc>
#include <osg/TexEnv>
#include <osg/Material>
#include <osg/PointSprite>
#include <osg/Program>
#include <osg/Notify>
#include <osg/Point>
#include <osg/io_utils>
#include <osg/VertexProgram>
#include <osgText/Font>
#include <osgText/Text>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgDB/FileNameUtils>
#include <osgUtil/Optimizer>
#include <iostream>
#include <typeinfo>
using namespace osg;
//todo .. #define COMPUTATION_IN_SEPARATE_THREAD
#define WORK_GROUP_SIZE 16
#define PRERENDER_ANTIALIASINGMULTISAMPLES 16
#define PRERENDER_HIGH_QUALITY_ANTIALIASING
#define PRERENDER_WIDTH 1920
#define PRERENDER_HEIGHT 1080
#define SUB_PLACEMENT_OFFSET_HORIZONTAL 0.5
#define SUB_PLACEMENT_OFFSET_VERTICAL 0.5
enum BufferOffset
{
POSITION_NOW_OFFSET,
POSITION_OLD_OFFSET,
POSITION_INIT_OFFSET,
VELOCITY_NOW_OFFSET,
VELOCITY_OLD_OFFSET,
VELOCITY_INIT_OFFSET,
ACCELERATION_OFFSET,
PROPERTIES_OFFSET,
OFFSET_END
};
const int __numDataValuesPerChannel = OFFSET_END;
const int __numChannels = 4;
//512x512x4x7 = 7.340.032 floats in SSBO on GPU
const int NUM_ELEMENTS_X = 512;
const int NUM_ELEMENTS_Y = 512;
float random(float min, float max) { return min + (max - min)*(float)rand() / (float)RAND_MAX; }
enum Channel
{
RED_CHANNEL,
GREEN_CHANNEL,
BLUE_CHANNEL,
ALPHA_CHANNEL,
RGB_CHANNEL,
RGBA_CHANNEL
};
class ShaderStorageBufferCallback : public osg::StateAttributeCallback
{
public:
void operator() (osg::StateAttribute* /*attr*/, osg::NodeVisitor* /*nv*/)
{
//if you need to process the data in your app-code , better leaving it on GPU and processing there, uploading per frame will make it slow
#if 0
osg::ShaderStorageBufferBinding* ssbb = static_cast<osg::ShaderStorageBufferBinding*>(attr);
osg::ShaderStorageBufferObject* ssbo
= static_cast<osg::ShaderStorageBufferObject*>(ssbb->getBufferObject());
osg::FloatArray* array = static_cast<osg::FloatArray*>(ssbo->getBufferData(0));
float someValue = array->at(0);
//std::cout << "someValue now: " << someValue << std::endl;
//data transfer performance test
// array->dirty();
#endif
}
};
//do not forget to set OSG_FILE_PATH to default OSG-Data and make sure the new shaders are copied there under"shaders"
class ComputeNode : public osg::PositionAttitudeTransform
{
public:
osg::ref_ptr<osg::DispatchCompute> _DispatchCompute;
osg::ref_ptr<osg::Program> _computeProgram;
osg::ref_ptr<osg::Shader> _computeShader; //compute and write position data in SSBO
osg::ref_ptr<osg::Shader> _vertexShader; //reading position data from SSBO (OBS!: make sure glMemoryBuffer() is syncing this)
osg::ref_ptr<osg::Shader> _geometryShader; //building a quad looking to the camera
osg::ref_ptr<osg::Shader> _fragmentShader; //use false-colors etc. for making your data visible
osg::ref_ptr<osg::Node> _helperNode; // coordinate system node
ref_ptr<osg::ShaderStorageBufferObject> _ssbo;
ref_ptr<osg::ShaderStorageBufferBinding> _ssbb;
GLfloat* _data; // some data we upload to GPU, initialised with random values
osg::ref_ptr<FloatArray> _dataArray; //
osg::ref_ptr<osg::Group> _computationResultsRenderGroup;
osg::ref_ptr<osg::Program> _computationResultsRenderProgram;
osg::ref_ptr<osg::StateSet> _computationResultsRenderStateSet;
std::string _computeShaderSourcePath;
std::string _vertexShaderSourcePath;
std::string _geometryShaderSourcePath;
std::string _fragmentShaderSourcePath;
void addHelperGeometry();
void addDataMonitor(osg::Vec3 placement, osg::Vec3 relativePlacement, float scale, Channel channel, BufferOffset shaderBufferOffset, std::string labelcaption, float minDataRange, float maxDataRange);
void addComputationResultsRenderTree();
void initComputingSetup();
ComputeNode()
{
_computeShaderSourcePath = "shaders/osgssboComputeShader.cs";
_vertexShaderSourcePath = "shaders/osgssboVertexShader.vs";
_geometryShaderSourcePath = "shaders/osgssboGeometryShader.gs";
_fragmentShaderSourcePath = "shaders/osgssboFragmentShader.fs";
_DispatchCompute=new osg::DispatchCompute();
addChild(_DispatchCompute);
}
};
class ComputeNodeUpdateCallback : public osg::NodeCallback
{
public:
ComputeNode* _computeNode;
osg::Timer_t _prevShaderUpdateTime;
osg::Timer _timer;
ComputeNodeUpdateCallback(){}
ComputeNodeUpdateCallback(ComputeNode* computeNode)
{
_computeNode = computeNode;
_prevShaderUpdateTime = 0;
}
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
osg::Timer_t currTime = _timer.tick();
if (_timer.delta_s(_prevShaderUpdateTime, currTime) > 1.0) //one second interval for shader-changed-do-reload check
{
osg::ref_ptr<osg::Shader> reloadedshader;
std::string runningSource;
std::string reloadedstring;
if (_computeNode->_computeShader.valid())
{
runningSource = _computeNode->_computeShader->getShaderSource();
reloadedshader = osgDB::readRefShaderFile(osg::Shader::COMPUTE, _computeNode->_computeShaderSourcePath);
reloadedstring = reloadedshader->getShaderSource();
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
{
_computeNode->_computeProgram->removeShader(_computeNode->_computeShader.get());
_computeNode->_computeShader = reloadedshader.get();
_computeNode->_computeProgram->addShader(_computeNode->_computeShader.get());
}
}
if (_computeNode->_vertexShader.valid())
{
runningSource = _computeNode->_vertexShader->getShaderSource();
reloadedshader = osgDB::readRefShaderFile(osg::Shader::VERTEX, _computeNode->_vertexShaderSourcePath);
reloadedstring = reloadedshader->getShaderSource();
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
{
_computeNode->_computationResultsRenderProgram->removeShader(_computeNode->_vertexShader.get());
_computeNode->_vertexShader = reloadedshader.get();
_computeNode->_computationResultsRenderProgram->addShader(_computeNode->_vertexShader.get());
}
}
if (_computeNode->_geometryShader.valid())
{
runningSource = _computeNode->_geometryShader->getShaderSource();
reloadedshader = osgDB::readRefShaderFile(osg::Shader::GEOMETRY, _computeNode->_geometryShaderSourcePath);
reloadedstring = reloadedshader->getShaderSource();
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
{
_computeNode->_computationResultsRenderProgram->removeShader(_computeNode->_geometryShader.get());
_computeNode->_geometryShader = reloadedshader.get();
_computeNode->_computationResultsRenderProgram->addShader(_computeNode->_geometryShader.get());
}
}
if (_computeNode->_fragmentShader.valid())
{
runningSource = _computeNode->_fragmentShader->getShaderSource();
reloadedshader = osgDB::readRefShaderFile(osg::Shader::FRAGMENT, _computeNode->_fragmentShaderSourcePath);
reloadedstring = reloadedshader->getShaderSource();
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
{
_computeNode->_computationResultsRenderProgram->removeShader(_computeNode->_fragmentShader.get());
_computeNode->_fragmentShader = reloadedshader.get();
_computeNode->_computationResultsRenderProgram->addShader(_computeNode->_fragmentShader.get());
}
}
_prevShaderUpdateTime = _timer.tick();
}
traverse(node, nv);
}
};
//set OSG_FILE_PATH for loading axes.osgt
void ComputeNode::addHelperGeometry()
{
_helperNode = osgDB::readRefNodeFile("axes.osgt");
if (_helperNode.valid())
{
addChild(_helperNode.get());
}
//osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform;
//pat->setPosition(osg::Vec3(0.5, 0, 0.5));
//osg::Geode *sphereGeode = new osg::Geode;
//float radius = 0.5f;
//osg::TessellationHints* hints = new osg::TessellationHints;
//hints->setDetailRatio(0.9f);
//osg::ShapeDrawable* sphere = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), radius), hints);
//sphereGeode->addDrawable(sphere);
//sphere->setColor(osg::Vec4(0, 1, 0, 0.1));
//osg::StateSet* stateset = sphereGeode->getOrCreateStateSet();
//osg::BlendFunc *blend = new osg::BlendFunc;
//blend->setFunction(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
//stateset->setAttributeAndModes(blend, osg::StateAttribute::ON);
//pat->addChild(sphereGeode);
//addChild(pat);
}
void ComputeNode::addDataMonitor(osg::Vec3 placement, osg::Vec3 relativePlacement, float scale, Channel colorchannel, BufferOffset shaderStorageBufferOffset, std::string labelCaption, float minDataRange, float maxDataRange)
{
osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform;
pat->setPosition(relativePlacement);
addChild(pat);
osg::Geometry* geom;
if (NUM_ELEMENTS_X >= NUM_ELEMENTS_Y)
{
float ratio = (float)((float)NUM_ELEMENTS_Y / (float)NUM_ELEMENTS_X);
geom = osg::createTexturedQuadGeometry(placement, osg::Vec3(1.0f*scale, 0.0f, 0.0f), osg::Vec3(0.0f, 0.0f, ratio*1.0f*scale));
}
else
{
float ratio = (float)((float)NUM_ELEMENTS_X / (float)NUM_ELEMENTS_Y);
geom = osg::createTexturedQuadGeometry(placement, osg::Vec3(ratio*1.0f*scale, 0.0f, 0.0f), osg::Vec3(0.0f, 0.0f, 1.0f*scale));
}
geom->setVertexAttribArray(1, geom->getTexCoordArray(0), osg::Array::BIND_PER_VERTEX);
osg::ref_ptr<osg::Geode> quad = new osg::Geode;
quad->addDrawable(geom);
quad->setStateSet(getOrCreateStateSet());
pat->addChild(quad.get());
static const char* vertexShaderSrcChannelMonitor = {
"#version 430 \n"
"uniform int numRows;\n"
"uniform int numCols;\n"
"uniform float osg_FrameTime;\n"
"uniform mat4 osg_ProjectionMatrix;\n"
"uniform mat4 osg_ModelViewMatrix;\n"
"out vec2 texCoordFromVertexShader;\n"
"struct particle{ float x; float y; float z; float w;};"
"layout (location = 0) in vec3 vertexpos;\n"
"attribute vec2 tex_coords;\n"
"void main() {\n"
"texCoordFromVertexShader.xy = tex_coords.xy; gl_Position = ( osg_ProjectionMatrix * osg_ModelViewMatrix * vec4(vertexpos.x,vertexpos.y,vertexpos.z,1) ); \n"
"}\n"
};
std::stringstream fragmentshaderstringstreamChannelMonitor;
fragmentshaderstringstreamChannelMonitor << "#version 430\n";
fragmentshaderstringstreamChannelMonitor << "uniform int numRows;\n";
fragmentshaderstringstreamChannelMonitor << "uniform int numCols;\n";
fragmentshaderstringstreamChannelMonitor << "uniform float dataRangeMin;\n";
fragmentshaderstringstreamChannelMonitor << "uniform float dataRangeMax;\n";
fragmentshaderstringstreamChannelMonitor << "in vec2 texCoordFromVertexShader;\n";
fragmentshaderstringstreamChannelMonitor << "struct particle{ float x; float y; float z; float w;};";
fragmentshaderstringstreamChannelMonitor << "layout(std140, binding=0) coherent buffer particles{particle p[];}; ";
fragmentshaderstringstreamChannelMonitor << "\n";
fragmentshaderstringstreamChannelMonitor << "void main(void)\n";
fragmentshaderstringstreamChannelMonitor << "{\n";
fragmentshaderstringstreamChannelMonitor << "ivec2 storePos = ivec2(numRows*texCoordFromVertexShader.x, numCols*texCoordFromVertexShader.y); particle particleData = p[" << shaderStorageBufferOffset * NUM_ELEMENTS_X*NUM_ELEMENTS_Y << " + (storePos.x*numRows + storePos.y)]; ";
//fragmentshaderstringstreamChannelMonitor << " memoryBarrierBuffer(); \n";
fragmentshaderstringstreamChannelMonitor << " float dataRangeMultiplier = 1.0 / abs(dataRangeMax - dataRangeMin); \n";
switch (colorchannel)
{
case RED_CHANNEL:
{
fragmentshaderstringstreamChannelMonitor << " vec4 color; color.x = 0.5+dataRangeMultiplier*particleData.x; color.y =0.0; color.z = 0.0; color.w = 1.0; gl_FragColor = color;\n";
break;
}
case GREEN_CHANNEL:
{
fragmentshaderstringstreamChannelMonitor << " vec4 color; color.x = 0.0; color.y = 0.5+dataRangeMultiplier*particleData.y; color.z = 0.0; color.w = 1.0; gl_FragColor = color;\n";
break;
}
case BLUE_CHANNEL:
{
fragmentshaderstringstreamChannelMonitor << " vec4 color; color.x = 0.0; color.y = 0.0; color.z = 0.5+dataRangeMultiplier*particleData.z; color.w = 0.0 ; gl_FragColor = color;\n";
break;
}
case ALPHA_CHANNEL:
{
fragmentshaderstringstreamChannelMonitor << " vec4 color; color.x = 0.5+dataRangeMultiplier*particleData.w; color.y = 0.5+dataRangeMultiplier*particleData.w; color.z = 0.5+dataRangeMultiplier*particleData.w; color.w = 0.5+0.5*particleData.w; gl_FragColor = color;\n";
break;
}
case RGB_CHANNEL:
{
fragmentshaderstringstreamChannelMonitor << " vec4 color; color.x = 0.5+dataRangeMultiplier*particleData.x; color.y = 0.5+dataRangeMultiplier*particleData.y; color.z = 0.5+dataRangeMultiplier*particleData.z; color.w = 1.0; gl_FragColor = color;\n";
break;
}
case RGBA_CHANNEL:
{
fragmentshaderstringstreamChannelMonitor << " vec4 color; color.x = 0.5+dataRangeMultiplier*particleData.x; color.y = 0.5+dataRangeMultiplier*particleData.y; color.z = 0.5+dataRangeMultiplier*particleData.z; color.w = 0.5+0.5*particleData.w; gl_FragColor = color;\n";
break;
}
}
fragmentshaderstringstreamChannelMonitor << "}\n";
osg::Program * program = new osg::Program;
program->addShader(new osg::Shader(osg::Shader::VERTEX, vertexShaderSrcChannelMonitor));
program->addShader(new osg::Shader(osg::Shader::FRAGMENT, fragmentshaderstringstreamChannelMonitor.str().c_str()));
program->addBindAttribLocation("tex_coords", 1);
osg::StateSet* ss = geom->getOrCreateStateSet();
ss->setAttributeAndModes(program, osg::StateAttribute::ON);
ss->addUniform(new osg::Uniform("numRows", (int)NUM_ELEMENTS_X));
ss->addUniform(new osg::Uniform("numCols", (int)NUM_ELEMENTS_Y));
ss->addUniform(new osg::Uniform("dataRangeMin", (float)minDataRange));
ss->addUniform(new osg::Uniform("dataRangeMax", (float)maxDataRange));
ss->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
//add a label
osg::ref_ptr<osgText::Text> text = new osgText::Text;
osg::ref_ptr<osgText::Font> font = osgText::readRefFontFile("fonts/arial.ttf");
text->setFont(font);
text->setColor(osg::Vec4(1, 1, 1, 1));
text->setCharacterSize(0.1*scale);
text->setPosition(placement + osg::Vec3(0.05, 0.05, 0));
pat->setName(labelCaption);
text->setText(pat->getName());
text->setBackdropType(osgText::Text::OUTLINE);
text->setBackdropOffset(0.05f);
text->setBackdropColor(osg::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
quad->addDrawable(text);
pat->addChild(quad.get());
}
//compute texture image , taken from osgspotlight
osg::Image* createSpotLightImage(const osg::Vec4& centerColour, const osg::Vec4& backgroudColour, unsigned int size, float power)
{
osg::Image* image = new osg::Image;
image->allocateImage(size, size, 1,
GL_RGBA, GL_UNSIGNED_BYTE);
float mid = (float(size) - 1)*0.5f;
float div = 2.0f / float(size);
for (unsigned int r = 0; r < size; ++r)
{
unsigned char* ptr = image->data(0, r, 0);
for (unsigned int c = 0; c < size; ++c)
{
float dx = (float(c) - mid)*div;
float dy = (float(r) - mid)*div;
float pr = powf(1.0f - sqrtf(dx*dx + dy*dy), power);
if (pr < 0.0f) pr = 0.0f;
osg::Vec4 color = centerColour*pr + backgroudColour*(1.0f - pr);
*ptr++ = (unsigned char)((color[0])*255.0f);
*ptr++ = (unsigned char)((color[1])*255.0f);
*ptr++ = (unsigned char)((color[2])*255.0f);
*ptr++ = (unsigned char)((color[3])*255.0f);
}
}
return image;
}
void ComputeNode::addComputationResultsRenderTree()
{
_computationResultsRenderProgram = new osg::Program;
_vertexShader = osgDB::readRefShaderFile(osg::Shader::VERTEX, _vertexShaderSourcePath);
_computationResultsRenderProgram->addShader(_vertexShader.get());
_geometryShader = osgDB::readRefShaderFile(osg::Shader::GEOMETRY, _geometryShaderSourcePath);
_computationResultsRenderProgram->addShader(_geometryShader.get());
_fragmentShader = osgDB::readRefShaderFile(osg::Shader::FRAGMENT, _fragmentShaderSourcePath);
_computationResultsRenderProgram->addShader(_fragmentShader.get());
_computationResultsRenderProgram->addBindAttribLocation("tex_coords", 1);
_computationResultsRenderGroup = new osg::Group;
_computationResultsRenderGroup->setDataVariance(osg::Object::DYNAMIC);
_computationResultsRenderStateSet = _computationResultsRenderGroup->getOrCreateStateSet();
_computationResultsRenderStateSet->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
osg::PointSprite *sprite = new osg::PointSprite;
int texture_unit = 0;
_computationResultsRenderStateSet->setTextureAttributeAndModes(texture_unit, sprite, osg::StateAttribute::ON);
_computationResultsRenderStateSet->setAttributeAndModes(_computationResultsRenderProgram.get(), osg::StateAttribute::ON);
_computationResultsRenderStateSet->addUniform(new osg::Uniform("particleTexture", texture_unit));
_computationResultsRenderStateSet->addUniform(new osg::Uniform("numRows", (int)NUM_ELEMENTS_X));
_computationResultsRenderStateSet->addUniform(new osg::Uniform("numCols", (int)NUM_ELEMENTS_Y));
_computationResultsRenderStateSet->setMode(GL_POINT_SMOOTH, osg::StateAttribute::ON);
_computationResultsRenderStateSet->setMode(GL_VERTEX_PROGRAM_POINT_SIZE_ARB, osg::StateAttribute::ON);
_computationResultsRenderStateSet->setMode(GL_ALPHA_TEST, osg::StateAttribute::ON);
_computationResultsRenderStateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
osg::Texture2D *tex = new osg::Texture2D();
osg::Image* particleImage = createSpotLightImage(osg::Vec4(1, 0, 0, 1), osg::Vec4(0.5, 0, 0, 0.0), 32, 0.7);
if (particleImage)
{
tex->setImage(particleImage);
}
_computationResultsRenderStateSet->setTextureAttributeAndModes(texture_unit, tex, osg::StateAttribute::ON);
osg::BlendFunc *blend = new osg::BlendFunc;
if (false) //emissive particles
{
blend->setFunction(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::ONE);
}
else
{
blend->setFunction(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
}
_computationResultsRenderStateSet->setAttributeAndModes(blend, osg::StateAttribute::ON);
osg::Depth* depth = new osg::Depth;
depth->setRange(0.0f, 0.0f);
depth->setFunction(osg::Depth::ALWAYS);
depth->setWriteMask(false);
depth->setFunction(osg::Depth::ALWAYS);
_computationResultsRenderStateSet->setAttributeAndModes(depth, osg::StateAttribute::OFF);
osg::Geode* particleGeode = new osg::Geode;
unsigned int numVertices = NUM_ELEMENTS_X*NUM_ELEMENTS_Y;
osg::Geometry* particleGeometry = new osg::Geometry;
particleGeometry->setUseDisplayList(false);
particleGeometry->setUseVertexBufferObjects(true);
osg::Vec3Array* vertexarray = new osg::Vec3Array;
osg::Vec2Array* tcoords = new osg::Vec2Array;
osg::Vec2 bottom_texcoord(0.0f, 0.0f);
osg::Vec2 dx_texcoord(1.0f / (float)(NUM_ELEMENTS_X), 0.0f);
osg::Vec2 dy_texcoord(0.0f, 1.0f / (float)(NUM_ELEMENTS_Y));
for (int i = 0; i < NUM_ELEMENTS_X; i++)
{
osg::Vec2 texcoord = bottom_texcoord + dy_texcoord*(float)i;
for (int j = 0; j < NUM_ELEMENTS_Y; j++)
{
vertexarray->push_back(osg::Vec3(texcoord.x(), texcoord.y(), 0.0));
tcoords->push_back(osg::Vec2(texcoord.x(), texcoord.y()));
texcoord += dx_texcoord;
}
}
particleGeometry->setVertexArray(vertexarray);
particleGeometry->addPrimitiveSet(new osg::DrawArrays(GL_POINTS, 0, numVertices));
particleGeometry->setTexCoordArray(0, tcoords);
//this glMemoryBarrier thing... not sure if we could better do instanced drawing? all the data is in Shader Storage Buffer..
particleGeometry->setVertexAttribArray(1, particleGeometry->getTexCoordArray(0), osg::Array::BIND_PER_VERTEX);
_computationResultsRenderGroup->addChild(particleGeode);
particleGeode->addDrawable(particleGeometry);
addChild(_computationResultsRenderGroup.get());
}
void ComputeNode::initComputingSetup()
{
_computeProgram = new osg::Program;
_DispatchCompute->setComputeGroups((NUM_ELEMENTS_X / WORK_GROUP_SIZE) <= 1 ? 1 : (NUM_ELEMENTS_X / WORK_GROUP_SIZE), (NUM_ELEMENTS_Y / WORK_GROUP_SIZE) <= 1 ? 1 : (NUM_ELEMENTS_Y / WORK_GROUP_SIZE), 1);
_computeShader = osgDB::readRefShaderFile(osg::Shader::COMPUTE, _computeShaderSourcePath);
_computeProgram->addShader(_computeShader.get());
setDataVariance(osg::Object::DYNAMIC);
osg::StateSet* statesetComputation = getOrCreateStateSet();
statesetComputation->setAttributeAndModes(_computeProgram.get());
statesetComputation->addUniform(new osg::Uniform("numCols", (int)NUM_ELEMENTS_X));
statesetComputation->addUniform(new osg::Uniform("numRows", (int)NUM_ELEMENTS_Y));
statesetComputation->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
//blocksize
int numParticles = NUM_ELEMENTS_X * NUM_ELEMENTS_Y;
const unsigned blockSize = numParticles * __numChannels * __numDataValuesPerChannel* sizeof(GLfloat);
//init all the particle data array
int idx = 0;
_data = new GLfloat[NUM_ELEMENTS_X * NUM_ELEMENTS_Y * __numChannels * __numDataValuesPerChannel];
_dataArray = new FloatArray;
//init the data array somehow, this way all is stored in one BufferObject. maybe better using multiple buffers instead? not sure what is faster and better for threading
for (int d = 0; d < __numDataValuesPerChannel; ++d)
{
for (int i = 0; i < NUM_ELEMENTS_X; ++i)
{
for (int j = 0; j < NUM_ELEMENTS_Y; ++j)
{
for (int k = 0; k < __numChannels; ++k)
{
switch (k)
{
case (RED_CHANNEL) :
{
if ((d == POSITION_NOW_OFFSET) || (d == POSITION_OLD_OFFSET) || (d == POSITION_INIT_OFFSET))//position
{
*_data = random(0.25, 0.75);
}
if ((d == VELOCITY_NOW_OFFSET) || (d == VELOCITY_OLD_OFFSET) || (d == VELOCITY_INIT_OFFSET))//velocity
{
*_data = random(-2.4, 2.4);
}
if (d == ACCELERATION_OFFSET) //acceleration
{
*_data = random(-3.0, 3.0);
}
if (d == PROPERTIES_OFFSET) //property particle mass (compute shader is computing sphere mass from radius instead)
{
*_data = random(0.2, 15.0);
}
break;
}
case (GREEN_CHANNEL) :
{
if ((d == POSITION_NOW_OFFSET) || (d == POSITION_OLD_OFFSET) || (d == POSITION_INIT_OFFSET))//position
{
*_data = random(0.25, 0.75);
}
if ((d == VELOCITY_NOW_OFFSET) || (d == VELOCITY_OLD_OFFSET) || (d == VELOCITY_INIT_OFFSET))//velocity
{
*_data = random(-2.4, 2.4);
}
if (d == ACCELERATION_OFFSET)//acceleration
{
*_data = random(-3.0, 3.0);
}
if (d == PROPERTIES_OFFSET) //property particle radius
{
*_data = random(0.07, 0.219);
}
break;
}
case (BLUE_CHANNEL) :
{
if ((d == POSITION_NOW_OFFSET) || (d == POSITION_OLD_OFFSET) || (d == POSITION_INIT_OFFSET))//position
{
*_data = random(0.25, 0.75);
}
if ((d == VELOCITY_NOW_OFFSET) || (d == VELOCITY_OLD_OFFSET) || (d == VELOCITY_INIT_OFFSET))//velocity
{
*_data = random(-2.4, 2.4);
}
if (d == ACCELERATION_OFFSET)//acceleration
{
*_data = random(-3.0, 3.0);
}
if (d == PROPERTIES_OFFSET) //place for some other property
{
*_data = random(0.0, 0.0);
}
break;
}
case (ALPHA_CHANNEL) :
{
if ((d == POSITION_NOW_OFFSET) || (d == POSITION_OLD_OFFSET) || (d == POSITION_INIT_OFFSET))//position
{
*_data = random(1.0, 1.0);
}
if ((d == VELOCITY_NOW_OFFSET) || (d == VELOCITY_OLD_OFFSET) || (d == VELOCITY_INIT_OFFSET))//velocity
{
*_data = random(-2.4, 2.4);
}
if (d == ACCELERATION_OFFSET) //acceleration
{
//*_data = random(1.0, 1.0);
*_data = random(0.0, 0.0);
}
if (d == PROPERTIES_OFFSET) //place for some other property
{
*_data = random(0.3, 0.3);
}
break;
}
}
_dataArray->push_back(*_data);
_data++;
idx++;
}
}
}
}
_ssbo = new osg::ShaderStorageBufferObject;
_dataArray->setBufferObject(_ssbo.get());
_ssbb = new osg::ShaderStorageBufferBinding(0, _dataArray.get(), 0, blockSize);
statesetComputation->setAttributeAndModes(_ssbb.get(), osg::StateAttribute::ON);
//option, do something useful with data or test the transfer speed
//_ssbb->setUpdateCallback(new ShaderStorageBufferCallback);
//adding a quad , visualizing data in buffer
addDataMonitor(osg::Vec3(0, -1, 0), osg::Vec3(SUB_PLACEMENT_OFFSET_HORIZONTAL * 0, -SUB_PLACEMENT_OFFSET_VERTICAL * -2.0, SUB_PLACEMENT_OFFSET_HORIZONTAL * 0), 1.0, RGB_CHANNEL, POSITION_NOW_OFFSET, "X,Y,Z - PositionNow", -1.0, 1.0);
//the coord from default dataset
addHelperGeometry();
addComputationResultsRenderTree();
}
//taken from osgdistorsion example for getting it nice on screen with antialiasing
osg::Node* createPrerenderSubgraph(osg::Node* subgraph, const osg::Vec4& clearColour)
{
osg::Group* prerenderNode = new osg::Group;
unsigned int tex_width = PRERENDER_WIDTH;
unsigned int tex_height = PRERENDER_HEIGHT;
osg::Texture2D* texture = new osg::Texture2D;
texture->setTextureSize(tex_width, tex_height);
texture->setInternalFormat(GL_RGBA);
texture->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR);
texture->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR);
{
osg::Camera* prerenderCamera = new osg::Camera;
prerenderCamera->setClearColor(clearColour);
prerenderCamera->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
prerenderCamera->setReferenceFrame(osg::Transform::RELATIVE_RF);
prerenderCamera->setProjectionMatrix(osg::Matrixd::identity());
prerenderCamera->setViewMatrix(osg::Matrixd::identity());
prerenderCamera->setViewport(0, 0, tex_width, tex_height);
prerenderCamera->setRenderOrder(osg::Camera::PRE_RENDER);
prerenderCamera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
prerenderCamera->attach(osg::Camera::COLOR_BUFFER0, texture, 0, 0, false, PRERENDER_ANTIALIASINGMULTISAMPLES, PRERENDER_ANTIALIASINGMULTISAMPLES);
prerenderCamera->addChild(subgraph);
prerenderNode->addChild(prerenderCamera);
}
{
osg::Geometry* polyGeom = new osg::Geometry();
polyGeom->setSupportsDisplayList(false);
osg::Vec3 origin(0.0f, 0.0f, 0.0f);
osg::Vec3 xAxis(1.0f, 0.0f, 0.0f);
osg::Vec3 yAxis(0.0f, 1.0f, 0.0f);
float height = 1024.0f;
float width = 1280.0f;
int noSteps = 3;
osg::Vec3Array* vertices = new osg::Vec3Array;
osg::Vec2Array* texcoords = new osg::Vec2Array;
osg::Vec4Array* colors = new osg::Vec4Array;
osg::Vec3 bottom = origin;
osg::Vec3 dx = xAxis*(width / ((float)(noSteps - 1)));
osg::Vec3 dy = yAxis*(height / ((float)(noSteps - 1)));
osg::Vec2 bottom_texcoord(0.0f, 0.0f);
osg::Vec2 dx_texcoord(1.0f / (float)(noSteps - 1), 0.0f);
osg::Vec2 dy_texcoord(0.0f, 1.0f / (float)(noSteps - 1));
int i, j;
for (i = 0; i < noSteps; ++i)
{
osg::Vec3 cursor = bottom + dy*(float)i;
osg::Vec2 texcoord = bottom_texcoord + dy_texcoord*(float)i;
for (j = 0; j < noSteps; ++j)
{
vertices->push_back(cursor);
texcoords->push_back(osg::Vec2((sin(texcoord.x()*osg::PI - osg::PI*0.5) + 1.0f)*0.5f, (sin(texcoord.y()*osg::PI - osg::PI*0.5) + 1.0f)*0.5f));
colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f));
cursor += dx;
texcoord += dx_texcoord;
}
}
polyGeom->setVertexArray(vertices);
polyGeom->setColorArray(colors, osg::Array::BIND_PER_VERTEX);
polyGeom->setTexCoordArray(0, texcoords);
for (i = 0; i < noSteps - 1; ++i)
{
osg::DrawElementsUShort* elements = new osg::DrawElementsUShort(osg::PrimitiveSet::QUAD_STRIP);
for (j = 0; j < noSteps; ++j)
{
elements->push_back(j + (i + 1)*noSteps);
elements->push_back(j + (i)*noSteps);
}
polyGeom->addPrimitiveSet(elements);
}
osg::StateSet* stateset = polyGeom->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON);
stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
osg::Geode* geode = new osg::Geode();
geode->addDrawable(polyGeom);
osg::Camera* nestedRenderCamera = new osg::Camera;
nestedRenderCamera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
nestedRenderCamera->setViewMatrix(osg::Matrix::identity());
nestedRenderCamera->setProjectionMatrixAsOrtho2D(0, 1280, 0, 1024);
nestedRenderCamera->setRenderOrder(osg::Camera::NESTED_RENDER);
nestedRenderCamera->addChild(geode);
prerenderNode->addChild(nestedRenderCamera);
}
return prerenderNode;
}
int main(int argc, char** argv)
{
osg::ArgumentParser arguments(&argc, argv);
osgViewer::Viewer viewer;
osg::ref_ptr<osg::Group> scene = new osg::Group;
viewer.addEventHandler(new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()));
viewer.addEventHandler(new osgViewer::StatsHandler);
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
viewer.addEventHandler(new osgViewer::ThreadingHandler);
viewer.getCamera()->setProjectionMatrixAsPerspective(60.0f, 1.33333, 0.01, 100.0);
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
viewer.setUpViewInWindow(11, 11, 800 + 11, 600 + 11);
//viewer.setUpViewOnSingleScreen(0); // !!
viewer.getCamera()->setClearColor(osg::Vec4(0.3, 0.3, 0.3, 1.0));
viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded);// we can play with threading models later
osg::ref_ptr<ComputeNode> computeNode = new ComputeNode();
computeNode->setPosition(osg::Vec3(0, 0, 0));
computeNode->setUpdateCallback(new ComputeNodeUpdateCallback(computeNode.get())); // on-the-fly reloading the shaders if shader source on disk is changed
computeNode->initComputingSetup();
scene->addChild(computeNode.get());
scene->addChild(computeNode->_computationResultsRenderGroup.get());
#ifdef PRERENDER_HIGH_QUALITY_ANTIALIASING
viewer.setSceneData(createPrerenderSubgraph(scene.get(), osg::Vec4(0.3, 0.4, 0.6, 1)));
#else
viewer.setSceneData(scene.get());
#endif
viewer.realize();
viewer.getCamera()->getGraphicsContext()->getState()->setUseModelViewAndProjectionUniforms(true);
viewer.run();
return 1;
}

View File

@@ -20,6 +20,8 @@
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osg/ContextData>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgDB/FileNameUtils>
@@ -56,18 +58,7 @@ public:
traverse(node);
}
void apply(osg::Geode& node)
{
if (!_useStateSets && node.getStateSet()) node.setStateSet(0);
for(unsigned int i = 0; i<node.getNumDrawables(); ++i)
{
process(*node.getDrawable(i));
}
traverse(node);
}
void process(osg::Drawable& drawable)
void apply(osg::Drawable& drawable)
{
if (!_useStateSets && drawable.getStateSet())
{
@@ -113,9 +104,9 @@ public:
{
if (!stateset) return;
for(unsigned int i=0; i<stateset->getNumTextureAttributeLists(); ++i)
for(unsigned int ti=0; ti<stateset->getNumTextureAttributeLists(); ++ti)
{
osg::StateAttribute* sa = stateset->getTextureAttribute(i, osg::StateAttribute::TEXTURE);
osg::StateAttribute* sa = stateset->getTextureAttribute(ti, osg::StateAttribute::TEXTURE);
osg::Texture* texture = dynamic_cast<osg::Texture*>(sa);
if (texture)
{
@@ -265,9 +256,7 @@ public:
{
OSG_NOTICE<<"Reallocating Arrays"<<std::endl;
typedef std::vector< osg::ref_ptr<osg::Array> > ArrayVector;
typedef std::vector< osg::ref_ptr<osg::Geometry> > GeometryVector;
ArrayVector newArrays;
GeometryVector newGeometries;
for(GeometryMap::iterator itr = _geometryMap.begin();
itr != _geometryMap.end();
@@ -404,8 +393,6 @@ public:
while (arguments.read("--dl")) { modifyDrawableSettings = true; useDisplayLists = true; }
while (arguments.read("-s", simplificatioRatio)) {}
while (arguments.read("--tristripper")) { useTriStripVisitor=true; }
while (arguments.read("--no-tristripper")) { useTriStripVisitor=false; }
while (arguments.read("--smoother")) { useSmoothingVisitor=true; }
while (arguments.read("--no-smoother")) { useSmoothingVisitor=false; }
@@ -437,7 +424,6 @@ public:
OSG_NOTICE<<"Running simplifier with simplification ratio="<<simplificatioRatio<<std::endl;
float maxError = 4.0f;
osgUtil::Simplifier simplifier(simplificatioRatio, maxError);
simplifier.setDoTriStrip(useTriStripVisitor);
simplifier.setSmoothing(useSmoothingVisitor);
node->accept(simplifier);
}
@@ -515,7 +501,7 @@ protected:
optimizeVertexOrder = false;
reallocateMemory = false;
modifyTextureSettings = false;
buildImageMipmaps = false;
compressImages = false;
@@ -535,22 +521,23 @@ protected:
bool optimizeVertexOrder;
bool reallocateMemory;
bool modifyTextureSettings;
bool buildImageMipmaps;
bool compressImages;
bool disableMipmaps;
};
//
//
class DatabasePagingOperation : public osg::Operation, public osgUtil::IncrementalCompileOperation::CompileCompletedCallback
{
public:
DatabasePagingOperation(const std::string& filename,
const std::string& outputFilename,
SceneGraphProcessor* sceneGraphProcessor,
SceneGraphProcessor* sceneGraphProcessor,
osgUtil::IncrementalCompileOperation* ico):
osg::Referenced(true),
Operation("DatabasePaging Operation", false),
_filename(filename),
_outputFilename(outputFilename),
@@ -560,12 +547,12 @@ public:
{
}
virtual void operator () (osg::Object* object)
virtual void operator () (osg::Object* /*object*/)
{
osg::notify(osg::NOTICE)<<"LoadAndCompileOperation "<<_filename<<std::endl;
_modelReadyToMerge = false;
_loadedModel = osgDB::readNodeFile(_filename);
_loadedModel = osgDB::readRefNodeFile(_filename);
if (_loadedModel.valid())
{
@@ -580,7 +567,7 @@ public:
if (!_outputFilename.empty())
{
OSG_NOTICE<<"Writing out file "<<_outputFilename<<std::endl;
osgDB::writeNodeFile(*_loadedModel, _outputFilename);
}
@@ -604,7 +591,7 @@ public:
osg::notify(osg::NOTICE)<<"done LoadAndCompileOperation "<<_filename<<std::endl;
}
virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* compileSet)
virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* /*compileSet*/)
{
OSG_NOTICE<<"compileCompleted"<<std::endl;
_modelReadyToMerge = true;
@@ -622,14 +609,13 @@ public:
class TexturePoolHandler : public osgGA::GUIEventHandler
{
public:
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa)
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& /*aa*/)
{
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYUP)
{
if (ea.getKey()=='r')
{
osg::Texture::getTextureObjectManager(0)->reportStats(osg::notify(osg::NOTICE));
osg::GLBufferObjectManager::getGLBufferObjectManager(0)->reportStats(osg::notify(osg::NOTICE));
osg::getOrCreateContextData(0)->reportStats(osg::notify(osg::NOTICE));
}
}
return false;
@@ -641,8 +627,7 @@ struct ReportStatsAnimationCompletedCallback : public osgGA::AnimationPathManipu
virtual void completed(const osgGA::AnimationPathManipulator*)
{
OSG_NOTICE<<"Animation completed"<<std::endl;
osg::Texture::getTextureObjectManager(0)->reportStats(osg::notify(osg::NOTICE));
osg::GLBufferObjectManager::getGLBufferObjectManager(0)->reportStats(osg::notify(osg::NOTICE));
osg::getOrCreateContextData(0)->reportStats(osg::notify(osg::NOTICE));
}
};
@@ -674,7 +659,7 @@ int main(int argc, char** argv)
{
apm->setTimeScale(animationSpeed);
apm->setAnimationCompletedCallback(new ReportStatsAnimationCompletedCallback());
unsigned int num = keyswitchManipulator->getNumMatrixManipulators();
keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
keyswitchManipulator->selectMatrixManipulator(num);
@@ -685,7 +670,7 @@ int main(int argc, char** argv)
viewer.setCameraManipulator( keyswitchManipulator.get() );
}
// set up event handlers
// set up event handlers
{
viewer.addEventHandler( new osgViewer::StatsHandler());
viewer.addEventHandler( new osgViewer::WindowSizeHandler() );
@@ -792,8 +777,8 @@ int main(int argc, char** argv)
modelIndex<fileNames.size() &&
(currentTime-timeOfLastMerge)>timeBetweenMerges)
{
std::string filename = fileNames[modelIndex++];
std::string outputFilename = outputPostfix.empty() ? std::string() : osgDB::getStrippedName(filename)+outputPostfix;
filename = fileNames[modelIndex++];
outputFilename = outputPostfix.empty() ? std::string() : osgDB::getStrippedName(filename)+outputPostfix;
databasePagingOperation = new DatabasePagingOperation(
filename,
@@ -807,7 +792,7 @@ int main(int argc, char** argv)
if (databasePagingOperation.get() && databasePagingOperation->_modelReadyToMerge)
{
OSG_NOTICE<<"Merging subgraph"<<std::endl;
timeOfLastMerge = currentTime;
group->removeChildren(0,group->getNumChildren());

View File

@@ -26,6 +26,7 @@
#include <osgDB/Registry>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgGA/TrackballManipulator>
#include <osgGA/FlightManipulator>
@@ -136,9 +137,9 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
osg::AnimationPath* animationPath = createAnimationPath(center,radius,animationLength);
osg::Group* model = new osg::Group;
osg::ref_ptr<osg::Group> model = new osg::Group;
osg::Node* glider = osgDB::readNodeFile("glider.osgt");
osg::ref_ptr<osg::Node> glider = osgDB::readRefNodeFile("glider.osgt");
if (glider)
{
const osg::BoundingSphere& bs = glider->getBound();
@@ -146,7 +147,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
float size = radius/bs.radius()*0.3f;
osg::MatrixTransform* positioned = new osg::MatrixTransform;
positioned->setDataVariance(osg::Object::STATIC);
positioned->setMatrix(osg::Matrix::translate(-bs.center())*
positioned ->setMatrix(osg::Matrix::translate(-bs.center())*
osg::Matrix::scale(size,size,size)*
osg::Matrix::rotate(osg::inDegrees(-90.0f),0.0f,0.0f,1.0f));
@@ -159,7 +160,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
model->addChild(xform);
}
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
osg::ref_ptr<osg::Node> cessna = osgDB::readRefNodeFile("cessna.osgt");
if (cessna)
{
const osg::BoundingSphere& bs = cessna->getBound();
@@ -173,26 +174,30 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
positioned->addChild(cessna);
osg::MatrixTransform* xform = new osg::MatrixTransform;
osg::ref_ptr<osg::MatrixTransform> xform = new osg::MatrixTransform;
xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0f,2.0));
xform->addChild(positioned);
model->addChild(xform);
}
return model;
#ifndef OSG_GLES2_AVAILABLE
model->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
#endif
return model.release();
}
osg::Node* createModel(bool overlay, osgSim::OverlayNode::OverlayTechnique technique)
osg::ref_ptr<osg::Group> createModel(bool overlay, osgSim::OverlayNode::OverlayTechnique technique)
{
osg::Vec3 center(0.0f,0.0f,0.0f);
float radius = 100.0f;
osg::Group* root = new osg::Group;
osg::ref_ptr<osg::Group> root = new osg::Group;
float baseHeight = center.z()-radius*0.5;
osg::Node* baseModel = createBase(osg::Vec3(center.x(), center.y(), baseHeight),radius);
osg::Node* movingModel = createMovingModel(center,radius*0.8f);
osg::ref_ptr<osg::Node> baseModel = createBase(osg::Vec3(center.x(), center.y(), baseHeight),radius);
osg::ref_ptr<osg::Node> movingModel = createMovingModel(center,radius*0.8f);
if (overlay)
{
@@ -232,14 +237,14 @@ int main( int argc, char **argv )
osgViewer::Viewer viewer;
// load the nodes from the commandline arguments.
osg::Node* model = createModel(overlay, technique);
osg::ref_ptr<osg::Group> model = createModel(overlay, technique);
if (!model)
{
return 1;
}
// tilt the scene so the default eye position is looking down on the model.
osg::MatrixTransform* rootnode = new osg::MatrixTransform;
osg::ref_ptr<osg::MatrixTransform> rootnode = new osg::MatrixTransform;
rootnode->setMatrix(osg::Matrix::rotate(osg::inDegrees(30.0f),1.0f,0.0f,0.0f));
rootnode->addChild(model);
@@ -247,6 +252,13 @@ int main( int argc, char **argv )
osgUtil::Optimizer optimzer;
optimzer.optimize(rootnode);
std::string filename;
if (arguments.read("-o",filename))
{
osgDB::writeNodeFile(*rootnode, filename);
return 1;
}
// set the scene to render
viewer.setSceneData(rootnode);

View File

@@ -317,7 +317,8 @@ public:
}
};
int main(int argc, char** argv) {
int main(int, char**)
{
osgViewer::Viewer viewer;
osgWidget::WindowManager* wm = new osgWidget::WindowManager(

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -28,6 +28,8 @@
#include <osgAnimation/BasicAnimationManager>
#include <osgAnimation/RigGeometry>
#include <osgAnimation/RigTransformHardware>
#include <osgAnimation/MorphGeometry>
#include <osgAnimation/MorphTransformHardware>
#include <osgAnimation/AnimationManagerBase>
#include <osgAnimation/BoneMapVisitor>
@@ -40,89 +42,100 @@ static unsigned int getRandomValueinRange(unsigned int v)
}
osg::ref_ptr<osg::Program> program;
osg::ref_ptr<osg::Program> CommonProgram;
// show how to override the default RigTransformHardware for customized usage
struct MyRigTransformHardware : public osgAnimation::RigTransformHardware
{
void operator()(osgAnimation::RigGeometry& geom)
int _maxmatrix;
MyRigTransformHardware() : _maxmatrix(99){}
virtual bool init(osgAnimation::RigGeometry& rig)
{
if (_needInit)
if (!init(geom))
return;
computeMatrixPaletteUniform(geom.getMatrixFromSkeletonToGeometry(), geom.getInvMatrixFromSkeletonToGeometry());
}
bool init(osgAnimation::RigGeometry& geom)
{
osg::Vec3Array* pos = dynamic_cast<osg::Vec3Array*>(geom.getVertexArray());
if (!pos) {
osg::notify(osg::WARN) << "RigTransformHardware no vertex array in the geometry " << geom.getName() << std::endl;
if(_perVertexInfluences.empty())
{
prepareData(rig);
return false;
}
if (!geom.getSkeleton()) {
osg::notify(osg::WARN) << "RigTransformHardware no skeleting set in geometry " << geom.getName() << std::endl;
if(!rig.getSkeleton())
return false;
}
osgAnimation::BoneMapVisitor mapVisitor;
geom.getSkeleton()->accept(mapVisitor);
osgAnimation::BoneMap bm = mapVisitor.getBoneMap();
rig.getSkeleton()->accept(mapVisitor);
osgAnimation::BoneMap boneMap = mapVisitor.getBoneMap();
if (!createPalette(pos->size(),bm, geom.getVertexInfluenceSet().getVertexToBoneList()))
if (!buildPalette(boneMap,rig) )
return false;
int attribIndex = 11;
int nbAttribs = getNumVertexAttrib();
osg::Geometry& source = *rig.getSourceGeometry();
osg::Vec3Array* positionSrc = dynamic_cast<osg::Vec3Array*>(source.getVertexArray());
// use a global program for all avatar
if (!program.valid()) {
program = new osg::Program;
program->setName("HardwareSkinning");
if (!_shader.valid())
_shader = osg::Shader::readShaderFile(osg::Shader::VERTEX,"shaders/skinning.vert");
if (!positionSrc)
{
OSG_WARN << "RigTransformHardware no vertex array in the geometry " << rig.getName() << std::endl;
return false;
}
if (!_shader.valid()) {
osg::notify(osg::WARN) << "RigTransformHardware can't load VertexShader" << std::endl;
// copy shallow from source geometry to rig
rig.copyFrom(source);
osg::ref_ptr<osg::Shader> vertexshader;
osg::ref_ptr<osg::StateSet> stateset = rig.getOrCreateStateSet();
if(!CommonProgram.valid())
{
CommonProgram = new osg::Program;
CommonProgram->setName("HardwareSkinning");
//set default source if _shader is not user set
if (!vertexshader.valid())
{
vertexshader = osgDB::readRefShaderFile(osg::Shader::VERTEX,"skinning.vert");
}
if (!vertexshader.valid())
{
OSG_WARN << "RigTransformHardware can't load VertexShader" << std::endl;
return false;
}
// replace max matrix by the value from uniform
{
std::string str = _shader->getShaderSource();
std::string str = vertexshader->getShaderSource();
std::string toreplace = std::string("MAX_MATRIX");
std::size_t start = str.find(toreplace);
std::stringstream ss;
ss << getMatrixPaletteUniform()->getNumElements();
str.replace(start, toreplace.size(), ss.str());
_shader->setShaderSource(str);
osg::notify(osg::INFO) << "Shader " << str << std::endl;
if (std::string::npos != start)
{
std::stringstream ss;
ss << _maxmatrix;//getMatrixPaletteUniform()->getNumElements();
str.replace(start, toreplace.size(), ss.str());
vertexshader->setShaderSource(str);
}
else
{
OSG_WARN<< "MAX_MATRIX not found in Shader! " << str << std::endl;
}
OSG_INFO << "Shader " << str << std::endl;
}
program->addShader(_shader.get());
for (int i = 0; i < nbAttribs; i++)
{
std::stringstream ss;
ss << "boneWeight" << i;
program->addBindAttribLocation(ss.str(), attribIndex + i);
osg::notify(osg::INFO) << "set vertex attrib " << ss.str() << std::endl;
}
}
for (int i = 0; i < nbAttribs; i++)
CommonProgram->addShader(vertexshader.get());
}
unsigned int nbAttribs = getNumVertexAttrib();
for (unsigned int i = 0; i < nbAttribs; i++)
{
std::stringstream ss;
ss << "boneWeight" << i;
geom.setVertexAttribArray(attribIndex + i, getVertexAttrib(i));
CommonProgram->addBindAttribLocation(ss.str(), _minAttribIndex + i);
rig.setVertexAttribArray(_minAttribIndex + i, getVertexAttrib(i));
OSG_INFO << "set vertex attrib " << ss.str() << std::endl;
}
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
ss->addUniform(getMatrixPaletteUniform());
ss->addUniform(new osg::Uniform("nbBonesPerVertex", getNumBonesPerVertex()));
ss->setAttributeAndModes(program.get());
geom.setStateSet(ss.get());
stateset->removeUniform("nbBonesPerVertex");
stateset->addUniform(new osg::Uniform("nbBonesPerVertex",_bonesPerVertex));
stateset->removeUniform("matrixPalette");
stateset->addUniform(_uniformMatrixPalette);
stateset->setAttribute(CommonProgram.get());
_needInit = false;
return true;
}
@@ -133,8 +146,9 @@ struct MyRigTransformHardware : public osgAnimation::RigTransformHardware
struct SetupRigGeometry : public osg::NodeVisitor
{
bool _hardware;
SetupRigGeometry( bool hardware = true) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), _hardware(hardware) {}
SetupRigGeometry( bool hardware = true) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), _hardware(hardware) {}
void apply(osg::Geode& geode)
{
for (unsigned int i = 0; i < geode.getNumDrawables(); i++)
@@ -142,10 +156,15 @@ struct SetupRigGeometry : public osg::NodeVisitor
}
void apply(osg::Drawable& geom)
{
if (_hardware) {
if (_hardware)
{
osgAnimation::RigGeometry* rig = dynamic_cast<osgAnimation::RigGeometry*>(&geom);
if (rig)
{
rig->setRigTransformImplementation(new MyRigTransformHardware);
osgAnimation::MorphGeometry *morph=dynamic_cast<osgAnimation::MorphGeometry*>(rig->getSourceGeometry());
if(morph)morph->setMorphTransformImplementation(new osgAnimation::MorphTransformHardware);
}
}
#if 0
@@ -169,11 +188,12 @@ osg::Group* createCharacterInstance(osg::Group* character, bool hardware)
osgAnimation::BasicAnimationManager* anim = dynamic_cast<osgAnimation::BasicAnimationManager*>(animationManager);
const osgAnimation::AnimationList& list = animationManager->getAnimationList();
int v = getRandomValueinRange(list.size());
if (list[v]->getName() == std::string("MatIpo_ipo")) {
if (list[v]->getName() == std::string("MatIpo_ipo"))
{
anim->playAnimation(list[v].get());
v = (v + 1)%list.size();
}
anim->playAnimation(list[v].get());
SetupRigGeometry switcher(hardware);
@@ -193,12 +213,15 @@ int main (int argc, char* argv[])
bool hardware = true;
int maxChar = 10;
while (psr.read("--software")) { hardware = false; }
while (psr.read("--software"))
{
hardware = false;
}
while (psr.read("--number", maxChar)) {}
osg::ref_ptr<osg::Group> root = dynamic_cast<osg::Group*>(osgDB::readNodeFiles(psr));
if (!root)
osg::ref_ptr<osg::Node> node = osgDB::readRefNodeFiles(psr);
osg::ref_ptr<osg::Group> root = dynamic_cast<osg::Group*>(node.get());
if (!root)
{
std::cout << psr.getApplicationName() <<": No data loaded" << std::endl;
return 1;
@@ -206,7 +229,7 @@ int main (int argc, char* argv[])
{
osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback());
if(!animationManager)
if(!animationManager)
{
osg::notify(osg::FATAL) << "no AnimationManagerBase found, updateCallback need to animate elements" << std::endl;
return 1;
@@ -218,13 +241,13 @@ int main (int argc, char* argv[])
// add the state manipulator
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
// add the thread model handler
viewer.addEventHandler(new osgViewer::ThreadingHandler);
// add the window size toggle handler
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
// add the stats handler
viewer.addEventHandler(new osgViewer::StatsHandler);
@@ -243,9 +266,10 @@ int main (int argc, char* argv[])
double xChar = maxChar;
double yChar = xChar * 9.0/16;
for (double i = 0.0; i < xChar; i++) {
for (double j = 0.0; j < yChar; j++) {
for (double i = 0.0; i < xChar; i++)
{
for (double j = 0.0; j < yChar; j++)
{
osg::ref_ptr<osg::Group> c = createCharacterInstance(root.get(), hardware);
osg::MatrixTransform* tr = new osg::MatrixTransform;
tr->setMatrix(osg::Matrix::translate( 2.0 * (i - xChar * .5),
@@ -257,7 +281,6 @@ int main (int argc, char* argv[])
}
std::cout << "created " << xChar * yChar << " instance" << std::endl;
return viewer.run();
}

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*
* Authors:
@@ -33,7 +33,7 @@
public:
META_Object(osgAnimation, AnimtkUpdateCallback);
AnimtkUpdateCallback()
AnimtkUpdateCallback()
{
_sampler = new osgAnimation::Vec3CubicBezierSampler;
_playing = false;
@@ -41,6 +41,7 @@
}
AnimtkUpdateCallback(const AnimtkUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
osg::Object(val, copyop),
osg::Callback(val, copyop),
osg::NodeCallback(val, copyop),
_sampler(val._sampler),
_startTime(val._startTime),
@@ -52,16 +53,16 @@
/** Callback method called by the NodeVisitor when visiting a node.*/
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
if (nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR &&
nv->getFrameStamp() &&
nv->getFrameStamp()->getFrameNumber() != _lastUpdate)
{
if (nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR &&
nv->getFrameStamp() &&
nv->getFrameStamp()->getFrameNumber() != _lastUpdate)
{
_lastUpdate = nv->getFrameStamp()->getFrameNumber();
_currentTime = osg::Timer::instance()->tick();
if (_playing && _sampler.get() && _sampler->getKeyframeContainer())
if (_playing && _sampler.get() && _sampler->getKeyframeContainer())
{
osg::MatrixTransform* transform = dynamic_cast<osg::MatrixTransform*>(node);
if (transform) {
@@ -97,7 +98,7 @@ class AnimtkStateSetUpdateCallback : public osg::StateSet::Callback
public:
META_Object(osgAnimation, AnimtkStateSetUpdateCallback);
AnimtkStateSetUpdateCallback()
AnimtkStateSetUpdateCallback()
{
_sampler = new osgAnimation::Vec4LinearSampler;
_playing = false;
@@ -106,6 +107,7 @@ public:
AnimtkStateSetUpdateCallback(const AnimtkStateSetUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
osg::Object(val, copyop),
osg::Callback(val, copyop),
osg::StateSet::Callback(val, copyop),
_sampler(val._sampler),
_startTime(val._startTime),
@@ -117,19 +119,19 @@ public:
/** Callback method called by the NodeVisitor when visiting a node.*/
virtual void operator()(osg::StateSet* state, osg::NodeVisitor* nv)
{
if (state &&
nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR &&
nv->getFrameStamp() &&
{
if (state &&
nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR &&
nv->getFrameStamp() &&
nv->getFrameStamp()->getFrameNumber() != _lastUpdate) {
_lastUpdate = nv->getFrameStamp()->getFrameNumber();
_currentTime = osg::Timer::instance()->tick();
if (_playing && _sampler.get() && _sampler->getKeyframeContainer())
if (_playing && _sampler.get() && _sampler->getKeyframeContainer())
{
osg::Material* material = dynamic_cast<osg::Material*>(state->getAttribute(osg::StateAttribute::MATERIAL));
if (material)
if (material)
{
osg::Vec4 result;
float t = osg::Timer::instance()->delta_s(_startTime, _currentTime);
@@ -155,7 +157,7 @@ public:
// This won't really give good results in any situation, but it does demonstrate
// on possible "fast" usage...
class MakePathTimeCallback: public AnimtkUpdateCallback
class MakePathTimeCallback: public AnimtkUpdateCallback
{
osg::ref_ptr<osg::Geode> _geode;
float _lastAdd;
@@ -168,11 +170,11 @@ public:
_addSeconds(0.08f) {
}
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
float t = osg::Timer::instance()->delta_s(_startTime, _currentTime);
if(_lastAdd + _addSeconds <= t && t <= 8.0f)
if(_lastAdd + _addSeconds <= t && t <= 8.0f)
{
osg::Vec3 pos;
@@ -190,7 +192,7 @@ public:
// This will give great results if you DO NOT have VSYNC enabled and can generate
// decent FPS.
class MakePathDistanceCallback: public AnimtkUpdateCallback
class MakePathDistanceCallback: public AnimtkUpdateCallback
{
osg::ref_ptr<osg::Geode> _geode;
osg::Vec3 _lastAdd;
@@ -203,7 +205,7 @@ public:
_threshold(0.5f),
_count(0) {}
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
static bool countReported = false;
@@ -215,13 +217,13 @@ public:
osg::Vec3 distance = _lastAdd - pos;
if(t <= 8.0f && distance.length() >= _threshold)
if(t <= 8.0f && distance.length() >= _threshold)
{
_geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(pos, 0.25f)));
_lastAdd = pos;
_count++;
}
else if(t > 8.0f)
else if(t > 8.0f)
{
if(!countReported) std::cout << "Created " << _count << " nodes." << std::endl;
countReported = true;
@@ -231,13 +233,13 @@ public:
}
};
osg::StateSet* setupStateSet()
osg::StateSet* setupStateSet()
{
osg::StateSet* st = new osg::StateSet();
st->setAttributeAndModes(new osg::Material(), true);
st->setMode(GL_BLEND, true);
AnimtkStateSetUpdateCallback* callback = new AnimtkStateSetUpdateCallback();
osgAnimation::Vec4KeyframeContainer* keys = callback->_sampler->getOrCreateKeyframeContainer();
keys->push_back(osgAnimation::Vec4Keyframe(0, osg::Vec4(1,0,0,1)));
@@ -248,11 +250,11 @@ osg::StateSet* setupStateSet()
keys->push_back(osgAnimation::Vec4Keyframe(10, osg::Vec4(1,0,0,1)));
callback->start();
st->setUpdateCallback(callback);
return st;
}
osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode)
osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode)
{
osg::Vec3 v[5];
@@ -300,20 +302,20 @@ osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode)
node->setUpdateCallback(callback);
osg::Geode* geode = new osg::Geode();
geode->setStateSet(setupStateSet());
geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), 2)));
node->addChild(geode);
return node;
}
int main(int argc, char** argv)
int main(int argc, char** argv)
{
osg::ArgumentParser arguments(&argc, argv);
osgViewer::Viewer viewer(arguments);
osgGA::TrackballManipulator* tbm = new osgGA::TrackballManipulator();
viewer.setCameraManipulator(tbm);

Some files were not shown because too many files have changed in this diff Show More