diff --git a/src/nvimage/FloatImage.cpp b/src/nvimage/FloatImage.cpp index 17dac70..996b6ea 100644 --- a/src/nvimage/FloatImage.cpp +++ b/src/nvimage/FloatImage.cpp @@ -303,30 +303,30 @@ void FloatImage::swizzle(uint baseComponent, uint r, uint g, uint b, uint a) float FloatImage::sampleNearest(uint c, float x, float y, const WrapMode wm) const { - if( wm == WrapMode_Clamp ) return sampleNearestClamp(x, y, c); - else if( wm == WrapMode_Repeat ) return sampleNearestRepeat(x, y, c); - else /*if( wm == WrapMode_Mirror )*/ return sampleNearestMirror(x, y, c); + if( wm == WrapMode_Clamp ) return sampleNearestClamp(c, x, y); + else if( wm == WrapMode_Repeat ) return sampleNearestRepeat(c, x, y); + else /*if( wm == WrapMode_Mirror )*/ return sampleNearestMirror(c, x, y); } float FloatImage::sampleLinear(uint c, float x, float y, WrapMode wm) const { - if( wm == WrapMode_Clamp ) return sampleLinearClamp(x, y, c); - else if( wm == WrapMode_Repeat ) return sampleLinearRepeat(x, y, c); - else /*if( wm == WrapMode_Mirror )*/ return sampleLinearMirror(x, y, c); + if( wm == WrapMode_Clamp ) return sampleLinearClamp(c, x, y); + else if( wm == WrapMode_Repeat ) return sampleLinearRepeat(c, x, y); + else /*if( wm == WrapMode_Mirror )*/ return sampleLinearMirror(c, x, y); } float FloatImage::sampleNearest(uint c, float x, float y, float z, WrapMode wm) const { - if( wm == WrapMode_Clamp ) return sampleNearestClamp(x, y, z, c); - else if( wm == WrapMode_Repeat ) return sampleNearestRepeat(x, y, z, c); - else /*if( wm == WrapMode_Mirror )*/ return sampleNearestMirror(x, y, z, c); + if( wm == WrapMode_Clamp ) return sampleNearestClamp(c, x, y, z); + else if( wm == WrapMode_Repeat ) return sampleNearestRepeat(c, x, y, z); + else /*if( wm == WrapMode_Mirror )*/ return sampleNearestMirror(c, x, y, z); } float FloatImage::sampleLinear(uint c, float x, float y, float z, WrapMode wm) const { - if( wm == WrapMode_Clamp ) return sampleLinearClamp(x, y, z, c); - else if( wm == WrapMode_Repeat ) return sampleLinearRepeat(x, y, z, c); - else /*if( wm == WrapMode_Mirror )*/ return sampleLinearMirror(x, y, z, c); + if( wm == WrapMode_Clamp ) return sampleLinearClamp(c, x, y, z); + else if( wm == WrapMode_Repeat ) return sampleLinearRepeat(c, x, y, z); + else /*if( wm == WrapMode_Mirror )*/ return sampleLinearMirror(c, x, y, z); } float FloatImage::sampleNearestClamp(uint c, float x, float y) const diff --git a/src/nvtt/TexImage.cpp b/src/nvtt/TexImage.cpp index 7a08593..da2789e 100644 --- a/src/nvtt/TexImage.cpp +++ b/src/nvtt/TexImage.cpp @@ -1019,9 +1019,9 @@ void TexImage::setBorder(float r, float g, float b, float a) const uint h = img->height(); const uint d = img->depth(); - for (int z = 0; z < d; z++) + for (uint z = 0; z < d; z++) { - for (int i = 0; i < w; i++) + for (uint i = 0; i < w; i++) { img->pixel(0, i, 0, z) = r; img->pixel(1, i, 0, z) = g; @@ -1034,7 +1034,7 @@ void TexImage::setBorder(float r, float g, float b, float a) img->pixel(3, i, h-1, z) = a; } - for (int i = 0; i < h; i++) + for (uint i = 0; i < h; i++) { img->pixel(0, 0, i, z) = r; img->pixel(1, 0, i, z) = g;