-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Issue description
When drawing a sprite with a negative value on only 1 axis; the sprite will not be rendered.
When using a negative value on the x and y axis, will render as expected, code example should have expected behaviour of the image only being flipped on the xaxis.
Environment
Fedora Workstation 40, OpenGL 4.6, Intel ADL Gt2 and rx7900xt GPU tested.
Issue Screenshot
Code Example
#include <raylib.h>
int main () {
InitWindow (640, 360, "Hello World");
Texture2D texture = LoadTexture ("image.png");
while (!WindowShouldClose ()) {
BeginDrawing ();
ClearBackground (SKYBLUE);
Rectangle source = {
.x = 0,
.y = 0,
.width = (float)texture.width,
.height = (float)texture.height,
};
Rectangle destination = {
.x = 320,
.y = 180,
.width = -(float)texture.width,
.height = (float)texture.height,
};
DrawTexturePro (texture, source, destination, CLITERAL (Vector2){0, 0}, 0, WHITE);
EndDrawing ();
}
UnloadTexture (texture);
CloseWindow ();
}
Metadata
Metadata
Assignees
Labels
No labels