Moved the modified tag's from osg::Texture into the osg::Texture1D,2D,3D and

CubeMap classes.
This commit is contained in:
Robert Osfield
2003-04-07 09:46:06 +00:00
parent 98f691f693
commit 7e58786b11
10 changed files with 90 additions and 34 deletions

View File

@@ -201,11 +201,6 @@ class SG_EXPORT Texture : public osg::StateAttribute
return _handleList[contextID];
}
inline unsigned int& getModifiedTag(unsigned int contextID) const
{
// get the modified tag for the current contextID.
return _modifiedTag[contextID];
}
inline unsigned int& getTextureParameterDirty(unsigned int contextID) const
{
@@ -327,9 +322,6 @@ class SG_EXPORT Texture : public osg::StateAttribute
typedef buffered_value<GLuint> TextureNameList;
mutable TextureNameList _handleList;
typedef buffered_value<unsigned int> ImageModifiedTag;
mutable ImageModifiedTag _modifiedTag;
typedef buffered_value<unsigned int> TexParameterDirtyList;
mutable TexParameterDirtyList _texParametersDirtyList;

View File

@@ -50,6 +50,12 @@ class SG_EXPORT Texture1D : public Texture
/** Get the const texture image. */
inline const Image* getImage() const { return _image.get(); }
inline unsigned int& getModifiedTag(unsigned int contextID) const
{
// get the modified tag for the current contextID.
return _modifiedTag[contextID];
}
/** Set the texture width and height. If width or height are zero then
* the repsective size value is calculated from the source image sizes. */
@@ -128,6 +134,11 @@ class SG_EXPORT Texture1D : public Texture
mutable GLsizei _numMimpmapLevels;
ref_ptr<SubloadCallback> _subloadCallback;
typedef buffered_value<unsigned int> ImageModifiedTag;
mutable ImageModifiedTag _modifiedTag;
};
}

View File

@@ -50,6 +50,11 @@ class SG_EXPORT Texture2D : public Texture
/** Get the const texture image. */
inline const Image* getImage() const { return _image.get(); }
inline unsigned int& getModifiedTag(unsigned int contextID) const
{
// get the modified tag for the current contextID.
return _modifiedTag[contextID];
}
/** Set the texture width and height. If width or height are zero then
* the repsective size value is calculated from the source image sizes. */
@@ -132,6 +137,10 @@ class SG_EXPORT Texture2D : public Texture
mutable GLsizei _numMimpmapLevels;
ref_ptr<SubloadCallback> _subloadCallback;
typedef buffered_value<unsigned int> ImageModifiedTag;
mutable ImageModifiedTag _modifiedTag;
};
}

View File

@@ -48,6 +48,11 @@ class SG_EXPORT Texture3D : public Texture
/** Get the const texture image. */
inline const Image* getImage() const { return _image.get(); }
inline unsigned int& getModifiedTag(unsigned int contextID) const
{
// get the modified tag for the current contextID.
return _modifiedTag[contextID];
}
/** Set the texture width and height. If width or height are zero then
* the repsective size value is calculated from the source image sizes. */
@@ -174,6 +179,10 @@ class SG_EXPORT Texture3D : public Texture
mutable GLsizei _numMimpmapLevels;
ref_ptr<SubloadCallback> _subloadCallback;
typedef buffered_value<unsigned int> ImageModifiedTag;
mutable ImageModifiedTag _modifiedTag;
};
}

View File

@@ -61,6 +61,11 @@ class SG_EXPORT TextureCubeMap : public Texture
/** Get the const texture image for specified face. */
const Image* getImage(Face) const;
inline unsigned int& getModifiedTag(Face face,unsigned int contextID) const
{
// get the modified tag for the current contextID.
return _modifiedTag[face][contextID];
}
/** Set the texture width and height. If width or height are zero then
* the repsective size value is calculated from the source image sizes. */
@@ -159,6 +164,9 @@ class SG_EXPORT TextureCubeMap : public Texture
mutable GLsizei _numMimpmapLevels;
ref_ptr<SubloadCallback> _subloadCallback;
typedef buffered_value<unsigned int> ImageModifiedTag;
mutable ImageModifiedTag _modifiedTag[6];
};
}