summaryrefslogtreecommitdiffhomepage
path: root/src/textures.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2016-10-27 13:40:17 +0200
committerraysan5 <[email protected]>2016-10-27 13:40:17 +0200
commit5c80f650827337af8054446b21424d39349606d9 (patch)
tree718bb5afb52599145cbfe09dbd7f6bf3322393f5 /src/textures.c
parent137057f499f0c6a15ad7e306f27fc4d5c02933be (diff)
downloadraylib-5c80f650827337af8054446b21424d39349606d9.tar.gz
raylib-5c80f650827337af8054446b21424d39349606d9.zip
Funtions added to set texture parameters
SetTextureFilter() SetTextureWrap()
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/textures.c b/src/textures.c
index eab443b6..867e565d 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -442,6 +442,20 @@ void UnloadRenderTexture(RenderTexture2D target)
if (target.id != 0) rlDeleteRenderTextures(target);
}
+// Set texture scale filter
+void SetTextureFilter(Texture2D texture, int filterMode)
+{
+ rlTextureParameters(texture.id, RL_TEXTURE_MIN_FILTER, filterMode);
+ rlTextureParameters(texture.id, RL_TEXTURE_MAG_FILTER, filterMode);
+}
+
+// Set texture wrap mode
+void SetTextureWrap(Texture2D texture, int wrapMode)
+{
+ rlTextureParameters(texture.id, RL_TEXTURE_WRAP_S, wrapMode);
+ rlTextureParameters(texture.id, RL_TEXTURE_WRAP_T, wrapMode);
+}
+
// Get pixel data from image in the form of Color struct array
Color *GetImageData(Image image)
{