mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-04 21:29:18 -05:00
Funtions added to set texture parameters
SetTextureFilter() SetTextureWrap()
This commit is contained in:
@ -442,6 +442,20 @@ void UnloadRenderTexture(RenderTexture2D target)
|
|||||||
if (target.id != 0) rlDeleteRenderTextures(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
|
// Get pixel data from image in the form of Color struct array
|
||||||
Color *GetImageData(Image image)
|
Color *GetImageData(Image image)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user