Add interface to specify color transformations.

This commit is contained in:
castano
2007-11-16 11:52:29 +00:00
parent 5c95f5d5e6
commit 1b73dcaf7e
4 changed files with 44 additions and 2 deletions

View File

@ -83,6 +83,9 @@ void InputOptions::reset()
m.inputGamma = 2.2f;
m.outputGamma = 2.2f;
m.colorTransform = ColorTransform_None;
m.linearTransform = Matrix(identity);
m.generateMipmaps = false;
m.maxLevel = -1;
m.mipmapFilter = MipmapFilter_Box;
@ -258,3 +261,18 @@ void InputOptions::setNormalizeMipmaps(bool normalize)
{
m.normalizeMipmaps = normalize;
}
/// Set color transform.
void InputOptions::setColorTransform(ColorTransform t)
{
m.colorTransform = t;
}
// Set linear transform for the given channel.
void InputOptions::setLinearTransfrom(int channel, float w0, float w1, float w2, float w3)
{
nvCheck(channel >= 0 && channel < 4);
Vector4 w(w0, w1, w2, w3);
//m.linearTransform.setRow(channel, w);
}