ABI: Restore InputOptions::setTextureLayout(TextureType, int, int, int)
Although adding a method argument with default argument keeps API compatibility, it changes the function type. Use function overloading instead and implement the old one as a wrapper to the extended one, supplying the default argument. Fixes part of https://github.com/castano/nvidia-texture-tools/issues/259 Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
This commit is contained in:
parent
9489aed825
commit
1e33823b12
@ -124,7 +124,14 @@ void InputOptions::reset()
|
|||||||
|
|
||||||
|
|
||||||
// Setup the input image.
|
// Setup the input image.
|
||||||
void InputOptions::setTextureLayout(TextureType type, int width, int height, int depth /*= 1*/, int arraySize /*= 1*/)
|
// Overload for ABI compatibility
|
||||||
|
void InputOptions::setTextureLayout(TextureType type, int width, int height, int depth /*= 1*/)
|
||||||
|
{
|
||||||
|
setTextureLayout(type, width, height, depth, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup the input image.
|
||||||
|
void InputOptions::setTextureLayout(TextureType type, int width, int height, int depth, int arraySize)
|
||||||
{
|
{
|
||||||
// Validate arguments.
|
// Validate arguments.
|
||||||
nvCheck(width >= 0);
|
nvCheck(width >= 0);
|
||||||
|
@ -290,7 +290,9 @@ namespace nvtt
|
|||||||
NVTT_API void reset();
|
NVTT_API void reset();
|
||||||
|
|
||||||
// Setup input layout.
|
// Setup input layout.
|
||||||
NVTT_API void setTextureLayout(TextureType type, int w, int h, int d = 1, int arraySize = 1);
|
// Overload for ABI compatibility
|
||||||
|
NVTT_API void setTextureLayout(TextureType type, int w, int h, int d = 1 /*, arraysize = 1 */);
|
||||||
|
NVTT_API void setTextureLayout(TextureType type, int w, int h, int d, int arraySize);
|
||||||
NVTT_API void resetTextureLayout();
|
NVTT_API void resetTextureLayout();
|
||||||
|
|
||||||
// Set mipmap data. Copies the data.
|
// Set mipmap data. Copies the data.
|
||||||
|
Loading…
Reference in New Issue
Block a user