From 02d0f08eb13f055719d0f5a42f9fc9d8c1e4352c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 8 Dec 2009 15:38:50 +0000 Subject: [PATCH] Added virtual declaration for a range of osg::Image method to allow easier customization. --- include/osg/Image | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/osg/Image b/include/osg/Image index f5fa39dc7..96094b50c 100644 --- a/include/osg/Image +++ b/include/osg/Image @@ -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