Skip to content

Commit

Permalink
ABI: restore InputOptions::setLinearTransform(...)
Browse files Browse the repository at this point in the history
The linear transform has never been implemented, so just add as a stub
for API/ABI compatibility.

Fixes part of castano#259

Signed-off-by: Stefan Brüns <[email protected]>
  • Loading branch information
StefanBruens committed Feb 6, 2018
1 parent 1e33823 commit 80ca029
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/nvtt/InputOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ void InputOptions::setNormalizeMipmaps(bool normalize)
m.normalizeMipmaps = normalize;
}

// Set linear transform for the given channel.
// Stub for ABI compatibily, never implemented
void InputOptions::setLinearTransform(int, float, float, float, float)
{
}

void InputOptions::setMaxExtents(int e)
{
nvDebugCheck(e > 0);
Expand Down
3 changes: 3 additions & 0 deletions src/nvtt/nvtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ namespace nvtt
NVTT_API void setNormalFilter(float sm, float medium, float big, float large);
NVTT_API void setNormalizeMipmaps(bool b);

// Set color transforms.
NVTT_API void setLinearTransform(int channel, float w0, float w1, float w2, float w3);

// Set resizing options.
NVTT_API void setMaxExtents(int d);
NVTT_API void setRoundMode(RoundMode mode);
Expand Down

0 comments on commit 80ca029

Please sign in to comment.