Added support for setting the texture subload width and height within
osg::Texture. The values default to 0, and in this state they are sizes of the glTexSubImage2D are taken from the source image size. This allows the previous setup with no settings for subload size to work as before.
This commit is contained in:
@@ -205,7 +205,7 @@ void TextureCubeMap::apply(State& state) const
|
||||
{
|
||||
glTexSubImage2D(faceTarget[n], 0,
|
||||
_subloadOffsX, _subloadOffsY,
|
||||
_images[n]->s(), _images[n]->t(),
|
||||
(_subloadWidth>0)?_subloadWidth:_images[n]->s(), (_subloadHeight>0)?_subloadHeight:_images[n]->t(),
|
||||
(GLenum) _images[n]->pixelFormat(), (GLenum) _images[n]->dataType(),
|
||||
_images[n]->data());
|
||||
// update the modified flag to show that the image has been loaded.
|
||||
|
||||
Reference in New Issue
Block a user