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:
Robert Osfield
2003-04-01 11:49:09 +00:00
parent 05820ecbe9
commit 3975fc9b01
5 changed files with 240 additions and 156 deletions

View File

@@ -194,7 +194,7 @@ class SG_EXPORT Image : public Object
static unsigned int computeNumComponents(GLenum format);
static unsigned int computePixelSizeInBits(GLenum format,GLenum type);
static unsigned int computeRowWidthInBytes(int width,GLenum format,GLenum type,int packing);
static unsigned int computeNearestPowerOfTwo(unsigned int s,float bias=0.5f);
static int computeNearestPowerOfTwo(int s,float bias=0.5f);
// precomputed mipmaps stuff;
typedef std::vector< unsigned int > MipmapDataType;