@@ -44,3 +44,75 @@ TEST_F(VisualTest, DrawGradientRec) {
4444
4545 UnloadRenderTexture (target);
4646}
47+
48+ TEST_F (VisualTest, DrawTextureProFlipY) {
49+ // Create a checkerboard texture to test flipping
50+ Image img = GenImageChecker (RED, BLUE, 64 , 64 , 8 );
51+ Texture tex = LoadTextureFromImage (img);
52+ UnloadImage (img);
53+
54+ RenderTexture target = LoadRenderTexture (128 , 128 );
55+
56+ CommandBuffer cb = {0 };
57+ BeginCommandBuffer (&cb);
58+
59+ BeginTextureMode (target);
60+ ClearBackground (BLACK);
61+ // Draw normal texture on left
62+ DrawTexturePro (tex,
63+ CLITERAL (Rectangle){0 , 0 , 64 , 64 }, // source
64+ CLITERAL (Rectangle){0 , 0 , 64 , 64 }, // dest
65+ CLITERAL (Vector2){0 , 0 }, // origin
66+ 0 .0f , WHITE); // rotation, tint
67+ // Draw vertically flipped texture on right
68+ DrawTexturePro (tex,
69+ CLITERAL (Rectangle){0 , 0 , 64 , -64 }, // negative height for vertical flip
70+ CLITERAL (Rectangle){64 , 0 , 64 , 64 }, // dest
71+ CLITERAL (Vector2){0 , 0 }, // origin
72+ 0 .0f , WHITE); // rotation, tint
73+ EndTextureMode ();
74+
75+ EndCommandBuffer (&cb);
76+ SubmitCommandBuffer (&cb);
77+
78+ VerifyBuffer (target, " draw_texture_pro_flip_y" );
79+
80+ UnloadTexture (tex);
81+ UnloadRenderTexture (target);
82+ }
83+
84+ TEST_F (VisualTest, DrawTextureProFlipX) {
85+ // Create a checkerboard texture to test flipping
86+ Image img = GenImageChecker (RED, BLUE, 64 , 64 , 8 );
87+ Texture tex = LoadTextureFromImage (img);
88+ UnloadImage (img);
89+
90+ RenderTexture target = LoadRenderTexture (128 , 128 );
91+
92+ CommandBuffer cb = {0 };
93+ BeginCommandBuffer (&cb);
94+
95+ BeginTextureMode (target);
96+ ClearBackground (BLACK);
97+ // Draw normal texture on top
98+ DrawTexturePro (tex,
99+ CLITERAL (Rectangle){0 , 0 , 64 , 64 }, // source
100+ CLITERAL (Rectangle){0 , 0 , 64 , 64 }, // dest
101+ CLITERAL (Vector2){0 , 0 }, // origin
102+ 0 .0f , WHITE); // rotation, tint
103+ // Draw horizontally flipped texture on bottom
104+ DrawTexturePro (tex,
105+ CLITERAL (Rectangle){0 , 0 , -64 , 64 }, // negative width for horizontal flip
106+ CLITERAL (Rectangle){0 , 64 , 64 , 64 }, // dest
107+ CLITERAL (Vector2){0 , 0 }, // origin
108+ 0 .0f , WHITE); // rotation, tint
109+ EndTextureMode ();
110+
111+ EndCommandBuffer (&cb);
112+ SubmitCommandBuffer (&cb);
113+
114+ VerifyBuffer (target, " draw_texture_pro_flip_x" );
115+
116+ UnloadTexture (tex);
117+ UnloadRenderTexture (target);
118+ }
0 commit comments