Added support for unref image data after apply in the osg::Texture*

classes.  Only unref's after all graphics context have been applied.
This commit is contained in:
Robert Osfield
2003-04-07 12:51:00 +00:00
parent 0df1b28672
commit 9f0fa75484
8 changed files with 102 additions and 5 deletions

View File

@@ -68,7 +68,8 @@ Texture::Texture():
_min_filter(LINEAR_MIPMAP_LINEAR), // trilinear
_mag_filter(LINEAR),
_maxAnisotropy(1.0f),
_useHardwareMipMapGeneration(false),
_useHardwareMipMapGeneration(true),
_unrefImageDataAfterApply(false),
_borderColor(0.0, 0.0, 0.0, 0.0),
_internalFormatMode(USE_IMAGE_DATA_FORMAT),
_internalFormat(0)
@@ -84,6 +85,7 @@ Texture::Texture(const Texture& text,const CopyOp& copyop):
_mag_filter(text._mag_filter),
_maxAnisotropy(text._maxAnisotropy),
_useHardwareMipMapGeneration(text._useHardwareMipMapGeneration),
_unrefImageDataAfterApply(text._unrefImageDataAfterApply),
_borderColor(text._borderColor),
_internalFormatMode(text._internalFormatMode),
_internalFormat(text._internalFormat)