Updates to the clamp to border support in osg::Texture.

This commit is contained in:
Robert Osfield
2002-03-01 09:27:10 +00:00
parent 2973ca0a25
commit 0439b72da7
2 changed files with 18 additions and 2 deletions

View File

@@ -40,6 +40,8 @@ Texture::Texture()
_subloadMode = OFF;
_subloadOffsX = _subloadOffsY = 0;
_borderColor.set(0.0, 0.0, 0.0, 0.0);//OpenGL default
}
@@ -286,6 +288,11 @@ void Texture::applyImmediateMode(State& state) const
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _min_filter);
if (s_borderClampSupported)
{
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, _borderColor.ptr());
}
if (_mag_filter == ANISOTROPIC)
{
// check for support for anisotropic filter,