Commit Graph

11078 Commits

Author SHA1 Message Date
Laurens Voerman
b006a7afae fix typo in header guard. 2019-05-22 09:45:58 +02:00
Laurens Voerman
3e78992cce fix typo in ReaderWriterFBX: writObject -> writeObject 2019-05-15 11:49:17 +02:00
Laurens Voerman
7a25132b33 implement readObject for all relevant readerWriters 2019-05-14 14:36:35 +02:00
Robert Osfield
22f4e44fa4 Fixed indentation 2019-04-26 10:47:15 +01:00
OpenSceneGraph git repository
5b688eb99d
Merge pull request #735 from Tlsirius/fix_fbx_hierarchy
fix fbx redundant node issue
2019-04-26 10:08:06 +01:00
Wei Lisi
a8397b1caf remove tabs 2019-04-19 13:04:35 +08:00
OpenSceneGraph git repository
3dbba705d9
Merge pull request #744 from zakalawe/master
macOS support for glVertexAttribDivisor with legacy GL
2019-04-11 12:44:11 +01:00
James Turner
0081c71cde macOS support for this extension with legacy GL
In compatibility mode (OpenGL 2.1), glVertexAttribDivisor is available
via glVertexAttribDivisorARB on macOS.
2019-04-11 09:25:15 +01:00
flashk
c0b046ead9
Update fbxRMesh.cpp 2019-04-05 14:31:21 -07:00
Wei Lisi
249a60c328 clean up 2019-03-26 22:37:50 +08:00
Wei Lisi
97ce560f72 fix fbx hierarchy issue 2019-03-26 21:01:24 +08:00
Robert Osfield
b988e690bb Added basic load and compile stats collection enabled by --stats command line. 2019-03-25 14:10:25 +00:00
Robert Osfield
50d1517833 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 14:10:25 +00:00
Robert Osfield
e0d90fb4c2 Added --NO_CULLING, --VIEW_FRSUTUM and --VIEW_FRUSTUM_SIDES/--vfs command line options for setting the Camera CullingMode value 2019-03-25 14:10:13 +00:00
OpenSceneGraph git repository
c9e2bda0d7
Merge pull request #729 from jslee02/gnu_install_dirs
Use GNUInstallDirs for library installation path
2019-03-21 07:07:47 +00:00
Jeongseok Lee
ce61fc413a Use GNUInstallDirs only for CMake >= 2.8.5 2019-03-20 08:56:17 -07:00
OpenSceneGraph git repository
3ba6f3d682
Merge pull request #725 from Capostrophic/dynamiccast
Get rid of some type conversions
2019-03-16 11:33:42 +00:00
Capostrophic
35f256a9a1 Replace redundant asCullVisitor usage with a type check 2019-03-15 18:09:13 +03:00
Capostrophic
da16693b4a Add asOccluderNode method to avoid dynamic casts in group child handling 2019-03-15 18:09:13 +03:00
Jeongseok Lee
3285bdc8d8 Use GNUInstallDirs for library installation path 2019-03-14 08:46:46 -07:00
OpenSceneGraph git repository
d3174bd36c
Merge pull request #716 from AnyOldName3/patch-2
Resolve OpenGL error caused by confusion between geometry shader implementations
2019-03-14 13:51:05 +00:00
OpenSceneGraph git repository
cad7418eb2
Merge pull request #718 from flashk/patch-10
Fix osgAnimation transform not updating in some cases
2019-03-14 11:24:19 +00:00
OpenSceneGraph git repository
7b61419891
Merge pull request #722 from Capostrophic/matrix
Avoid unnecessary matrix type conversion in osgParticle
2019-03-14 10:34:37 +00:00
Robert Osfield
f6acb80357 Removed the optional code path hack 2019-03-14 10:13:15 +00:00
Capostrophic
52fe3679a3 Add OSG_USE_FLOAT_QUAT build option to use single precision quaternions 2019-03-13 22:08:19 +03:00
Capostrophic
7c71d8dc16 Avoid unnecessary matrix type conversion in osgParticle 2019-03-10 15:51:44 +03:00
flashk
22c8c669e7
Update StackedTransform.cpp 2019-03-05 09:32:55 -08:00
Chris Djali
fbb5839298
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-02-26 17:19:06 +00:00
Robert Osfield
572e1d75a4 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2019-02-25 15:07:38 +00:00
Robert Osfield
08ea80c904 Streamline the animation path completion message 2019-02-25 15:06:54 +00:00
Daniel Trstenjak
b431c29d44 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 11:31:12 +01:00
Daniel Trstenjak
71997fa747 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 14:42:35 +01:00
OpenSceneGraph git repository
862788e14e
Merge pull request #711 from uhertlein/macos_10_14
Cleanups and support for macOS 10.14
2019-02-20 17:20:35 +00:00
OpenSceneGraph git repository
742b0607d5
Merge pull request #710 from bjornblissing/fbx-filename
Add search location for textures in FBX plugin
2019-02-20 17:17:34 +00:00
Robert Osfield
552ecb7674 Added override for broken bindings 2019-02-20 16:38:11 +00:00
Ulrich Hertlein
10af927260 Support for macOS 10.14
- 10.14 drops libstdc++
- drops support for Carbon :-)
- drops support for macOS < 10.9
2019-02-07 19:18:11 +01:00
Björn Blissing
3284d0545c 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-04 14:46:42 +01:00
Robert Osfield
070e55e8e0 Added missing {} to fix getPassed() bug introducted by previus commit 2019-01-26 18:12:19 +00:00
Daniel Trstenjak
733f78a0b4 OcclusionQueryNode: ensure a consistent value for '_passed' 2019-01-26 18:12:19 +00:00
Robert Osfield
6eb0da3a16 Introduced a QueryGeometry::getQueryResult(const osg::Camera*) method as a more informative replacedment for QueryGeometry::getNumPixels(). 2019-01-26 18:12:19 +00:00
Daniel Trstenjak
f21ca61476 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 18:12:19 +00:00
Robert Osfield
c6eb63d529 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:42:41 +00:00
Robert Osfield
276ca14376 Fixed typo 2019-01-23 08:52:44 +00:00
Robert Osfield
336791ca35 Added reset of the State::CurrentVertexArrayState() to prevent the State::_vas becoming a dangling pointer when VertexArrayState objects are deleted. 2019-01-21 17:38:40 +00:00
Robert Osfield
68e4341cb4 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:18:48 +00:00
Laurens Voerman
805e54752a clear temp objectCache in databaseRequest 2019-01-14 10:40:42 +00:00
Robert Osfield
32db852c77 Moved resizeGLObjects/releaseGLObjects out of Referenced to avoid multiple inheritance warnings 2019-01-12 11:28:25 +00:00
Robert Osfield
1c3b2d2285 Added read/writeObject() entry point to FBX plugin. 2019-01-10 09:48:03 +00:00
Robert Osfield
45872fbb68 Replaced use of heap with use of stack created ifstream to avoid potential memory leak 2019-01-09 08:43:08 +00:00
Robert Osfield
3da76932e6 Introduced use of ref_ptr<> and private destructor to tighen up memory management and avoid users attempting to inappropriately delete TexCoordRange. 2019-01-09 08:38:16 +00:00
Robert Osfield
466bbc6740 Fixed for crashes on exit associaciated with VAO usage and vairous niche usage cases 2019-01-08 19:35:37 +00:00
Robert Osfield
dd9ccbad86 Fixed crash on exit issues with osgFX, osgParticle, osgSim and the osgforest example 2019-01-08 19:35:29 +00:00
Kent
51cfa0fa26 fix readtexture issue 2019-01-07 10:38:14 +08:00
kent
32400af6c1 Merge branch 'master' of github.com:openscenegraph/OpenSceneGraph 2019-01-04 21:21:56 +08:00
Robert Osfield
7efe889537 Added use of sizeof to make code a bit more flexible 2019-01-04 08:10:15 +00:00
Robert Osfield
49cf25718c Restructured the clean up of arrays/primitives and GL objects 2019-01-04 08:08:07 +00:00
Robert Osfield
25c60dc675 Cleaned up Geometry::dirtyGLOjects() and Geometry::releaseGLObjects() 2018-12-31 12:14:26 +00:00
Robert Osfield
337f24051b 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:09:21 +00:00
Julien Valentin
dd94de3121 setup camera Read/Draw Buffer
fix flickering shadows in SingleThread
2018-12-20 08:49:38 +00:00
Robert Osfield
ab32dd859b Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2018-12-13 14:08:20 +00:00
OpenSceneGraph git repository
d090be7b49
Fixed indentation 2018-12-13 14:06:51 +00:00
OpenSceneGraph git repository
a7623e3b04
Chnaged tabs to four spaces to fix indentation 2018-12-13 14:05:31 +00:00
Dyuzz
00480d0575
add Vec3dArray* vertex output to avoid inaccuracy 2018-12-13 21:15:07 +08:00
Julien Valentin
eb22a0c26e remove dead code 2018-12-13 08:43:50 +00:00
OpenSceneGraph git repository
53b567c9a2
Merge pull request #659 from dquam/fbx_duplicate_fix
Fix duplicate geometries in FBX export.
2018-12-07 15:01:41 +00:00
Daniel Emminizer
a4b6d8afb5 osgText::String:createUTF8EncodedString() now supports 4-byte UTF-8 strings (code points over 0x100000). 2018-12-07 14:57:34 +00:00
Derek Quam
ffd5d20a69 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.
2018-11-28 14:21:37 -06:00
OpenSceneGraph git repository
3ea101df66
Merge pull request #660 from mxgrey/modernize_cmake
Create a config-file and export library targets for downstream users
2018-11-26 09:03:20 +00:00
Kent
7eab0dfc7f fix read texture fail 2018-11-23 17:52:53 +08:00
flashk
51f04fcc19
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-20 16:12:21 -08:00
Michael X. Grey
23f680ef4a Export OpenThreads target for win32 2018-11-16 12:16:31 +08:00
Michael X. Grey
ea9d61964d Fix target exporting 2018-11-15 16:38:18 +08:00
Michael X. Grey
af1be65012 Automatically generate pkgconfig files instead of using manually maintained templates 2018-11-15 14:26:41 +08:00
Michael X. Grey
b65e29badc Create a config-file and export library targets for downstream users 2018-11-14 18:28:21 +08:00
Derek Quam
0c1e938bc9 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.
2018-11-13 08:47:06 -06:00
Robert Osfield
c424a2daaa 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:30:47 +00:00
OpenSceneGraph git repository
ba7147dd95
Replaced tabs with spaces to fix indentation 2018-11-02 08:34:43 +00:00
flashk
f4c4905d9e
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-01 10:49:40 -07:00
Robert Osfield
7729d38b2b Removed reprecated C++ usage 2018-11-01 09:14:35 +00:00
Robert Osfield
bea8cd6884 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:58:39 +01:00
flashk
02e9b9b6a6
Update ReaderWriterDAE.cpp 2018-10-15 11:03:54 -07:00
flashk
3a40d93414
Update ReaderWriterDAE.cpp 2018-10-12 13:27:12 -07:00
flashk
11dfe44fb5
Update daeRMaterials.cpp 2018-10-12 13:25:13 -07:00
flashk
dbd392b8a5
Update daeReader.h 2018-10-12 13:23:23 -07:00
flashk
6455c04198
Fix crash in Collada loader
The collada loader would crash when processing effects that didn't have a technique defined.
2018-10-11 16:13:01 -07:00
OpenSceneGraph git repository
68a9eb237b
Merge pull request #642 from tehnick/fix-build-with-gcc5.x
osgViewer: fix build with GCC < 6.x
2018-10-10 18:29:24 +01:00
OpenSceneGraph git repository
b083eebb95
Merge pull request #641 from tehnick/fix-build-with-pkg-config
Fix build of gta plugin when pkg-config is used
2018-10-10 18:28:26 +01:00
Boris Pek
dbb00f6581 fix builds with case sensitive includes
Tested during cross-compilation for MS Windows using MinGW.
2018-10-10 02:33:47 +03:00
Robert Osfield
81998b0e65 Fixed buld 2018-10-10 13:12:07 +01:00
Antoine Lavenant
e8ceebcf57 fix apply once 2018-10-10 08:31:30 +02:00
Boris Pek
129761ea99 fix build of gta plugin when pkg-config is used
+ update related variable for build without pkg-config

Tested during cross-compilation for MS Windows using MinGW.
2018-10-10 02:06:28 +03:00
Boris Pek
b5fa3653fe osgViewer: fix build with GCC < 6.x
Tested during cross-compilation for MS Windows using MinGW.
2018-10-10 02:00:35 +03:00
Antoine Lavenant
ede5bdbbc7 fix compil 2018-10-09 14:50:20 +02:00
Antoine Lavenant
a8aa7896a4 fix precision numeric for stl writer 2018-10-09 14:02:44 +02:00
OpenSceneGraph git repository
712f468d52
Merge pull request #633 from flashk/patch-5
Fix for HDR DDS images
2018-10-04 08:54:11 +01:00
OpenSceneGraph git repository
dbf63e3fcc
Merge pull request #632 from flashk/patch-4
osgDB::OutputStream write array optimization
2018-10-04 08:53:28 +01:00
OpenSceneGraph git repository
0a6f2be9a9
Merge pull request #631 from flashk/patch-3
Fix for GifImageStream::setReferenceTime
2018-10-04 08:52:33 +01:00
flashk
aba6524ff4
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-03 14:21:03 -07:00
flashk
0891424610
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-03 14:12:54 -07:00
flashk
0a37744a54
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-03 11:32:10 -07:00