From b7221d0a335bd4dd87895cfb83815f88507d38ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 12 Jan 2011 21:46:47 +0100 Subject: [PATCH] Function to set texture border color. --- src/Texture.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Texture.h b/src/Texture.h index 8800994cc..00880b706 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -190,6 +190,17 @@ template class Texture { unbind(); } + /** + * @brief Set border color + * + * Border color when wrapping is set to ClampToBorder. + */ + void setBorderColor(const Vector4& color) { + bind(); + glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, color.data()); + unbind(); + } + /** * @brief Generate mipmap *