Merge changes from the witness.

This commit is contained in:
castano
2011-09-28 01:45:08 +00:00
parent 95811dfdff
commit fcd296cd81
12 changed files with 109 additions and 41 deletions

View File

@ -169,6 +169,17 @@ void FloatImage::clear(uint c, float f/*= 0.0f*/)
}
}
void FloatImage::copyChannel(uint src, uint dst)
{
nvCheck(src < m_componentCount);
nvCheck(dst < m_componentCount);
const float * srcChannel = this->channel(src);
float * dstChannel = this->channel(dst);
memcpy(dstChannel, srcChannel, sizeof(float)*m_pixelCount);
}
void FloatImage::normalize(uint baseComponent)
{
nvCheck(baseComponent + 3 <= m_componentCount);