Commit Graph

11224 Commits

Author SHA1 Message Date
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
flashk
24a856fa6e
Update ReaderWriterFBX.cpp 2018-10-03 09:59:34 -07:00
flashk
79120eb994
Update fbxRMesh.cpp 2018-10-03 09:52:10 -07:00
flashk
0e2e81273b
Update fbxReader.h 2018-10-03 09:49:37 -07:00
flashk
7bcf9b4bcb
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-02 09:04:26 -07:00
Robert Osfield
594e971f6d Removed unused static variables 2018-10-02 12:30:28 +01:00
Robert Osfield
5962d2580f From Andy Skinner, Added ~GLExtensions to clear cached values for context ID 2018-10-02 12:29:30 +01:00
Konstantin S. Matveyev
abd2fa53c4 1px error in GUIEventAdapter, View, Viewer and CompositeViewer major fix 2018-10-02 10:48:26 +01:00
Robert Osfield
1985927333 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 19:11:31 +01:00
Robert Osfield
697131a39b Warning fixes 2018-09-11 15:33:55 +01:00
Laurens Voerman
583ecccd75 fix scale problem for osgText with characterSizeMode SCREEN_COORDS and _position set. 2018-09-11 11:56:59 +01:00
OpenSceneGraph git repository
0343ff7eff
Merge pull request #623 from pelicanmapping/implicit-refptr-conversion
Fixed compilation issues for implicit ref_ptr conversion OFF
2018-09-11 09:25:00 +01:00
Robert Osfield
7a4c6a8c55 Cleaned up code 2018-09-11 09:03:01 +01:00
OpenSceneGraph git repository
a9fa3cdfad
Merge pull request #622 from pelicanmapping/osgText-thread-safety-fixes
osgText: fixed thread-safety issues in Glyph and Font
2018-09-11 08:43:55 +01:00
Mathieu MARACHE
1de7b6a73e Added saving of inline Images without having the physical image file.
The can be read from and inlined image file
2018-09-11 08:35:35 +01:00
gwaldron
fac2cc46dc Fixed compilation issues for implicit ref_ptr conversion OFF 2018-09-10 13:19:42 -04:00
gwaldron
5b0d8aca57 osgText: fixed thread-safety issues in Glyph and Font 2018-09-10 08:00:41 -04:00
Konstantin S. Matveyev
e72caf957c ParticleSystem: Added support for GLES2 and upper (GL_QUADS -> GL_TRIANGLES) 2018-09-06 12:50:10 +01:00
Robert Osfield
f9f9ea6e15 Fixed memory leak with assignment of default value to ObjectSerializer 2018-09-06 11:50:21 +01:00
Robert Osfield
d1c24d54ed Fixed copy constructor 2018-09-05 18:08:04 +01:00
Robert Osfield
f9cba78ff2 Merged check against data type changes from 3.6 branch. 2018-09-05 14:12:04 +01:00
OpenSceneGraph git repository
eaffb392f3
Merge pull request #614 from jasonbeverage/sharedshaderfix
Protect the _programSet in Shader with a mutex.
2018-09-05 09:33:01 +01:00
Jason Beverage
89a5d8b513 Protect the _programSet in Shader with a mutex.
This prevents thread safety issues when Shader objects are used in
multiple programs.
2018-09-04 10:35:38 -04:00
Robert Osfield
91df3d8311 Changed the ShapeDrawable::build() methpd so that it does run when the ShadpwDrawabe is a KdTree. 2018-09-04 15:27:41 +01:00
Robert Osfield
9f1205d22d Added support for reading UTF-8 encoded of xml files 2018-09-04 12:41:36 +01:00
Robert Osfield
833756c6b7 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:36:36 +01:00
Robert Osfield
598b16b9bf Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2018-09-03 10:15:29 +01:00
Robert Osfield
dcd28ba39d Added reset of _stateset to prevent the releaseGLObjects calling release on th StateSet from the destructor 2018-09-03 09:56:37 +01:00
Thomas Hogarth
9b4b25e4f5 Merge branch 'master' of git://github.com/openscenegraph/OpenSceneGraph into topic-gles3-android
merging master
2018-08-28 15:42:25 +01:00
Thomas Hogarth
9bed712952 Merge remote-tracking branch 'upstream/master' into topic-gles3-android
merging
2018-08-28 14:25:38 +01:00
Robert Osfield
ec4b618b7a 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:22:57 +01:00
Robert Osfield
e8b56c5c97 Added settting of the PointSprite mode validity to State::initializeExtensionProcs() 2018-08-22 10:02:29 +01:00
plevy
7bd395a77d
Change GL_RGBA16F to GL_RGBA16F_ARB to fix Windows Build
Change GL_RGBA16F to  GL_RGBA16F_ARB to fix Windows build.
2018-08-21 09:38:03 -04:00
Robert Osfield
8af2ea48c2 Replaced GL_RGBA32F with GL_RGBA32F_ARB to fix Windows build 2018-08-21 09:21:11 +01:00
mp3butcher
a5a596b33b add fixe for Cubemap and TexStorage 2018-08-19 20:17:30 +02:00
mp3butcher
7685235c1d add TexStorage feature on Texture2DArray 2018-08-18 22:55:56 +02:00
mp3butcher
2c9d551452 renaming variable and remove redondant test and variable 2018-08-18 22:55:30 +02:00
mp3butcher
d9f58ff03b fix possible internalformat misregisterings (diff effective gl and osg representation) 2018-08-18 17:26:32 +01:00
Robert Osfield
d37b826a74 Refactored the glTexStorage code paths to use selectSizedInternalFormat() and move the generateAndAssignTextureObject() calls within the two useTexStorage and non TexStorage paths to ensure that the right foramts are matched when generating the texture object 2018-08-17 18:59:04 +01:00
Robert Osfield
d841170d32 Removed check as this is better outside of the function 2018-08-17 16:51:55 +01:00
Robert Osfield
71f134c64b 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:22:36 +01:00
OpenSceneGraph git repository
7328e03d23
Merge pull request #594 from mp3butcher/patch-6
Add valid sizedInternalFormats for glTexStorage path
2018-08-17 09:54:15 +01:00
OpenSceneGraph git repository
adbfd523f3
Merge pull request #596 from mp3butcher/MeshReindexation
add a bool parameter to allow forced reindexation of a mesh
2018-08-17 09:53:26 +01:00
OpenSceneGraph git repository
38cb6b3c49
Changed member variable name to be consistent with header 2018-08-17 09:22:40 +01:00
Robert Osfield
eee5d5482e Fixed memory leak associated with VertexArrayStte objects not getting released on destruction of Geometry/Drawables. 2018-08-16 19:23:17 +01:00
mp3butcher
7f12ca4389 add a bool parameter to allow forced reindexation of a mesh 2018-08-16 18:59:47 +02:00
Julien Valentin
3a604b0e10 Add valid sizedInternalFormats
Why  some much commented?
2018-08-16 18:56:25 +02:00
OpenSceneGraph git repository
22c0dc379f
Merge pull request #593 from mp3butcher/ImmutableTexture
add immutability (if available) on ImageLess TextureRectangle
2018-08-16 16:15:20 +01:00
Chris White
c3880a25b6 Remove duplication of REGISTER_WINDOWINGSYSTEMINTERFACE code
Refactor so GraphicsWindowWin32 doesn't duplicate code in
<osg/GraphicsContext>.

Also, add OSGVIEWER_EXPORT to X11WindowingSystemInterface so
X11WindowingSystemInterface examples can build on cygwin.
This change parallels that in commit 0bca415d5a.
2018-08-15 12:49:01 -04:00
mp3butcher
c2031836ee add immutability (if available) on ImageLess TextureRectangle 2018-08-11 14:10:13 +02:00
OpenSceneGraph git repository
e008784ab6
Merge pull request #586 from cxw42/cygthreads
On cygwin, don't use pthread functions that require _GNU_SOURCE in OpenThreads
2018-08-08 14:38:13 +01:00
Robert Osfield
6d0b8c4693 Tightened up the setting of the Member property of Texture attributes 2018-08-08 07:34:14 +01:00
Chris White
b4889a8c06 On cygwin, define _GNU_SOURCE in pthreads-based OpenThreads
pthread_{yield,getconcurrency,setconcurrency} are not declared in
pthread.h on cygwin with gcc 7.3.0 unless _GNU_SOURCE is defined.
2018-08-05 08:11:30 -04:00
Daniel Emminizer
985e82049f OpenFlight: Replace internal caches with osgDB::ObjectCache use. Fixes unbounded memory growth when using readNode(std::istream&, ...) method. 2018-07-31 17:06:34 +01:00
David Stephan
b630e2326b tabs to spaces 2018-07-27 14:55:02 -07:00
David Stephan
9454eb53ba added switch names to osgSim::MultiSwitch serializer 2018-07-27 14:48:10 -07:00
Thomas Hogarth
5058a9cd9c Merge branch 'master' of git://github.com/openscenegraph/OpenSceneGraph into topic-gles3-android
merge with master
2018-07-23 23:52:30 +01:00
OpenSceneGraph git repository
86bd4a4e8b
Merge branch 'master' into imagebinding3 2018-07-23 07:57:23 +01:00
Julien Valentin
39642572d2
Avoid name collision with size_t 2018-07-18 16:19:21 +02:00
Thomas Hogarth
9e288e3138 Merge branch 'master' of git://github.com/openscenegraph/OpenSceneGraph into topic-gles3-android
merge master
2018-07-10 02:09:56 +01:00
Thomas Hogarth
49e9aadbf5 Improved iOS cmake support for xcode 9.4 and cmake 3.11 2018-07-10 02:09:28 +01:00
Robert Osfield
15d9c08273 Pulled in OpenFlight/expGeometryRecords.cpp from 3.6 branch 2018-07-09 18:00:29 +01:00
Thomas Hogarth
014255bd9e Merge branch 'master' of git://github.com/openscenegraph/OpenSceneGraph into topic-gles3-android
merging with master
2018-06-29 03:08:24 +01:00
Larry-Hu
1b6a040cf0 Remove call to nonexistent member seekpos() of std::fpos in VS 2017 version 15.8 or later 2018-06-27 21:21:31 -07:00
Robert Osfield
b2087b8dd3 Replaced creation of a temporary Settings object on the heap with creation on the stack to improve performance 2018-06-27 11:07:53 +01:00
Robert Osfield
a774bd5902 Fixed relaseGLObjects() calls 2018-06-27 11:07:10 +01:00
Robert Osfield
dbcd3b0324 Added GLExtensions::isPointSpriteModeSupported to allow it to be enable for GL versions that support GL_POINT_SPRITE_ARB/GL_POINT_SPRITE_OES 2018-06-27 11:04:14 +01:00
Daniel Emminizer
a3ad6d3af9 GL_RG is now a support format in gluScaleImage(). 2018-06-27 11:04:01 +01:00
Robert Osfield
d2c2ef3ec9 Moved osg::clampProjectionMatrix() template from CullVisitor.cpp into include/osg/CullSettings to make it easier to implement custom clampProjectionMatrix callbacks 2018-06-25 20:03:50 +01:00
Laurens Voerman
10d88e0455 resolve av sync failure with ffmpeg 3.2 and up 2018-06-21 09:14:09 +02:00
Calum Robinson
334638795a Fix z near calculation for lines 2018-06-20 10:59:12 +01:00
Daniel Emminizer
3410d3a37d FLT: Missing optional attr files on textures no longer generates a console warning. 2018-06-14 14:54:34 +01:00
Robert Osfield
6b38107f45 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 14:54:09 +01:00
Robert Osfield
22e5861c0b Removed deprecated xine plugin to simplify licensing (xine plugin is GPL'd) 2018-05-31 15:12:28 +01:00
Robert Osfield
a855faeff3 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:48:54 +01:00
Philippe Renon
c0848a56bc Notify: silence warning about unused argument 2018-05-27 14:21:57 +02:00
Robert Osfield
6da45d6a73 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:03:51 +01:00
Robert Osfield
6eb6634997 Implemented StateGraph reuse in in scene graph Canera's RenderStage. 2018-05-23 14:52:24 +01:00
Robert Osfield
e5ff90e455 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:42:28 +01:00
Robert Osfield
f8dcb20437 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2018-05-23 14:38:54 +01:00
Robert Osfield
ed683678c0 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:49:00 +01:00
Thomas Hogarth
b67a7c5981 compile fix for gles3 on android, copied example folder to create gles3 android example 2018-05-23 02:01:21 +01:00
gwaldron
633e0aa20b Fix for compiling with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF 2018-05-22 12:13:37 -04:00
Robert Osfield
1b56fc1c00 Moved the rotation to before the scale 2018-05-22 09:07:06 +01:00
gwaldron
a2447c8dc0 osgText: perform pixel size computation in double-precision to prevent coordinate jitter 2018-05-21 13:26:04 -04:00
Robert Osfield
2c7d97266d Fixed typos 2018-05-21 13:19:06 +01:00
Robert Osfield
0bca415d5a 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:19:06 +01:00
Robert Osfield
76d1b85778 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:26:36 +01:00
Robert Osfield
0df03b09f9 Added GL_RED and GL_RG support to _readColor()/Image::getColor(); 2018-05-18 14:25:30 +01:00
Robert Osfield
ba766b88a8 Cleaned up the WindowingSystemInterface registration 2018-05-18 14:25:30 +01:00
Robert Osfield
ea9be189e8 Quitened down unsupport compression output when passing in a file with a non rgb extension 2018-05-18 14:25:30 +01:00
Robert Osfield
a4c8804b1b 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:05:29 +01:00
Robert Osfield
41f7efbab6 Imoroved backwards compatibility with 3.6 2018-05-14 10:47:50 +01:00
Robert Osfield
4fbaca7878 Fixed support for update and event callbacks on StateSet/Uniform/StateAttributes on View(er) Cameras. 2018-05-14 09:57:37 +01:00
Robert Osfield
71f3bad57a Renamed the counter used to enable traversal order sorting 2018-05-14 08:44:47 +01:00
Robert Osfield
75b576bf83 Improved the handling of precision 2018-05-14 08:44:47 +01:00
Robert Osfield
bc600bc9f7 Fixed crash when using ShapeDrawable with a TriangleMesh or ConvexHull shape due to missing texture coords 2018-05-13 11:53:21 +01:00
Robert Osfield
d3da2f0cd5 Build fixes for OSG_USE_REF_PTR_IMPLICIT_OUTPUT set to OFF 2018-05-13 09:34:46 +01:00
Robert Osfield
7c67059e12 Removed _traverseNumber variable that was duplicating the one in NodeVisitor base class 2018-05-13 09:29:27 +01:00
Robert Osfield
46560bd6d2 Rewrote TextBase::computeMatrix(..) computation of the scaling factor with slower but easier to understand and more robust code 2018-05-12 11:41:56 +01:00
Robert Osfield
b70ffc9b8a Moved constructors and destructors to .cpp 2018-05-11 11:15:45 +01:00
Robert Osfield
5e6b081bb0 Revert "Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging"
This reverts commit 479a4eefc5.
2018-05-11 11:13:19 +01:00
Robert Osfield
747162e5b6 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:01:50 +01:00
Robert Osfield
479a4eefc5 Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging 2018-05-11 09:01:50 +01:00
Robert Osfield
ac6eaee583 Fixed build when OSG_ENVVAR_SUPPORTED is disabled and quietened down warnings using OSG_UNUSED* macros 2018-05-10 19:00:13 +01:00
Robert Osfield
35682fd814 Fixed typo 2018-05-10 17:01:05 +01:00
Robert Osfield
8edc862962 Restructed the handling of SCREEN_COORD scaling to better handle window resizing 2018-05-05 15:48:18 +01:00
Robert Osfield
d572d78214 Added C++ specific path for calling std::map<>::erase() to avoid issues with std::map<>::erase implementation that invalidates iterators 2018-05-05 12:35:51 +01:00
Robert Osfield
863dee52e2 Replaced std::auto_ptr<> usage as it's deprecated in C++11 and will be removed in C++17 2018-05-05 12:35:51 +01:00
Daniel Emminizer
a1c8a3e8dd Text only applies GL_TEXTURE_2D modes when fixed function is available. Prevents GL3 Core Profile console spam. 2018-05-04 16:12:05 +01:00
Robert Osfield
202d893dc2 Added check for null to prevent null entries getting into the cache 2018-05-04 09:48:07 +01:00
Robert Osfield
c279aa26fb Fixed null pointer warning 2018-05-04 09:47:55 +01:00
Björn Blissing
2761bca496 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 13:15:08 +02:00
Jason Beverage
d53a74b1bb Quiet down shader compilation messages 2018-05-01 11:04:35 -04:00
Robert Osfield
b9d5e8f505 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:23:07 +01:00
Robert Osfield
52763cee76 Split up #pragma so that there only three parameters per line to aovid Intel driver bug crash 2018-04-26 09:49:35 +01:00
Robert Osfield
02f247bfa9 Renamed text.vert and text.frag to osgText_Text.vert and .frag to avoid name overlapping with user shaders. 2018-04-26 09:36:52 +01:00
Julien Valentin
ae24be56f3 add wrapper for osg::DrawIndirectBufferObject 2018-04-25 09:48:02 +01:00
Robert Osfield
e2e8e779e9 Renamed CMake variable + C++ #define to OSG_GL_CONTEXT_VERSION 2018-04-24 17:05:03 +01:00
Robert Osfield
ef3d672f8c Added OSG_GL_CONTEXT_STRING cmake variable to set include/osg/GL headers that sets Traits::glContextVersion. 2018-04-24 16:30:48 +01:00
Robert Osfield
05af4340e1 Refactored the handling of glyph and shadow alpha values to make the text and shadow clearer for fonts with narrow glyphs 2018-04-24 16:30:48 +01:00
Robert Osfield
1d431fcb3d Refactored the handling of text bounding box to provide more stable bounding box computation 2018-04-24 16:30:07 +01:00
Alberto Luaces
bc4f181d41 Fix typos and spelling. 2018-04-20 18:18:22 +02:00
Robert Osfield
0dd5230d82 Cleaned up inbludes and unused code 2018-04-20 14:01:21 +01:00
Robert Osfield
13e02d1af5 Removed osgUtil::TriStripVisitor as it is nolonger appropriate for modern OpenGL/OSG usage and bloats the osgUtil lib size by several hundred Kb. 2018-04-20 13:06:28 +01:00
Robert Osfield
6863cdee9a 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:42:31 +01:00
Robert Osfield
f1593c38d9 Removed TriStripVisitor for default set of Optimizer passes as it doesn't generate efficient scene graphs 2018-04-20 10:24:17 +01:00
Robert Osfield
37e3c428b6 Fixed the set*Binding() methods so that they assign BufferObjects when required 2018-04-19 19:46:20 +01:00
Robert Osfield
1e32282806 Fixed messages 2018-04-19 19:45:53 +01:00
Robert Osfield
0836fa602a Fixed the GLBufferObject size computation so that it takes into account padding. 2018-04-19 19:45:29 +01:00
Robert Osfield
71583b825f 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:45:21 +01:00
Robert Osfield
c9b1c234a6 Fixed the handle of boundary equalization 2018-04-18 10:02:43 +01:00
Robert Osfield
1d4f6c2543 Cleaned up includes 2018-04-17 09:20:23 +01:00
Robert Osfield
8a2e6b1eaa Removed long deprecated IntersectVisitor. 2018-04-16 19:41:53 +01:00
Robert Osfield
675702d258 Fixed Geometry::drawImplmentation() handling of VBO's to prevent them from being used when display lists are used. 2018-04-16 15:05:11 +01:00
Robert Osfield
a58f6c68d6 Replaced osgViewer::GraphicsWindow dynamic_cast as it's not neccessary. 2018-04-15 08:30:16 +01:00
Robert Osfield
e884df59c7 Pulled in latest changes from 3.6 branch 2018-04-07 18:14:57 +01:00
Robert Osfield
159f0fd584 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:05:26 +01:00
Robert Osfield
72054e6f6b Fixed warning 2018-04-06 14:49:32 +01:00
Robert Osfield
45fb5ae1aa 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:07:58 +01:00
Robert Osfield
decaf57fef Quietened down debug message output for osgText shader setup and Drawable::createVertexArrayStateImplementation 2018-04-05 14:14:49 +01:00
Robert Osfield
b92158ed33 Changed DisplaySettings::setShaderHint(..) messages to INFO 2018-04-05 12:36:24 +01:00
Philippe Renon
4672a8672c mingw: fix compile error in GraphicsWindowWin32.cpp
compilation error was introduced by msvc specific change
see bb169979a1
2018-04-05 11:21:55 +02:00
Ralf Habacker
40c24a7a49 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-04 19:04:27 +02:00
Robert Osfield
146fe3e294 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:09:43 +01:00
Robert Osfield
1f56d4905f Added focus classifiction of handling of keyboard events 2018-04-04 13:40:51 +01:00
Daniel Emminizer
10f000f043 CompositeViewer: SCROLL event now only goes to view with focus. Includes minor typo fixes. 2018-04-03 17:20:54 +01:00
OpenSceneGraph git repository
75aed8c309
Merge pull request #517 from tomhog/master
missing gles2 check
2018-04-03 15:34:20 +01:00
Robert Osfield
a34df91de7 Added a ShadowTechniue::setShadowedScene() virtual method to make it possible to implement techniques as fascades to other techniques 2018-04-03 15:29:54 +01:00
Thomas Hogarth
f1b2a4a968 missing gles2 check 2018-04-03 13:58:22 +01:00
Andreas Ekstrand
110b9e95dd 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:42:37 +01:00
Konstantin S. Matveyev
6cd00edd6c osg::Program's compileGLObjects and apply methods fixed for OSG without OSG_GL_FIXED_FUNCTION_AVAILABLE 2018-04-03 12:22:34 +01:00
Robert Osfield
b920d482c7 Removed osgShadow::ShadowVolume as it functionality isn't functional 2018-04-03 11:35:31 +01:00
Robert Osfield
5c48904626 Rewrote the handling of AutoTransform::setAutoScaleToScreen(bool) functionality so that is disabling CullingActive when switched on. 2018-04-02 18:26:26 +01:00
Robert Osfield
11230c3f0b Added __VERSION__<140 check for usage of gl_ClipVertex to avoid GL3 core profile usage issues 2018-04-02 16:21:20 +01:00
Robert Osfield
98c147ff9e Restructured merge geometry code to make it easier to follow 2018-04-02 14:08:47 +01:00
Robert Osfield
972d80daf9 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 11:44:03 +01:00
Robert Osfield
d8281257a7 Removed stray CMAkeLists.txt from TARGET_SRC list 2018-04-01 10:41:26 +01:00