Oh forgot to mention, I've checked in my fix to mipmap.c and am currently doing a debug build to make sure the OSG compiles fine.
On 1 July 2013 09:32, Robert Osfield <[email protected]> wrote: > Hi Ulrich, > > I feel the appropriate thing to do with this code is to remove the > assert and remove the target parameter completely. The function in > question is only ever called from the gluBuild3DMipmaps function which > really should only be called from 3D textures. > > Personally I'm not in favour of assert, much preferring checks for > validity to be done at compile where possible, of invalid values might > occur at runtime that one always checks for them so am happy to recode > to avoid use of assert, or simply removing them or replace them with > something that isn't just done on a debug build. > > Robert. > > On 30 June 2013 13:39, Ulrich Hertlein <[email protected]> wrote: >> Hi Robert, >> >> One of the latest compiler warning clean-ups broke the debug build on OS X in >> src/osg/glu/libutil/mipmap.c because of an 'assert(target == ...'. >> >> Index: src/osg/glu/libutil/mipmap.cpp >> =================================================================== >> --- src/osg/glu/libutil/mipmap.cpp (revision 13596) >> +++ src/osg/glu/libutil/mipmap.cpp (working copy) >> @@ -7427,10 +7427,12 @@ >> >> >> static void closestFit3D(GLTexImage3DProc gluTexImage3D, >> - GLenum /*target*/, GLint width, GLint height, >> GLint depth, >> + GLenum target, GLint width, GLint height, GLint >> depth, >> GLint internalFormat, GLenum format, GLenum type, >> GLint *newWidth, GLint *newHeight, GLint *newDepth) >> { >> + (void)target; // To avoid 'unused' warning in release >> + >> #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) >> GLint widthPowerOf2= nearestPower(width); >> GLint heightPowerOf2= nearestPower(height); >> >> Cheers, >> /ulrich >> >> _______________________________________________ >> osg-submissions mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >> _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
