Fix errors, warnings.

pull/216/head
castano 13 years ago
parent af9ba8ae90
commit 17e01ed240

@ -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

@ -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;

Loading…
Cancel
Save