From Eric Sokolowsky,

"Attached is some fixes for Image::readImageFromCurrentTexture. It was
failing when used with a new Image object (some of the fields were
not set before they were used, and some were set to the wrong values).
A new optional parameter was added to give the desired data type, which
defaults to GL_UNSIGNED_BYTE, so programs should only need a recompile
to work properly."
This commit is contained in:
Robert Osfield
2006-07-06 14:02:14 +00:00
parent becbe910d3
commit 865ee4429c
2 changed files with 16 additions and 6 deletions

View File

@@ -108,7 +108,7 @@ class OSG_EXPORT Image : public Object
/** 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);
void readImageFromCurrentTexture(unsigned int contextID, bool copyMipMapsIfAvailable, GLenum type = GL_UNSIGNED_BYTE);
/** Scale image to specified size. */