| diff -Naur osgworks/apps/osgwbvv/osgwbvv.cpp osgworks-patched/apps/osgwbvv/osgwbvv.cpp |
| --- osgworks/apps/osgwbvv/osgwbvv.cpp 2014-05-23 22:37:00.750400000 +0400 |
| +++ osgworks-patched/apps/osgwbvv/osgwbvv.cpp 2014-06-07 18:44:33.422600000 +0400 |
| @@ -148,7 +148,7 @@ |
| } |
| if( doSphere ) |
| { |
| - const osg::BoundingSphere bs( model->getBound() ); |
| + const osg::BoundingSphere bs( (const osg::BoundingSphere&)(model->getBound()) ); |
| mt->setMatrix( osg::Matrix::translate( bs._center ) ); |
| geode->addDrawable( osgwTools::makeGeodesicSphere( bs._radius, 1 ) ); |
| |
| diff -Naur osgworks/include/osgwQuery/QueryAPI.h osgworks-patched/include/osgwQuery/QueryAPI.h |
| --- osgworks/include/osgwQuery/QueryAPI.h 2014-05-23 22:37:01.468000000 +0400 |
| +++ osgworks-patched/include/osgwQuery/QueryAPI.h 2014-06-07 17:13:58.379200000 +0400 |
| @@ -58,6 +58,48 @@ |
| # define GL_TIME_ELAPSED 0x88BF |
| #endif |
| |
| +#ifndef GLEXT_64_TYPES_DEFINED |
| +/* This code block is duplicated in glxext.h, so must be protected */ |
| +#define GLEXT_64_TYPES_DEFINED |
| +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ |
| +/* (as used in the GL_EXT_timer_query extension). */ |
| +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| +#include <inttypes.h> |
| +#elif defined(__sun__) || defined(__digital__) |
| +#include <inttypes.h> |
| +#if defined(__STDC__) |
| +#if defined(__arch64__) || defined(_LP64) |
| +typedef long int int64_t; |
| +typedef unsigned long int uint64_t; |
| +#else |
| +typedef long long int int64_t; |
| +typedef unsigned long long int uint64_t; |
| +#endif /* __arch64__ */ |
| +#endif /* __STDC__ */ |
| +#elif defined( __VMS ) || defined(__sgi) |
| +#include <inttypes.h> |
| +#elif defined(__SCO__) || defined(__USLC__) |
| +#include <stdint.h> |
| +#elif defined(__UNIXOS2__) || defined(__SOL64__) |
| +typedef long int int32_t; |
| +typedef long long int int64_t; |
| +typedef unsigned long long int uint64_t; |
| +#elif defined(_WIN32) && defined(__GNUC__) |
| +#include <stdint.h> |
| +#elif defined(_WIN32) |
| +typedef __int32 int32_t; |
| +typedef __int64 int64_t; |
| +typedef unsigned __int64 uint64_t; |
| +#else |
| +/* Fallback if nothing above works */ |
| +#include <inttypes.h> |
| +#endif |
| +#endif |
| + |
| +#ifndef GL_EXT_timer_query |
| +typedef int64_t GLint64EXT; |
| +typedef uint64_t GLuint64EXT; |
| +#endif |
| |
| namespace osgwQuery |
| { |
| diff -Naur osgworks/src/osgwMx/CameraUpdateCallback.cpp osgworks-patched/src/osgwMx/CameraUpdateCallback.cpp |
| --- osgworks/src/osgwMx/CameraUpdateCallback.cpp 2014-05-23 22:37:02.326000000 +0400 |
| +++ osgworks-patched/src/osgwMx/CameraUpdateCallback.cpp 2014-06-07 18:43:57.151200000 +0400 |
| @@ -66,7 +66,7 @@ |
| if( idx==0 ) |
| bs = cam->getChild( idx )->getBound(); |
| else |
| - bs.expandBy( cam->getChild( idx )->getBound() ); |
| + bs.expandBy( (const osg::BoundingSphere&)(cam->getChild( idx )->getBound()) ); |
| } |
| } |
| |
| diff -Naur osgworks/src/osgwQuery/QueryUtils.cpp osgworks-patched/src/osgwQuery/QueryUtils.cpp |
| --- osgworks/src/osgwQuery/QueryUtils.cpp 2014-05-23 22:37:02.419600000 +0400 |
| +++ osgworks-patched/src/osgwQuery/QueryUtils.cpp 2014-06-07 17:14:28.290600000 +0400 |
| @@ -116,7 +116,7 @@ |
| unsigned int idx; |
| for( idx=0; idx < numParents; idx++ ) |
| { |
| - osg::Group* parent = node.getParent( idx ); |
| + osg::Group* parent = node.getParent( idx )->asGroup(); |
| bool parentIsCamera = ( dynamic_cast< osg::Camera* >( parent ) != NULL ); |
| if( parentIsCamera ) |
| continue; |
| diff -Naur osgworks/src/osgwTools/CountsVisitor.cpp osgworks-patched/src/osgwTools/CountsVisitor.cpp |
| --- osgworks/src/osgwTools/CountsVisitor.cpp 2014-05-23 22:37:02.076400000 +0400 |
| +++ osgworks-patched/src/osgwTools/CountsVisitor.cpp 2014-06-07 16:22:50.522800000 +0400 |
| @@ -608,10 +608,10 @@ |
| pushStateSet( node.getStateSet() ); |
| |
| /* |
| - osg::Group* grp = node.getParent(0); |
| + osg::Group* grp = node.getParent(0)->asGroup(); |
| osg::Group* gPar = NULL; |
| if (grp) |
| - gPar = grp->getParent(0); |
| + gPar = grp->getParent(0)->asGroup(); |
| */ |
| apply( node.getStateSet() ); |
| |
| diff -Naur osgworks/src/osgwTools/InsertRemove.cpp osgworks-patched/src/osgwTools/InsertRemove.cpp |
| --- osgworks/src/osgwTools/InsertRemove.cpp 2014-05-23 22:37:02.029600000 +0400 |
| +++ osgworks-patched/src/osgwTools/InsertRemove.cpp 2014-06-07 16:27:29.380400000 +0400 |
| @@ -37,7 +37,7 @@ |
| osg::Node::ParentList::iterator it; |
| for( it = pl.begin(); it != pl.end(); it++ ) |
| { |
| - osg::Group* oldParent( *it ); |
| + osg::Group* oldParent( dynamic_cast<osg::Group*>(*it) ); |
| oldParent->addChild( newParent ); |
| oldParent->removeChild( node ); |
| } |
| @@ -68,7 +68,7 @@ |
| for( it = pl.begin(); it != pl.end(); it++ ) |
| { |
| // Remove 'node' from its parent. |
| - osg::Group* parent( *it ); |
| + osg::Group* parent( dynamic_cast<osg::Group*>(*it) ); |
| parent->removeChild( node ); |
| |
| if( asGrp != NULL ) |
| diff -Naur osgworks/src/osgwTools/NodeUtils.cpp osgworks-patched/src/osgwTools/NodeUtils.cpp |
| --- osgworks/src/osgwTools/NodeUtils.cpp 2014-05-23 22:37:01.951600000 +0400 |
| +++ osgworks-patched/src/osgwTools/NodeUtils.cpp 2014-06-07 16:28:14.046800000 +0400 |
| @@ -44,7 +44,7 @@ |
| // add the newGraph to all parents of the existingGraph, and remove existingGraph from them |
| for(unsigned int parentLoop = 0; parentLoop < parentsCopy.size(); parentLoop++) |
| { |
| - osg::Group *existingParent = parentsCopy[parentLoop]; |
| + osg::Group *existingParent = dynamic_cast<osg::Group*>(parentsCopy[parentLoop]); |
| if(existingParent) |
| { |
| existingParent->addChild(newGraph); |
| diff -Naur osgworks/src/osgwTools/Uniqifier.cpp osgworks-patched/src/osgwTools/Uniqifier.cpp |
| --- osgworks/src/osgwTools/Uniqifier.cpp 2014-05-23 22:37:01.998400000 +0400 |
| +++ osgworks-patched/src/osgwTools/Uniqifier.cpp 2014-06-07 16:29:32.364400000 +0400 |
| @@ -98,7 +98,7 @@ |
| { |
| // Make a shallow copy of sourceCandidate and replace parent 1's |
| // sourceCandidate child with the new shallow copy. |
| - uniqify( sourceCandidate, sourceCandidate->getParent( 1 ) ); |
| + uniqify( sourceCandidate, sourceCandidate->getParent( 1 )->asGroup() ); |
| |
| // sourceCandidate's parent count has now decreased by 1. |
| // Continue looping until the parent count equals 1. |