Revert "Add DrawTriangleGradient()"

This reverts commit b1cfc7672c.
This commit is contained in:
KonPet 2021-11-06 19:04:43 +01:00
parent b1cfc7672c
commit 23a208e8e7
2 changed files with 0 additions and 42 deletions

View File

@ -1174,7 +1174,6 @@ RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color);
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
RLAPI void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw a gradient-filled triangle with custom vertex colors (vertex in counter-clockwise order!)
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
RLAPI void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
RLAPI void DrawTriangleStrip(Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points

View File

@ -1323,47 +1323,6 @@ void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
#endif
}
// Draw a gradient-filled triangle
// NOTE: Vertex must be provided in counter-clockwise order
void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3)
{
rlCheckRenderBatchLimit(4);
#if defined(SUPPORT_QUADS_DRAW_MODE)
rlSetTexture(texShapes.id);
rlBegin(RL_QUADS);
rlColor4ub(c1.r, c1.g, c1.b, c1.a);
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
rlVertex2f(v1.x, v1.y);
rlColor4ub(c2.r, c2.g, c2.b, c2.a);
rlTexCoord2f(texShapesRec.x/texShapes.width, (texShapesRec.y + texShapesRec.height)/texShapes.height);
rlVertex2f(v2.x, v2.y);
rlColor4ub(c2.r, c2.g, c2.b, c2.a);
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, (texShapesRec.y + texShapesRec.height)/texShapes.height);
rlVertex2f(v2.x, v2.y);
rlColor4ub(c3.r, c3.g, c3.b, c3.a);
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height);
rlVertex2f(v3.x, v3.y);
rlEnd();
rlSetTexture(0);
#else
rlBegin(RL_TRIANGLES);
rlColor4ub(c1.r, c1.g, c1.b, c1.a);
rlVertex2f(v1.x, v1.y);
rlColor4ub(c2.r, c2.g, c2.b, c2.a);
rlVertex2f(v2.x, v2.y);
rlColor4ub(c3.r, c3.g, c3.b, c3.a);
rlVertex2f(v3.x, v3.y);
rlEnd();
#endif
}
// Draw a triangle using lines
// NOTE: Vertex must be provided in counter-clockwise order
void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color)