Updates to the clamp to border support in osg::Texture.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user