Funtions added to set texture parameters

SetTextureFilter()
SetTextureWrap()
This commit is contained in:
raysan5 2016-10-27 13:40:17 +02:00
parent 137057f499
commit 5c80f65082

View File

@ -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)
{