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

@@ -345,6 +345,8 @@ Texture::Texture():
_borderWidth(0),
_internalFormatMode(USE_IMAGE_DATA_FORMAT),
_internalFormat(0),
_sourceFormat(0),
_sourceType(GL_UNSIGNED_BYTE),
_use_shadow_comparison(false),
_shadow_compare_func(LEQUAL),
_shadow_texture_mode(LUMINANCE),
@@ -368,6 +370,8 @@ Texture::Texture(const Texture& text,const CopyOp& copyop):
_borderWidth(text._borderWidth),
_internalFormatMode(text._internalFormatMode),
_internalFormat(text._internalFormat),
_sourceFormat(text._sourceFormat),
_sourceType(text._sourceType),
_use_shadow_comparison(text._use_shadow_comparison),
_shadow_compare_func(text._shadow_compare_func),
_shadow_texture_mode(text._shadow_texture_mode),
@@ -398,6 +402,9 @@ int Texture::compareTexture(const Texture& rhs) const
COMPARE_StateAttribute_Parameter(_internalFormat)
}
COMPARE_StateAttribute_Parameter(_sourceFormat)
COMPARE_StateAttribute_Parameter(_sourceType)
COMPARE_StateAttribute_Parameter(_use_shadow_comparison)
COMPARE_StateAttribute_Parameter(_shadow_compare_func)
COMPARE_StateAttribute_Parameter(_shadow_texture_mode)