From 1582a3f18c419b5d80fefb2ae30a8caa889573b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Verdon?= Date: Sat, 20 Feb 2016 11:44:48 +0100 Subject: [PATCH 1/2] '_mips' is a pre-defined macro on android-mips platform, changing function parameter name to '_numMips' --- src/image.cpp | 4 ++-- src/image.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/image.cpp b/src/image.cpp index 34dcae9e..9271d6f3 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -2211,9 +2211,9 @@ namespace bgfx } } - const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _mips) + const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _numMips) { - const uint8_t numMips = _mips ? imageGetNumMips(_format, _width, _height) : 1; + const uint8_t numMips = _numMips ? imageGetNumMips(_format, _width, _height) : 1; uint32_t size = imageGetSize(_format, _width, _height, 0, false, numMips); const Memory* image = alloc(size); diff --git a/src/image.h b/src/image.h index 458d7e51..3c434ef4 100644 --- a/src/image.h +++ b/src/image.h @@ -121,7 +121,7 @@ namespace bgfx bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height); /// - const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth = 0, bool _cubeMap = false, bool _mips = false); + const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth = 0, bool _cubeMap = false, bool _numMips = false); /// void imageFree(const Memory* _memory); From b77196bd1d62b6a16703a00ccdc02b73414d377a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Verdon?= Date: Sat, 20 Feb 2016 11:54:11 +0100 Subject: [PATCH 2/2] '_generateMips' is a better name for function's 'imageAlloc' parameter --- src/image.cpp | 4 ++-- src/image.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/image.cpp b/src/image.cpp index 9271d6f3..d4bee2ec 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -2211,9 +2211,9 @@ namespace bgfx } } - const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _numMips) + const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _generateMips) { - const uint8_t numMips = _numMips ? imageGetNumMips(_format, _width, _height) : 1; + const uint8_t numMips = _generateMips ? imageGetNumMips(_format, _width, _height) : 1; uint32_t size = imageGetSize(_format, _width, _height, 0, false, numMips); const Memory* image = alloc(size); diff --git a/src/image.h b/src/image.h index 3c434ef4..ca3be386 100644 --- a/src/image.h +++ b/src/image.h @@ -121,7 +121,7 @@ namespace bgfx bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height); /// - const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth = 0, bool _cubeMap = false, bool _numMips = false); + const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth = 0, bool _cubeMap = false, bool _generateMips = false); /// void imageFree(const Memory* _memory);