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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user