From Bob Keuhne, warning fixes under OSX

This commit is contained in:
Robert Osfield
2004-01-30 16:12:53 +00:00
parent 0199f77965
commit 407fbdb353
5 changed files with 20 additions and 11 deletions

View File

@@ -51,8 +51,8 @@ void SharedStateManager::prune()
//----------------------------------------------------------------
void SharedStateManager::share(osg::Node *node, OpenThreads::Mutex *mt)
{
const osg::Timer& timer = *osg::Timer::instance();
osg::Timer_t start_tick = timer.tick();
// const osg::Timer& timer = *osg::Timer::instance();
// osg::Timer_t start_tick = timer.tick();
mutex = mt;
apply(*node);
@@ -60,7 +60,7 @@ void SharedStateManager::share(osg::Node *node, OpenThreads::Mutex *mt)
tmpSharedStateSetList.clear();
mutex = 0;
osg::Timer_t end_tick = timer.tick();
// osg::Timer_t end_tick = timer.tick();
// std::cout << "SHARING TIME = "<<timer.delta_m(start_tick,end_tick)<<"ms"<<std::endl;
// std::cout << " _sharedStateSetList.size() = "<<_sharedStateSetList.size()<<std::endl;
// std::cout << " _sharedTextureList.size() = "<<_sharedTextureList.size()<<std::endl;

View File

@@ -43,8 +43,8 @@ class InfoLog
public:
InfoLog( Extensions* ext, const GLhandleARB handle )
{
int blen = 0; // length of buffer to allocate
int slen = 0; // strlen GL actually wrote to buffer
GLint blen = 0; // length of buffer to allocate
GLint slen = 0; // strlen GL actually wrote to buffer
ext->glGetObjectParameteriv(handle, GL_OBJECT_INFO_LOG_LENGTH_ARB , &blen);
if (blen > 1)
@@ -328,7 +328,7 @@ ProgramObject::PerContextProgObj::~PerContextProgObj()
void ProgramObject::PerContextProgObj::build()
{
int linked;
GLint linked;
_extensions->glLinkProgram( _glProgObjHandle );
_extensions->glGetObjectParameteriv(_glProgObjHandle,
@@ -520,7 +520,7 @@ ShaderObject::PerContextShaderObj::~PerContextShaderObj()
void ShaderObject::PerContextShaderObj::build()
{
int compiled;
GLint compiled;
const char* sourceText = _shadObj->getShaderSource().c_str();
_extensions->glShaderSource( _glShaderObjHandle, 1, &sourceText, NULL );

View File

@@ -227,7 +227,7 @@ public:
printf("Invalid vertices %d of %d. I1-3 %d %d %d.\n", ic, nv, i1, i2, i3);
}
if(i1>=static_cast<int>(verts.size()) || i2>=static_cast<int>(verts.size()) || i3>=static_cast<int>(verts.size())) {
printf("Invalid indices %d, %d, %d max allowed %d.\n", i1,i2,i3,verts.size());//, errm
printf("Invalid indices %d, %d, %d max allowed %d.\n", i1,i2,i3,static_cast<int>(verts.size()));//, errm
}
s1=(verts[i2]-verts[i1]); // side 1 of face
s2=(verts[i3]-verts[i2]); // side 2 of face
@@ -493,7 +493,7 @@ void CALLBACK combineCallback( GLdouble coords[3], avertex *d[4],
void CALLBACK error (GLenum errno)
{ // tess error code
const unsigned char *errm=gluErrorString(errno);
printf("tesselator error %d %s\n", errno,errm);//, errm
printf("tesselator error %d %s\n", static_cast<int>(errno),errm);//, errm
}
//==========
void _face::linkholes(const std::vector<Vec3> verts, const dwmaterial *themat, const _face *f2) const

View File

@@ -323,7 +323,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterOBJ::readNode(const std::string& fil
// toplevel group or transform
osg::Group* osg_top = NULL;
if (obj->position[0] != 0.0f || obj->position[2] != 0.0f || obj->position[2] != 0.0f) {
if (obj->position[0] != 0.0f || obj->position[1] != 0.0f || obj->position[2] != 0.0f) {
osg::MatrixTransform* xform = new osg::MatrixTransform;
// note obj_x -> osg_x,
// obj_y -> osg_z,

View File

@@ -125,7 +125,16 @@ bool DOFTransform_writeLocalData(const Object& obj, Output& fw)
{
const DOFTransform& transform = static_cast<const DOFTransform&>(obj);
fw.indent()<<"PutMatrix "<<transform.getPutMatrix()<<std::endl;
const Matrix& matrix = transform.getPutMatrix();
fw.indent()<<"PutMatrix {"<<std::endl;
fw.moveIn();
fw.indent() << matrix(0,0) << " " << matrix(0,1) << " " << matrix(0,2) << " " << matrix(0,3) << std::endl;
fw.indent() << matrix(1,0) << " " << matrix(1,1) << " " << matrix(1,2) << " " << matrix(1,3) << std::endl;
fw.indent() << matrix(2,0) << " " << matrix(2,1) << " " << matrix(2,2) << " " << matrix(2,3) << std::endl;
fw.indent() << matrix(3,0) << " " << matrix(3,1) << " " << matrix(3,2) << " " << matrix(3,3) << std::endl;
fw.indent() << "}" << std::endl;
fw.moveOut();
fw.indent()<<"minHPR "<<transform.getMinHPR()<<std::endl;
fw.indent()<<"maxHPR "<<transform.getMaxHPR()<<std::endl;