1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Merge pull request #1141 from Hiroko103/patch-1

[Fix] Graphics: Image UV mapping issue
This commit is contained in:
Brian Fiete 2021-08-29 06:16:07 -07:00 committed by GitHub
commit 8d78f04882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -865,12 +865,12 @@ namespace Beefy.gfx
float d = m.d * height; float d = m.d * height;
Gfx_AllocTris(image.mNativeTextureSegment, 6); Gfx_AllocTris(image.mNativeTextureSegment, 6);
Gfx_SetDrawVertex(0, m.tx, m.ty, 0, u1, 0, mColor); Gfx_SetDrawVertex(0, m.tx, m.ty, 0, u1, v1, mColor);
Gfx_SetDrawVertex(1, m.tx + a, m.ty + b, 0, u2, 0, mColor); Gfx_SetDrawVertex(1, m.tx + a, m.ty + b, 0, u2, v1, mColor);
Gfx_SetDrawVertex(2, m.tx + c, m.ty + d, 0, u1, 1, mColor); Gfx_SetDrawVertex(2, m.tx + c, m.ty + d, 0, u1, v2, mColor);
Gfx_CopyDrawVertex(3, 2); Gfx_CopyDrawVertex(3, 2);
Gfx_CopyDrawVertex(4, 1); Gfx_CopyDrawVertex(4, 1);
Gfx_SetDrawVertex(5, m.tx + (a + c), m.ty + (b + d), 0, u2, 1, mColor); Gfx_SetDrawVertex(5, m.tx + (a + c), m.ty + (b + d), 0, u2, v2, mColor);
} }
// Untranslated // Untranslated