Added virtual declaration for a range of osg::Image method to allow easier customization.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user