Warning fixes for Clang-3.6

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15016 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-07-23 11:11:58 +00:00
parent 71c6d27b57
commit 2208303496
31 changed files with 59 additions and 119 deletions

View File

@@ -119,7 +119,6 @@ enum BufferOffset
const int __numDataValuesPerChannel = OFFSET_END;
const int __numChannels = 4;
const float __particleRenderScaleMultiplier = 0.3;
//512x512x4x7 = 7.340.032 floats in SSBO on GPU
const int NUM_ELEMENTS_X = 512;

View File

@@ -44,7 +44,6 @@
#include "broadcaster.h"
const unsigned int MAX_NUM_EVENTS = 10;
const unsigned int SWAP_BYTES_COMPARE = 0x12345678;
class CameraPacket {
public:

View File

@@ -287,4 +287,4 @@ protected:
unsigned int _currentLodNumber;
};
#endif
#endif

View File

@@ -139,10 +139,8 @@ protected:
};
DepthPeeling::CullCallback::CullCallback(unsigned int texUnit, unsigned int texWidth, unsigned int texHeight, unsigned int offsetValue) :
DepthPeeling::CullCallback::CullCallback(unsigned int texUnit, unsigned int offsetValue) :
_texUnit(texUnit),
_texWidth(texWidth),
_texHeight(texHeight),
_offsetValue(offsetValue)
{
}
@@ -317,7 +315,7 @@ void DepthPeeling::createPeeling()
// create some uniform and cull callback objects
osg::Uniform *depthOff = new osg::Uniform("depthtest", (bool)false);
osg::Uniform *depthOn = new osg::Uniform("depthtest", (bool)true);
CullCallback *ccb = new CullCallback(_texUnit, _texWidth, _texHeight, _offsetValue);
CullCallback *ccb = new CullCallback(_texUnit, _offsetValue);
// create a node for solid model rendering
osg::Group *pre_solidNode = new osg::Group;
@@ -412,7 +410,7 @@ void DepthPeeling::createPeeling()
_compositeCamera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_compositeCamera->setViewMatrix(osg::Matrix());
_compositeCamera->setProjectionMatrix(osg::Matrix::ortho2D(0, 1, 0, 1));
_compositeCamera->setCullCallback(new CullCallback(0, _texWidth, _texHeight, 0));
_compositeCamera->setCullCallback(new CullCallback(0, 0));
osg::StateSet* stateSet = _compositeCamera->getOrCreateStateSet();
stateSet->setRenderBinDetails(100, "TraversalOrderBin", osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);
_root->addChild(_compositeCamera.get());

View File

@@ -63,13 +63,11 @@ protected:
class CullCallback : public osg::NodeCallback {
public:
CullCallback(unsigned int texUnit, unsigned int texWidth, unsigned int texHeight, unsigned int offsetValue);
CullCallback(unsigned int texUnit, unsigned int offsetValue);
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
private:
unsigned int _texUnit;
unsigned int _texWidth;
unsigned int _texHeight;
unsigned int _offsetValue;
};

View File

@@ -340,10 +340,11 @@ public:
itr!=parents.end();
++itr)
{
if (typeid(*(*itr))==typeid(osg::Group))
osg::Group* parent = (*itr);
if (typeid(*parent)==typeid(osg::Group))
{
++numGroupsFound;
insertGroup = *itr;
insertGroup = parent;
}
}
if (numGroupsFound==parents.size() && numGroupsFound==1 && insertGroup)

View File

@@ -479,8 +479,6 @@ namespace ModelTwo
{
osg::Vec3 center(0.0f,0.0f,0.0f);
float radius = 100.0f;
osg::Vec3 lightPosition(center+osg::Vec3(0.0f,0.0f,radius));
// the shadower model
osg::Node* shadower = createMovingModel(center,radius*0.5f);
shadower->setNodeMask(CastsShadowTraversalMask);

View File

@@ -261,7 +261,6 @@ osg::Node* createModel()
{
osg::Vec3 center(0.0f,0.0f,0.0f);
float radius = 100.0f;
osg::Vec3 lightPosition(center+osg::Vec3(0.0f,0.0f,radius));
// the shadower model
osg::Node* shadower = createMovingModel(center,radius*0.5f);

View File

@@ -14,7 +14,6 @@
#include <osgWidget/ViewerEventHandlers>
const unsigned int MASK_2D = 0xF0000000;
const unsigned int MASK_3D = 0x0F000000;
class Notebook: public osgWidget::Box {
osg::ref_ptr<osgWidget::Box> _tabs;