Forráskód Böngészése

Fix polygon drawing example for opengl 1.1 (#5202)

Maicon Santana 2 hónapja
szülő
commit
07033cff90
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      examples/textures/textures_polygon_drawing.c

+ 1 - 1
examples/textures/textures_polygon_drawing.c

@@ -115,9 +115,9 @@ int main(void)
 // without crossing perimeter, points must be in anticlockwise order
 // without crossing perimeter, points must be in anticlockwise order
 void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint)
 void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint)
 {
 {
+    rlSetTexture(texture.id);
     rlBegin(RL_TRIANGLES);
     rlBegin(RL_TRIANGLES);
 
 
-    rlSetTexture(texture.id);
 
 
         rlColor4ub(tint.r, tint.g, tint.b, tint.a);
         rlColor4ub(tint.r, tint.g, tint.b, tint.a);