From Romano Magacho, fixes to handle the subloading from Image when the

internal format changes requiring a rebuild of the texture object.
This commit is contained in:
Robert Osfield
2004-01-23 13:25:45 +00:00
parent 34bc8a2471
commit edce2211fa
7 changed files with 12 additions and 12 deletions

View File

@@ -366,7 +366,7 @@ class SG_EXPORT Texture : public osg::StateAttribute
/** Helper method which subloads images to the texture itself, but does not set or use texture binding.
* Note, do not call this method directly unless you are implementing your own Subload callback*/
void applyTexImage2D_subload(State& state, GLenum target, const Image* image, GLsizei width, GLsizei height,GLsizei numMipmapLevels) const;
void applyTexImage2D_subload(State& state, GLenum target, const Image* image, GLsizei width, GLsizei height, GLint inInternalFormat, GLsizei numMipmapLevels) const;
protected :

View File

@@ -97,7 +97,7 @@ class SG_EXPORT TextureRectangle : public Texture
void applyTexParameters(GLenum target, State& state) const;
void applyTexImage_load(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight) const;
void applyTexImage_subload(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight) const;
void applyTexImage_subload(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight, GLint& inInternalFormat) const;
// not ideal that _image is mutable, but its required since
// Image::ensureDimensionsArePowerOfTwo() can only be called

View File

@@ -98,6 +98,7 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
/** Get the whether UseFrameBlock is on or off.*/
bool getUseFrameBlock() const { return _useFrameBlock; }
Block* getFrameBlock() { return _frameBlock.get(); }
/** Set the priority of the database pager thread during the frame (i.e. while cull and draw are running.)*/
void setThreadPriorityDuringFrame(ThreadPriority duringFrame) { _threadPriorityDuringFrame = duringFrame; }