mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-24 10:27:45 +00:00
transmatrix back to old definition (some weird bugs?) but improved
This commit is contained in:
14
drawing.cpp
14
drawing.cpp
@@ -349,8 +349,18 @@ void filledPolygonColorI(SDL_Surface *s, int* px, int *py, int polyi, color_t co
|
||||
|
||||
#if CAP_TEXTURE
|
||||
void drawTexturedTriangle(SDL_Surface *s, int *px, int *py, glvertex *tv, color_t col) {
|
||||
transmatrix source( point3(px[0], px[1], px[2]), point3(py[0], py[1], py[2]), point3(1,1,1), point31(0,0,0) );
|
||||
transmatrix target( point3(tv[0][0], tv[1][0], tv[2][0]), point3(tv[0][1],tv[1][1],tv[2][1]), point3(1,1,1), point31(0,0,0) );
|
||||
transmatrix source = matrix3(
|
||||
px[0], px[1], px[2],
|
||||
py[0], py[1], py[2],
|
||||
1, 1, 1);
|
||||
|
||||
|
||||
transmatrix target = matrix3(
|
||||
tv[0][0], tv[1][0], tv[2][0],
|
||||
tv[0][1], tv[1][1], tv[2][1],
|
||||
1, 1, 1
|
||||
);
|
||||
|
||||
transmatrix isource = inverse(source);
|
||||
int minx = px[0], maxx = px[0];
|
||||
int miny = py[0], maxy = py[0];
|
||||
|
||||
Reference in New Issue
Block a user