Commit Graph

9213 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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