Renamed instance of variables called format to pixelFormat to make a

clearer distinction between pixelFormat and internalTextureFormat.
This commit is contained in:
Robert Osfield
2003-09-22 09:13:22 +00:00
parent 6aac0f4e95
commit c2b02608d1
2 changed files with 18 additions and 18 deletions

View File

@@ -81,11 +81,11 @@ class SG_EXPORT Image : public Object
/* allocated a pixel block of specified size and type.*/
void allocateImage(int s,int t,int r,
GLenum format,GLenum type,
GLenum pixelFormat,GLenum type,
int packing=1);
/** set the image data and format.
/** set the image data and pixelFormat.
* note, when the packing value is negative (the default is -1) this method assumes
* a _packing width of 1 if the width is not a multiple of 4,
* otherwise automatically sets to _packing to 4. If a positive
@@ -93,7 +93,7 @@ class SG_EXPORT Image : public Object
*/
void setImage(int s,int t,int r,
GLint internalTextureformat,
GLenum format,GLenum type,
GLenum pixelFormat,GLenum type,
unsigned char *data,
AllocationMode mode,
int packing=1);
@@ -101,10 +101,10 @@ class SG_EXPORT Image : public Object
/** readPixels from screen at specified position and size, using glReadPixels.
* Create memory for storage if required, reuse existing pixel coords if possible.*/
void readPixels(int x,int y,int width,int height,
GLenum format,GLenum type);
GLenum pixelFormat,GLenum type);
/** read the contents of the current bound texture, handling compressed formats if present.
/** read the contents of the current bound texture, handling compressed pixelFormats if present.
* Create memory for storage if required, reuse existing pixel coords if possible.*/
void readImageFromCurrentTexture(unsigned int contextID=0);
@@ -136,7 +136,7 @@ class SG_EXPORT Image : public Object
void setInternalTextureFormat(GLint internalFormat);
inline GLint getInternalTextureFormat() const { return _internalTextureFormat; }
void setPixelFormat(GLenum format);
void setPixelFormat(GLenum pixelFormat);
inline GLenum getPixelFormat() const { return _pixelFormat; }
inline GLenum getDataType() const { return _dataType; }
@@ -201,9 +201,9 @@ class SG_EXPORT Image : public Object
static bool isPackedType(GLenum type);
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 computeNumComponents(GLenum pixelFormat);
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);
// precomputed mipmaps stuff;