Cleanup interface. Provide mipmap filter using a separate method.
This commit is contained in:
parent
3fcf9c9773
commit
357f18c162
@ -236,11 +236,16 @@ void InputOptions::setWrapMode(WrapMode mode)
|
||||
}
|
||||
|
||||
|
||||
/// Set mipmapping options.
|
||||
void InputOptions::setMipmapping(bool generateMipmaps, MipmapFilter filter/*= MipmapFilter_Box*/, int maxLevel/*= -1*/)
|
||||
/// Set mipmap filter.
|
||||
void InputOptions::setMipmapFilter(MipmapFilter filter)
|
||||
{
|
||||
m.generateMipmaps = generateMipmaps;
|
||||
m.mipmapFilter = filter;
|
||||
}
|
||||
|
||||
/// Set mipmap generation.
|
||||
void InputOptions::setMipmapGeneration(bool enabled, int maxLevel/*= -1*/)
|
||||
{
|
||||
m.generateMipmaps = enabled;
|
||||
m.maxLevel = maxLevel;
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,8 @@ namespace nvtt
|
||||
NVTT_API void setWrapMode(WrapMode mode);
|
||||
|
||||
// Set mipmapping options.
|
||||
NVTT_API void setMipmapping(bool generateMipmaps, MipmapFilter filter = MipmapFilter_Box, int maxLevel = -1);
|
||||
NVTT_API void setMipmapFilter(MipmapFilter filter);
|
||||
NVTT_API void setMipmapGeneration(bool enabled, int maxLevel = -1);
|
||||
NVTT_API void setKaiserParameters(float width, float alpha, float stretch);
|
||||
|
||||
// Set normal map options.
|
||||
|
@ -49,9 +49,14 @@ void nvttSetInputOptionsWrapMode(NvttInputOptions * inputOptions, NvttWrapMode m
|
||||
inputOptions->setWrapMode((nvtt::WrapMode)mode);
|
||||
}
|
||||
|
||||
void nvttSetInputOptionsMipmapping(NvttInputOptions * inputOptions, NvttBoolean generateMipmaps, NvttMipmapFilter filter, int maxLevel)
|
||||
void nvttSetInputOptionsMipmapFilter(NvttInputOptions * inputOptions, NvttMipmapFilter filter)
|
||||
{
|
||||
inputOptions->setMipmapping(generateMipmaps != NVTT_False, (nvtt::MipmapFilter)filter, maxLevel);
|
||||
inputOptions->setMipmapFilter((nvtt::MipmapFilter)filter);
|
||||
}
|
||||
|
||||
void nvttSetInputOptionsMipmapGeneration(NvttInputOptions * inputOptions, NvttBoolean enabled, int maxLevel)
|
||||
{
|
||||
inputOptions->setMipmapGeneration(enabled != NVTT_False, maxLevel);
|
||||
}
|
||||
|
||||
void nvttSetInputOptionsKaiserParameters(NvttInputOptions * inputOptions, float width, float alpha, float stretch)
|
||||
|
@ -184,7 +184,8 @@ NVTT_API void nvttSetInputOptionsFormat(NvttInputOptions * inputOptions, NvttInp
|
||||
NVTT_API void nvttSetInputOptionsAlphaMode(NvttInputOptions * inputOptions, NvttAlphaMode alphaMode);
|
||||
NVTT_API void nvttSetInputOptionsGamma(NvttInputOptions * inputOptions, float inputGamma, float outputGamma);
|
||||
NVTT_API void nvttSetInputOptionsWrapMode(NvttInputOptions * inputOptions, NvttWrapMode mode);
|
||||
NVTT_API void nvttSetInputOptionsMipmapping(NvttInputOptions * inputOptions, NvttBoolean generateMipmaps, NvttMipmapFilter filter, int maxLevel);
|
||||
NVTT_API void nvttSetInputOptionsMipmapFilter(NvttInputOptions * inputOptions, NvttMipmapFilter filter);
|
||||
NVTT_API void nvttSetInputOptionsMipmapGeneration(NvttInputOptions * inputOptions, NvttBoolean enabled, int maxLevel);
|
||||
NVTT_API void nvttSetInputOptionsKaiserParameters(NvttInputOptions * inputOptions, float width, float alpha, float stretch);
|
||||
NVTT_API void nvttSetInputOptionsNormalMap(NvttInputOptions * inputOptions, NvttBoolean b);
|
||||
NVTT_API void nvttSetInputOptionsConvertToNormalMap(NvttInputOptions * inputOptions, NvttBoolean convert);
|
||||
|
@ -368,7 +368,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (noMipmaps)
|
||||
{
|
||||
inputOptions.setMipmapping(false);
|
||||
inputOptions.setMipmapGeneration(false);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user