Fixed a bug in osg::Image::ensureDimensionsArePowerOfTwo() which only
scaled dimensions if *both* axis wern't a power of two, have fixed it to rescale if either of the axis arn't a power to two.
This commit is contained in:
parent
e4a20dfecf
commit
c16fe83d0a
@ -119,7 +119,8 @@ void Image::ensureDimensionsArePowerOfTwo()
|
|||||||
float rounded_tp2 = floorf(tp2+0.5f);
|
float rounded_tp2 = floorf(tp2+0.5f);
|
||||||
int new_t = (int)(powf(2.0f,rounded_tp2));
|
int new_t = (int)(powf(2.0f,rounded_tp2));
|
||||||
|
|
||||||
if (new_s!=_s && new_t!=_t)
|
|
||||||
|
if (new_s!=_s || new_t!=_t)
|
||||||
{
|
{
|
||||||
if (!_fileName.empty()) notify(NOTICE) << "Scaling image '"<<_fileName<<"' from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<endl;
|
if (!_fileName.empty()) notify(NOTICE) << "Scaling image '"<<_fileName<<"' from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<endl;
|
||||||
else notify(NOTICE) << "Scaling image from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<endl;
|
else notify(NOTICE) << "Scaling image from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user