summaryrefslogtreecommitdiffhomepage
path: root/src/rtextures.c
diff options
context:
space:
mode:
authorRay <[email protected]>2022-11-10 10:05:11 +0100
committerRay <[email protected]>2022-11-10 10:05:11 +0100
commit84a2a8857229a696852bb97938e1ec2f7b1df892 (patch)
tree4a79a7e2bdd6ee07d1c4f27e1007ade40bdc8923 /src/rtextures.c
parentfca58c8e2f8768377fe0e535a08b99b6db40a5d6 (diff)
downloadraylib-84a2a8857229a696852bb97938e1ec2f7b1df892.tar.gz
raylib-84a2a8857229a696852bb97938e1ec2f7b1df892.zip
WARNING: REMOVED: `DrawTexturePoly()`
Function moved to `examples/textures/textures_polygon.c`, so users can learn from the implementation and create custom variants as required.
Diffstat (limited to 'src/rtextures.c')
-rw-r--r--src/rtextures.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/rtextures.c b/src/rtextures.c
index 343daa18..5440ed7c 100644
--- a/src/rtextures.c
+++ b/src/rtextures.c
@@ -3906,37 +3906,6 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest,
}
}
-// Draw textured polygon, defined by vertex and texturecoordinates
-// NOTE: Polygon center must have straight line path to all points
-// without crossing perimeter, points must be in anticlockwise order
-void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint)
-{
- rlSetTexture(texture.id);
-
- // Texturing is only supported on RL_QUADS
- rlBegin(RL_QUADS);
-
- rlColor4ub(tint.r, tint.g, tint.b, tint.a);
-
- for (int i = 0; i < pointCount - 1; i++)
- {
- rlTexCoord2f(0.5f, 0.5f);
- rlVertex2f(center.x, center.y);
-
- rlTexCoord2f(texcoords[i].x, texcoords[i].y);
- rlVertex2f(points[i].x + center.x, points[i].y + center.y);
-
- rlTexCoord2f(texcoords[i + 1].x, texcoords[i + 1].y);
- rlVertex2f(points[i + 1].x + center.x, points[i + 1].y + center.y);
-
- rlTexCoord2f(texcoords[i + 1].x, texcoords[i + 1].y);
- rlVertex2f(points[i + 1].x + center.x, points[i + 1].y + center.y);
- }
- rlEnd();
-
- rlSetTexture(0);
-}
-
// Get color with alpha applied, alpha goes from 0.0f to 1.0f
Color Fade(Color color, float alpha)
{