Fixed warnings
This commit is contained in:
parent
9d2b1b539c
commit
9b1445d5b9
@ -254,7 +254,7 @@ osg::StateSet* setupStateSet()
|
||||
|
||||
osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode)
|
||||
{
|
||||
osg::Vec3 v[4];
|
||||
osg::Vec3 v[5];
|
||||
|
||||
v[0] = osg::Vec3( 0, 0, 0);
|
||||
v[1] = osg::Vec3(20, 40, 60);
|
||||
|
@ -44,7 +44,7 @@ protected:
|
||||
Help,
|
||||
Play,
|
||||
Next,
|
||||
Prev,
|
||||
Prev
|
||||
};
|
||||
|
||||
std::map<Binding, int> _actionKeys;
|
||||
|
@ -71,7 +71,7 @@ osg::StateSet* createState(osg::ArgumentParser& arguments)
|
||||
|
||||
if (arguments.argc()>1)
|
||||
{
|
||||
for(unsigned int i=1; i<arguments.argc(); ++i)
|
||||
for(int i=1; i<arguments.argc(); ++i)
|
||||
{
|
||||
if (preLoad)
|
||||
{
|
||||
@ -164,7 +164,7 @@ class MovieEventHandler : public osgGA::GUIEventHandler
|
||||
{
|
||||
public:
|
||||
|
||||
MovieEventHandler():_trackMouse(false),_playToggle(true) {}
|
||||
MovieEventHandler():_playToggle(true),_trackMouse(false) {}
|
||||
|
||||
void setMouseTracking(bool track) { _trackMouse = track; }
|
||||
bool getMouseTracking() const { return _trackMouse; }
|
||||
|
@ -228,12 +228,11 @@ int runApp(std::string xapp)
|
||||
|
||||
osg::notify(osg::INFO) << "char* = " << cxapp <<std::endl;
|
||||
|
||||
system(cxapp);
|
||||
return 1;
|
||||
return system(cxapp);
|
||||
}
|
||||
}
|
||||
osg::notify(osg::INFO) << "app not found!" << std::endl;
|
||||
return 0;
|
||||
return 1;
|
||||
} // end printList()
|
||||
|
||||
|
||||
|
@ -260,9 +260,9 @@ class GeometryTest : public GLMemoryTest
|
||||
{
|
||||
unsigned int numVertices = _width * _height;
|
||||
osg::Vec3Array* vertices = new osg::Vec3Array(numVertices);
|
||||
for(unsigned int j=0; j<_height; ++j)
|
||||
for(int j=0; j<_height; ++j)
|
||||
{
|
||||
for(unsigned i=0; i<_width; ++i)
|
||||
for(int i=0; i<_width; ++i)
|
||||
{
|
||||
(*vertices)[i+j*_width].set(float(i),float(j),0.0f);
|
||||
}
|
||||
@ -271,9 +271,9 @@ class GeometryTest : public GLMemoryTest
|
||||
unsigned int numIndices = (_width-1) * (_height-1) * 4;
|
||||
osg::DrawElementsUShort* quads = new osg::DrawElementsUShort(GL_QUADS);
|
||||
quads->reserve(numIndices);
|
||||
for(unsigned int j=0; j<_height-1; ++j)
|
||||
for(int j=0; j<_height-1; ++j)
|
||||
{
|
||||
for(unsigned i=0; i<_width-1; ++i)
|
||||
for(int i=0; i<_width-1; ++i)
|
||||
{
|
||||
quads->push_back(i + j*_width);
|
||||
quads->push_back(i+1 + j*_width);
|
||||
|
@ -43,7 +43,7 @@ class MovieEventHandler : public osgGA::GUIEventHandler
|
||||
{
|
||||
public:
|
||||
|
||||
MovieEventHandler():_trackMouse(false),_playToggle(true) {}
|
||||
MovieEventHandler():_playToggle(true),_trackMouse(false) {}
|
||||
|
||||
void setMouseTracking(bool track) { _trackMouse = track; }
|
||||
bool getMouseTracking() const { return _trackMouse; }
|
||||
|
@ -93,10 +93,10 @@ class ElevationLayerBlendingCallback : public osg::NodeCallback
|
||||
ElevationLayerBlendingCallback(osgFX::MultiTextureControl* mtc, const Elevations& elevations, float animationTime=4.0f):
|
||||
_previousFrame(-1),
|
||||
_previousTime(0.0),
|
||||
_animationTime(animationTime),
|
||||
_currentElevation(0.0),
|
||||
_mtc(mtc),
|
||||
_elevations(elevations),
|
||||
_animationTime(animationTime) {}
|
||||
_elevations(elevations) {}
|
||||
|
||||
/** Callback method called by the NodeVisitor when visiting a node.*/
|
||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||
|
@ -635,8 +635,8 @@ createRandomTriangles( unsigned int num )
|
||||
{
|
||||
osg::ref_ptr<osg::Geode> tris = new osg::Geode;
|
||||
|
||||
osg::StateSet* state = tris->getOrCreateStateSet();
|
||||
osg::StateSet* ss = tris->getOrCreateStateSet();
|
||||
|
||||
// Force wireframe. Many gfx cards handle this poorly.
|
||||
osg::PolygonMode* pm = new osg::PolygonMode(
|
||||
osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE );
|
||||
|
@ -484,15 +484,24 @@ osg::Node* createIsland(const osg::Vec3& center = osg::Vec3( 0,0,0 ), float radi
|
||||
osg::Image* colorMap = NULL; // osgDB::readImageFile("Images/colorMap.png");
|
||||
if ( !colorMap ) {
|
||||
|
||||
struct colorElevation { unsigned elevation; osg::Vec4ub color; }
|
||||
colorElevationMap[] = {
|
||||
0, osg::Vec4ub( 0, 128, 255, 255 ),
|
||||
8, osg::Vec4ub( 192, 192, 128, 255 ),
|
||||
32, osg::Vec4ub( 0, 255, 0, 255 ),
|
||||
128, osg::Vec4ub( 128, 128, 128, 255 ),
|
||||
192, osg::Vec4ub( 96, 96, 96, 255 ),
|
||||
255, osg::Vec4ub( 255, 255, 255, 255 ),
|
||||
256, osg::Vec4ub( 255, 255, 255, 255 ), // Guard
|
||||
struct colorElevation
|
||||
{
|
||||
colorElevation(unsigned int elev, const osg::Vec4ub& c):
|
||||
elevation(elev), color(c) {}
|
||||
|
||||
unsigned int elevation;
|
||||
osg::Vec4ub color;
|
||||
};
|
||||
|
||||
colorElevation colorElevationMap[] =
|
||||
{
|
||||
colorElevation(0, osg::Vec4ub( 0, 128, 255, 255 )),
|
||||
colorElevation(8, osg::Vec4ub( 192, 192, 128, 255 )),
|
||||
colorElevation(32, osg::Vec4ub( 0, 255, 0, 255 )),
|
||||
colorElevation(128, osg::Vec4ub( 128, 128, 128, 255 )),
|
||||
colorElevation(192, osg::Vec4ub( 96, 96, 96, 255 )),
|
||||
colorElevation(255, osg::Vec4ub( 255, 255, 255, 255 )),
|
||||
colorElevation(256, osg::Vec4ub( 255, 255, 255, 255 ))
|
||||
};
|
||||
|
||||
colorMap = new osg::Image();
|
||||
@ -560,5 +569,5 @@ osg::Node* createModel(osg::ArgumentParser& /*arguments*/)
|
||||
return createIsland();
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -125,8 +125,6 @@ public:
|
||||
if(ea.getEventType()==GUIEventAdapter::KEYDOWN)
|
||||
{
|
||||
|
||||
int key = ea.getKey() ;
|
||||
|
||||
switch( ea.getKey() )
|
||||
{
|
||||
case osgGA::GUIEventAdapter::KEY_Right:
|
||||
|
@ -183,7 +183,7 @@ void runMultiThreadReadTests(int numThreads, osg::ArgumentParser& arguments)
|
||||
typedef std::list< osg::ref_ptr<ReadThread> > ReadThreads;
|
||||
ReadThreads readThreads;
|
||||
|
||||
for(unsigned int i=0; i<numThreads; ++i)
|
||||
for(int i=0; i<numThreads; ++i)
|
||||
{
|
||||
osg::ref_ptr<ReadThread> readThread = new ReadThread;
|
||||
|
||||
|
@ -1860,8 +1860,6 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
ShadingModel shadingModel = Standard;
|
||||
|
||||
bool maximumIntensityProjection = false;
|
||||
while(arguments.read("--mip")) shadingModel = MaximumIntensityProjection;
|
||||
|
||||
bool createNormalMap = false;
|
||||
|
@ -56,7 +56,7 @@ int main(int argc, char** argv) {
|
||||
osgWidget::Widget* widget1 = new osgWidget::Widget("w1", 200.0f, 200.0f);
|
||||
osgWidget::Widget* widget2 = new osgWidget::Widget("w2", 100.0f, 100.0f);
|
||||
osgWidget::Widget* widget3 = new osgWidget::Widget("w3", 0.0f, 0.0f);
|
||||
CustomStyled* cs = new CustomStyled();
|
||||
// CustomStyled* cs = new CustomStyled();
|
||||
|
||||
// Yep.
|
||||
wm->getStyleManager()->addStyle(new osgWidget::Style("widget.style1", STYLE1));
|
||||
|
@ -89,7 +89,7 @@ int main(int argc, char** argv) {
|
||||
// Now we actually attach our two types of callbacks to the box instance. The first
|
||||
// uses the simple function signature, the second uses a bound method, passing "this"
|
||||
// as the second argument to the Callback constructor.
|
||||
Object obj;
|
||||
// Object obj;
|
||||
|
||||
static std::string data = "lol ur face!";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user