Add interface for swizzle color xform.

This commit is contained in:
castano 2008-03-05 22:35:16 +00:00
parent f5ae4c1a9a
commit 65aa7e1eaa
2 changed files with 15 additions and 0 deletions

View File

@ -305,6 +305,19 @@ void InputOptions::setLinearTransform(int channel, float w0, float w1, float w2,
//m.linearTransform.setRow(channel, w); //m.linearTransform.setRow(channel, w);
} }
void InputOptions::setSwizzleTransform(int x, int y, int z, int w)
{
nvCheck(x >= 0 && x < 3);
nvCheck(y >= 0 && y < 3);
nvCheck(z >= 0 && z < 3);
nvCheck(w >= 0 && w < 3);
// m.xswizzle = x;
// m.yswizzle = y;
// m.zswizzle = z;
// m.wswizzle = w;
}
void InputOptions::setMaxExtents(int e) void InputOptions::setMaxExtents(int e)
{ {
nvDebugCheck(e > 0); nvDebugCheck(e > 0);

View File

@ -157,6 +157,7 @@ namespace nvtt
{ {
ColorTransform_None, ColorTransform_None,
ColorTransform_Linear, ColorTransform_Linear,
ColorTransform_Swizzle
}; };
/// Extents rounding mode. /// Extents rounding mode.
@ -221,6 +222,7 @@ namespace nvtt
// Set color transforms. @@ Not implemented! // Set color transforms. @@ Not implemented!
NVTT_API void setColorTransform(ColorTransform t); NVTT_API void setColorTransform(ColorTransform t);
NVTT_API void setLinearTransform(int channel, float w0, float w1, float w2, float w3); NVTT_API void setLinearTransform(int channel, float w0, float w1, float w2, float w3);
NVTT_API void setSwizzleTransform(int x, int y, int z, int w);
// Set resizing options. // Set resizing options.
NVTT_API void setMaxExtents(int d); NVTT_API void setMaxExtents(int d);