Added int packing parameter to Image::readPixels(..)
This commit is contained in:
@@ -170,7 +170,7 @@ class OSG_EXPORT Image : public BufferData
|
||||
* Create memory for storage if required, reuse existing pixel coords if possible.
|
||||
*/
|
||||
virtual void readPixels(int x,int y,int width,int height,
|
||||
GLenum pixelFormat,GLenum type);
|
||||
GLenum pixelFormat, GLenum type, int packing=1);
|
||||
|
||||
|
||||
/** Read the contents of the current bound texture, handling compressed pixelFormats if present.
|
||||
|
||||
@@ -918,9 +918,9 @@ void Image::setImage(int s,int t,int r,
|
||||
}
|
||||
|
||||
void Image::readPixels(int x,int y,int width,int height,
|
||||
GLenum format,GLenum type)
|
||||
GLenum format, GLenum type, int packing)
|
||||
{
|
||||
allocateImage(width,height,1,format,type);
|
||||
allocateImage(width,height,1,format,type, packing);
|
||||
|
||||
glPixelStorei(GL_PACK_ALIGNMENT,_packing);
|
||||
glPixelStorei(GL_PACK_ROW_LENGTH,_rowLength);
|
||||
|
||||
Reference in New Issue
Block a user