Added virtual declaration for a range of osg::Image method to allow easier customization.

This commit is contained in:
Robert Osfield
2009-12-08 15:38:50 +00:00
parent 8caf4e8c8c
commit 02d0f08eb1

View File

@@ -109,13 +109,13 @@ class OSG_EXPORT Image : public BufferData
/** Allocate a pixel block of specified size and type. */
void allocateImage(int s,int t,int r,
virtual void allocateImage(int s,int t,int r,
GLenum pixelFormat,GLenum type,
int packing=1);
/** Set the image dimensions, format and data. */
void setImage(int s,int t,int r,
virtual void setImage(int s,int t,int r,
GLint internalTextureformat,
GLenum pixelFormat,GLenum type,
unsigned char* data,
@@ -125,21 +125,21 @@ class OSG_EXPORT Image : public BufferData
/** Read pixels from current frame buffer 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,
virtual void readPixels(int x,int y,int width,int height,
GLenum pixelFormat,GLenum type);
/** 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, bool copyMipMapsIfAvailable, GLenum type = GL_UNSIGNED_BYTE);
virtual void readImageFromCurrentTexture(unsigned int contextID, bool copyMipMapsIfAvailable, GLenum type = GL_UNSIGNED_BYTE);
/** Scale image to specified size. */
void scaleImage(int s,int t,int r) { scaleImage(s,t,r, getDataType()); }
/** Scale image to specified size and with specified data type. */
void scaleImage(int s,int t,int r, GLenum newDataType);
virtual void scaleImage(int s,int t,int r, GLenum newDataType);
/** Copy a source Image into a subpart of this Image at specified position.
* Typically used to copy to an already allocated image, such as creating
@@ -148,7 +148,7 @@ class OSG_EXPORT Image : public BufferData
* accomodate the source image in its offset position.
* If source is NULL then no operation happens, this Image is left unchanged.
*/
void copySubImage(int s_offset, int t_offset, int r_offset, const osg::Image* source);
virtual void copySubImage(int s_offset, int t_offset, int r_offset, const osg::Image* source);
enum Origin