diff options
Diffstat (limited to 'opengl-bindings/src/texture.rs')
| -rw-r--r-- | opengl-bindings/src/texture.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/opengl-bindings/src/texture.rs b/opengl-bindings/src/texture.rs index ae5b2c3..ebfc8f4 100644 --- a/opengl-bindings/src/texture.rs +++ b/opengl-bindings/src/texture.rs @@ -254,6 +254,30 @@ impl Texture } } + /// Sets four floating-point values that define the border values that should be used + /// for border texels. If a texel is sampled from the border of the texture, these + /// values are interpreted as an RGBA color to match the texture's internal format + /// and substituted for the non-existent texel data. If the texture contains depth + /// components, the first value is interpreted as a depth value. + /// + /// The values are stored unmodified as floating-point values. + /// + /// The initial values are (0.0, 0.0, 0.0, 0.0). + pub fn set_float_border_values( + &self, + current_context: &MaybeCurrentContextWithFns, + values: [f32; 4], + ) + { + unsafe { + current_context.fns().TextureParameterfv( + self.texture, + crate::sys::TEXTURE_BORDER_COLOR, + values.as_ptr(), + ); + } + } + pub fn delete(self, current_context: &MaybeCurrentContextWithFns) { unsafe { |
