Removed log2 and replaced the places where is was used with a new Image::computeNumberOfMipmapLevels method.

This commit is contained in:
Robert Osfield
2007-10-01 08:50:58 +00:00
parent 69eddaa7bb
commit 7086aeeebc
9 changed files with 17 additions and 10 deletions

View File

@@ -234,6 +234,7 @@ class OSG_EXPORT Image : public Object
static unsigned int computePixelSizeInBits(GLenum pixelFormat,GLenum type);
static unsigned int computeRowWidthInBytes(int width,GLenum pixelFormat,GLenum type,int packing);
static int computeNearestPowerOfTwo(int s,float bias=0.5f);
static int computeNumberOfMipmapLevels(int s,int t = 1, int r = 1);
/** Precomputed mipmaps stuff. */
typedef std::vector< unsigned int > MipmapDataType;