Introduced SubloadCallback::generatdTextureObject() method.
This commit is contained in:
parent
297be2290a
commit
00fe3c0417
@ -87,6 +87,11 @@ class OSG_EXPORT Texture2D : public Texture
|
||||
class OSG_EXPORT SubloadCallback : public Referenced
|
||||
{
|
||||
public:
|
||||
virtual TextureObject* generateTextureObject(const Texture2D& texture, State& state) const
|
||||
{
|
||||
return osg::Texture::generateTextureObject(&texture, state.getContextID(), GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
virtual void load(const Texture2D& texture,State& state) const = 0;
|
||||
virtual void subload(const Texture2D& texture,State& state) const = 0;
|
||||
};
|
||||
|
@ -191,8 +191,7 @@ void Texture2D::apply(State& state) const
|
||||
}
|
||||
else if (_subloadCallback.valid())
|
||||
{
|
||||
|
||||
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(this, contextID,GL_TEXTURE_2D);
|
||||
_textureObjectBuffer[contextID] = textureObject = _subloadCallback->generateTextureObject(*this, state);
|
||||
|
||||
textureObject->bind();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user