diff --git a/examples/textures/textures_polygon.c b/examples/textures/textures_polygon.c
index 729e25184..1cde29a4b 100644
--- a/examples/textures/textures_polygon.c
+++ b/examples/textures/textures_polygon.c
@@ -115,9 +115,9 @@ int main(void)
 // 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);
-
     rlBegin(RL_TRIANGLES);
+    
+    rlSetTexture(texture.id);
 
         rlColor4ub(tint.r, tint.g, tint.b, tint.a);