Commit Graph

13326 Commits

Author SHA1 Message Date
Robert Osfield
66210a6aca Fixed warning
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14689 16af8721-9629-0410-8352-f15c8da7e697
2015-02-11 19:21:27 +00:00
Robert Osfield
9fa3defb0e Added reassignment of the #version line to the first entry in the source list.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14688 16af8721-9629-0410-8352-f15c8da7e697
2015-02-11 16:41:31 +00:00
Robert Osfield
4a9f4aae9d Added GL #define for Windows build
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14687 16af8721-9629-0410-8352-f15c8da7e697
2015-02-11 09:41:15 +00:00
Robert Osfield
a676d5d37b Windows build fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14686 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 21:13:16 +00:00
Robert Osfield
06f186dc07 Added GL_LINES_ADJACENCY_EXT variants back into ObjectWraper to enable backwards compatibility.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14685 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 18:01:02 +00:00
Robert Osfield
ea7dbabda1 Change for new Program API
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14684 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 17:53:29 +00:00
Robert Osfield
b38c6258bf Added support for new #pragam(atic) shader composition to new displacement mapping technique
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14683 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 17:20:26 +00:00
Robert Osfield
b90503fdf5 Introduced new shader composition approach that utilizes #pragma requires(), #pragma import_defines() and #ifdef in GLSL to enable multiple different versions of shaders based
on defines passed in from osg::StateSet::setDefine(..).



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

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

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


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

  With the attached FFmpegDecoderAudio.cpp, audio sounds correctly.

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


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


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


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

Submitted by Marc Helbling.


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

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




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

Submitted by Marc Helbling.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14638 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:47:25 +00:00
Robert Osfield
18323ac899 Aded shaders for various combinations of layers.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14637 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:14:03 +00:00
Robert Osfield
c57e62e799 Added osgDB::readShaderFileWithFallback(..) convinience functions to make it easier to set up reading external shader files with a built in fallback.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14636 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:13:42 +00:00
Robert Osfield
f984f6032f Added support for reading Vec3 colour arrays
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14634 16af8721-9629-0410-8352-f15c8da7e697
2014-12-23 14:20:53 +00:00
Robert Osfield
5a4f962013 Changes to allow the COLLADA plugin to compile against the latest COLLADA DOM version 2.4 as well as retaining compatibility with the old 2.2 DOM.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14633 16af8721-9629-0410-8352-f15c8da7e697
2014-12-23 12:10:03 +00:00
Robert Osfield
dd650921b1 Added comment about using -DCMAKE_DISABLE_FINDPACKAGE_* command line.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14632 16af8721-9629-0410-8352-f15c8da7e697
2014-12-22 10:35:33 +00:00
Robert Osfield
73221e8682 Added doxygen comment for ref_ptr<>::release().
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14630 16af8721-9629-0410-8352-f15c8da7e697
2014-12-22 09:50:10 +00:00