From Brad Colbert/Robert Osfield: added s/getSourceFormat and s/getSourceType to osg::Texture

along with support for this Texture1D, 2D, 3D, TextureCubeMap and TextureRectangle.  The
new SourceFormat and SourceType parameters are only used when no osg::Image is assigned to
an osg::Texture, and main use is for render to texture effects.

Added support for --hdr option in osgprerender, which utilises the new Texture::setSourceFormat/Type() methods.
This commit is contained in:
Robert Osfield
2005-11-08 15:52:21 +00:00
parent 8922bde081
commit 53e075f78b
8 changed files with 114 additions and 10 deletions

View File

@@ -222,8 +222,8 @@ void Texture2D::apply(State& state) const
// no image present, but dimensions at set so lets create the texture
glTexImage2D( GL_TEXTURE_2D, 0, _internalFormat,
_textureWidth, _textureHeight, _borderWidth,
_internalFormat,
GL_UNSIGNED_BYTE,
_sourceFormat ? _sourceFormat : _internalFormat,
_sourceType ? _sourceType : GL_UNSIGNED_BYTE,
0);
if (_readPBuffer.valid())