diff --git a/src/Demos/osgprerender/osgprerender.cpp b/src/Demos/osgprerender/osgprerender.cpp index d1ac2cb1d..6e1bc7157 100644 --- a/src/Demos/osgprerender/osgprerender.cpp +++ b/src/Demos/osgprerender/osgprerender.cpp @@ -346,7 +346,7 @@ osg::Node* createPreRenderSubGraph(osg::Node* subgraph) // set up the texture. osg::Image* image = new osg::Image; image->setInternalTextureFormat(GL_RGBA); - //osg::Image* image = osgDB::readImageFile("lz.rgb"); + osg::Texture* texture = new osg::Texture; texture->setSubloadMode(osg::Texture::IF_DIRTY); texture->setImage(image); diff --git a/src/Demos/osgscribe/osgscribe.cpp b/src/Demos/osgscribe/osgscribe.cpp index 1b46f98ee..78cf6cc8b 100644 --- a/src/Demos/osgscribe/osgscribe.cpp +++ b/src/Demos/osgscribe/osgscribe.cpp @@ -117,7 +117,7 @@ int main( int argc, char **argv ) stateset->setAttributeAndModes(material,osg::StateAttribute::OVERRIDE_ON); stateset->setAttributeAndModes(polyoffset,osg::StateAttribute::OVERRIDE_ON); stateset->setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE_ON); - stateset->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE_ON); + stateset->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE_OFF); stateset->setTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OVERRIDE_OFF); // osg::LineStipple* linestipple = new osg::LineStipple; diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index 996d906a5..ed96f5bad 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -169,7 +169,6 @@ const unsigned int Image::computeRowWidthInBytes(int width,GLenum format,GLenum return (widthInBits/packingInBits + ((widthInBits%packingInBits)?1:0))*packing; } - void Image::setInternalTextureFormat(GLint internalFormat) { // won't do any sanity checking right now, leave it to diff --git a/src/osg/Texture.cpp b/src/osg/Texture.cpp index 618978451..4087061a0 100644 --- a/src/osg/Texture.cpp +++ b/src/osg/Texture.cpp @@ -230,7 +230,7 @@ void Texture::apply(State& state) const if (_subloadMode == AUTO || (_subloadMode == IF_DIRTY && modifiedTag != _image->getModifiedTag())) { - glPixelStorei(GL_UNPACK_ROW_LENGTH,_image->getRowSizeInBytes()); + glPixelStorei(GL_UNPACK_ROW_LENGTH,_image->s()); glTexSubImage2D(_target, 0, _subloadTextureOffsetX, _subloadTextureOffsetY, @@ -576,7 +576,7 @@ void Texture::applyTexImage(GLenum target, Image* image, State& state) const NULL); - glPixelStorei(GL_UNPACK_ROW_LENGTH,image->getRowSizeInBytes()); + glPixelStorei(GL_UNPACK_ROW_LENGTH,image->s()); glTexSubImage2D(target, 0, _subloadTextureOffsetX, _subloadTextureOffsetY, diff --git a/src/osg/TextureCubeMap.cpp b/src/osg/TextureCubeMap.cpp index 559cd7049..78a09c06c 100644 --- a/src/osg/TextureCubeMap.cpp +++ b/src/osg/TextureCubeMap.cpp @@ -204,9 +204,9 @@ void TextureCubeMap::apply(State& state) const (_subloadMode == IF_DIRTY && modifiedTag != _images[n]->getModifiedTag())) { - if (rowwidth != _images[n]->getRowSizeInBytes()) + if (rowwidth != _images[n]->s()) { - rowwidth = _images[n]->getRowSizeInBytes(); + rowwidth = _images[n]->s(); glPixelStorei(GL_UNPACK_ROW_LENGTH,rowwidth); }