Commit Graph

13756 Commits

Author SHA1 Message Date
Robert Osfield
7b34ca0a39 Added using to quieten warning 2016-04-29 10:39:57 +01:00
Robert Osfield
6cfbaa61c0 Moved the IdentifierMap from global to into osg namespace and changed to static 2016-04-27 14:21:11 +01:00
Robert Osfield
cba48de3d3 Fixed copy _readBuffer bug. 2016-04-21 14:07:22 +01:00
Robert Osfield
eb50a15b52 Fixed ShaderComposer::releaseGLObjects(State*) const method as it's const was missing.
Rewrote the ShaderComposer::releaseGLObjects() const method to pass on the releaseGLObjects() calls to any associated Program or Shader objects.
2016-04-18 20:46:45 +01:00
Robert Osfield
84618896c2 From Vladimir Chebaev, fixed handling of outline orientiation 2016-04-14 17:55:19 +01:00
Robert Osfield
8c10323154 From Vladimir Chebaev, fixed handling of outline orientiation 2016-04-14 17:46:27 +01:00
Robert Osfield
91ca25d2b8 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2016-03-31 19:22:03 +01:00
Robert Osfield
d41d92e65d added assignment of mipmap levels from source image. 2016-03-31 19:21:25 +01:00
Robert Osfield
893628971a From Sherman Wilcox, added assignment of mipmap levels from source image. 2016-03-31 17:52:29 +01:00
Robert Osfield
e6a99b5ae5 Reversed the order of some sizedInternalFormats enum entries to sync with the change in serach direction that was checked in as an earlier revision. 2016-03-31 17:12:28 +01:00
Robert Osfield
459ae5ce64 Changed the default value paramter to be consistent with the non templated version of StateSet::setTextureAttributeAndModes(..) 2016-03-29 20:24:05 +01:00
Robert Osfield
cd3831b045 Added &nl; xml control character to allow one to put newlines into a single text string in Present3D presentations 2016-03-13 09:03:44 -02:30
Robert Osfield
9d68e13567 Added support for invoked an editor defined by P3D_EDITOR or EDITOR env vars when user press 'U' in Present3D.
This feature makes it easier to editor an presentation that is already running in Present3D, once the edits are done
pressing 'u' in Present3D then loads the file again.
2016-03-11 19:41:22 +00:00
Robert Osfield
cb2af961db From Jannik Heller, Wrong function call in setTextureAttributeAndModes
"From I think that this piece of code in StateSet::setTextureAttributeAndModes is a copy&paste mistake:

            OSG_NOTICE<<"Warning: non texture attribute '"<<attribute->className()<<"' passed to setTextureAttributeAndModes(unit,attr,value), "<<std::endl;
            OSG_NOTICE<<"         assuming setAttributeAndModes(attr,value) instead."<<std::endl;
            OSG_NOTICE<<"         please change calling code to use appropriate call."<<std::endl;
            setAttribute(attribute,value);

As per the warning message it should be calling setAttributeAndModes(attribute,value); ."
2016-03-11 15:35:07 +00:00
Robert Osfield
faea95b5fb Added handling of auto stepping to ON_DEMAND handling. 2016-03-10 19:58:35 +00:00
Robert Osfield
68430ee8e5 Added a local implementation of SlideEventHandler::checkNeedToDoFrame() so that Present3D can toggle on/off the need for continuous rendering to only slides that require it,
enabling slides with no animation to sit iddle rather keeping rendering, reducing CPU/GPU overhead and saving power.
2016-03-10 16:35:08 +00:00
Robert Osfield
1f5b7855eb Added basic support for OSG_RUN_FRAME_SCHEME ON_DEMAND env var and --run-on-demand, --run-continuous to Present3D 2016-03-10 11:24:21 +00:00
Robert Osfield
f5b5202296 From Joe Thompson, "OpenSceneGraph cannot be built with Visual Studio 2008.
The file osg-OpenSceneGraph-3.4.0\include\osg\Types
typedefs int8_t, int16_t, int32_t and int64_t
These are typedefed as signed __intX in several other places.
With VS2008, this causes an error "int8_t redifined, different basic types"
Explicitly declaring them signed fixes the error."
2016-03-02 09:18:26 +00:00
Robert Osfield
92ee6de05e Changed svn reference to git 2016-03-01 20:35:58 +00:00
Robert Osfield
02625801da Updated ChangeLog 2016-03-01 20:25:33 +00:00
Robert Osfield
cd00f7b558 Fixed the make tag-run and branch-run 2016-03-01 20:24:19 +00:00
Robert Osfield
7c61acef40 Updated ChangeLog and AURHORS file 2016-03-01 19:55:01 +00:00
Robert Osfield
a1aecc024e Refactored the make tag-test, tag-run, branch-test, branch-run and ChangeLog features of the CMakeLists build system so it now supports working off git instead of subversion 2016-03-01 19:44:32 +00:00
Robert Osfield
0d1c8286a2 Updated version number for 3.5.2 dev release 2016-03-01 15:33:16 +00:00
Robert Osfield
bb79e523d4 From Konstantin Matveyev, "Two classes (with wrappers) added to osgAnimation: UpdateVec2fUniform and UpdateVec4fUniform" 2016-03-01 15:09:12 +00:00
Robert Osfield
33b838e437 From Jannik Heller, "This submission makes the osgFX::Technique traverse as a normal Group if the visitor is not a cull visitor.
As for motivation behind the change, I think it makes more sense that way because only the CullVisitor cares about rendering. Say an intersection visitor or update visitor only needs to traverse the subgraph once, not once for each pass. For these visitors there is no point in traversing the subgraph more than once, since it's exactly the same graph. Another motivation is the performance improvement had when an intersection visitor tests against a multipass Technique."

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

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

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

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

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

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

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

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

To enable recent versions of the DOM to be found in their new install locations.
2016-02-19 12:19:12 +00:00
Robert Osfield
58f940c0f1 Updated the AuthenticationDetails::HttpAuthentication enum to reflect current libcurl values 2016-02-18 19:53:36 +00:00
Robert Osfield
9bdb3f55dd Replaced (long int) with more portable (GLint64) 2016-02-18 10:57:19 +00:00
Robert Osfield
08a1c45605 From Tony Vasile, "This is a fix for the handling of OpenFlight files with switches whose children have a transformation matrix on them. It may break other things and I have only tested this with one of my models." 2016-02-18 10:04:04 +00:00
Robert Osfield
93b10f35c1 From Mourad Boufarguine, "This submission fixes typos in Uniform::getTypename() method in Uniform.cpp (missing "r" in usampler names)." 2016-02-18 09:25:48 +00:00
Robert Osfield
51136204d2 Renamed zero and one to transparentCount and opaqueCount to avoid confusion in their meaning and usage. 2016-02-18 08:50:06 +00:00
Robert Osfield
c297fd18b2 Fixed warning 2016-02-17 17:47:38 +00:00
Robert Osfield
4f36b553b3 Commented out unused functions and variable. 2016-02-17 17:44:05 +00:00
Robert Osfield
f6372f2fab Introduced a separate GLuint64 one variable to get around a 32bit build timer issue under Windows. 2016-02-17 15:59:13 +00:00
Robert Osfield
98ca24ff4e From Laurens Voerman, "a few additions in the repository (asDrawableEventCallback / asDrawableCullCallback) made this version a bit outdated,
so I get so new warnings. This update can fix those warnings."
2016-02-17 15:09:14 +00:00
Robert Osfield
67202b2662 From Romain Ouabdelkader, "This is a fix for osgText to calculate kerning and to load glyph3D with the text's font resolution.
Font::getKerning(...), Font::getGlyph3D(...) doesn't ask for a font resolution so it uses the last font resolution requested by Font:: getGlyph(...).
This can leads to different results depending of the precedent call to Font::getGlyph(...).
See http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2016-January/271952.html for more infos.

This fix adds a font resolution parameter to Font::getKerning(...), Font::getGlyph3D(...) and to the font implementations.
This was made under the base revision r15182."
2016-02-15 13:30:39 +00:00
Robert Osfield
937ef73521 From Laurens Loerman, Fix for "Visual Studio 2013 gives me a large amount (2778) of warnings about inheritance via dominace (C4250)." 2016-02-15 12:37:05 +00:00
Robert Osfield
9bde2ef631 Added support for NodeMask to osg::Drawable serializers 2016-02-11 16:25:47 +00:00
Robert Osfield
3e0435febd From Jannik Heller , GL object deletion fix.
"This submission changes deleteGLObject calls to scheduleGLObjectForDeletion, to ensure that the actual deletion happens from the correct thread (the graphics thread). This fixes the leak I reported in http://forum.openscenegraph.org/viewtopic.php?t=15567 , and possibly also http://forum.openscenegraph.org/viewtopic.php?t=15564."
2016-02-05 20:29:22 +00:00
Robert Osfield
8cefa05e3a From "Jannik Heller", I just updated to the latest commit and noticed that drawable cull callbacks were no longer working. As it turns out there was a missing implementation of the asDrawableCullCallback() and asDrawableEventCallback(), after implementing these methods everything is working as expected. 2016-02-04 20:15:14 +00:00