Improved handling of subloading.
Removed the rescalling of images in osg::Image during texture apply, moving the rescale so it is locally calculated. This solves an outstanding threading problem which occured by multiple draw threads all tried to rescale the same image at one time. Made osg::Image ptr in osg::Texture2D non mutable as it is no longer modified during apply.
This commit is contained in:
@@ -203,7 +203,7 @@ unsigned int Image::computeRowWidthInBytes(int width,GLenum format,GLenum type,i
|
||||
return (widthInBits/packingInBits + ((widthInBits%packingInBits)?1:0))*packing;
|
||||
}
|
||||
|
||||
unsigned int Image::computeNearestPowerOfTwo(unsigned int s,float bias)
|
||||
int Image::computeNearestPowerOfTwo(int s,float bias)
|
||||
{
|
||||
if ((s & (s-1))!=0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user