Added handling of resetting of the texture object format

This commit is contained in:
Robert Osfield
2009-09-27 15:14:57 +00:00
parent e59f654290
commit 1fce3c0ad1
3 changed files with 87 additions and 30 deletions

View File

@@ -975,16 +975,12 @@ class OSG_EXPORT Texture : public osg::StateAttribute
inline void setAllocated(bool allocated=true) { _allocated = allocated; }
inline void setAllocated(GLint numMipmapLevels,
void setAllocated(GLint numMipmapLevels,
GLenum internalFormat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border)
{
_allocated=true;
_profile.set(numMipmapLevels,internalFormat,width,height,depth,border);
}
GLint border);
inline bool isAllocated() const { return _allocated; }
@@ -1019,12 +1015,16 @@ class OSG_EXPORT Texture : public osg::StateAttribute
void moveToBack(TextureObject* to);
void addToBack(TextureObject* to);
void orphan(TextureObject* to);
void remove(TextureObject* to);
unsigned int size() const { return _profile._size * _numOfTextureObjects; }
bool makeSpace(unsigned int& size);
bool checkConsistency() const;
TextureObjectManager* getParent() { return _parent; }
protected:
virtual ~TextureObjectSet();
@@ -1085,6 +1085,7 @@ class OSG_EXPORT Texture : public osg::StateAttribute
void flushDeletedTextureObjects(double currentTime, double& availableTime);
void releaseTextureObject(TextureObject* to);
TextureObjectSet* getTextureObjectSet(const TextureProfile& profile);
void newFrame(osg::FrameStamp* fs);
void resetStats();