fix pop matrix

This commit is contained in:
Bigfoot71 2026-03-20 03:02:08 +01:00
parent 6563f13db2
commit 8fdb78cfae

6
src/external/rlsw.h vendored
View File

@ -4371,7 +4371,7 @@ void swPopMatrix(void)
return;
}
RLSW.currentMatrix = &RLSW.stackProjection[--RLSW.stackProjectionCounter];
RLSW.currentMatrix = &RLSW.stackProjection[(--RLSW.stackProjectionCounter) - 1];
RLSW.isDirtyMVP = true; //< The MVP is considered to have been changed
} break;
case SW_MODELVIEW:
@ -4382,7 +4382,7 @@ void swPopMatrix(void)
return;
}
RLSW.currentMatrix = &RLSW.stackModelview[--RLSW.stackModelviewCounter];
RLSW.currentMatrix = &RLSW.stackModelview[(--RLSW.stackModelviewCounter) - 1];
RLSW.isDirtyMVP = true; //< The MVP is considered to have been changed
} break;
case SW_TEXTURE:
@ -4393,7 +4393,7 @@ void swPopMatrix(void)
return;
}
RLSW.currentMatrix = &RLSW.stackTexture[--RLSW.stackTextureCounter];
RLSW.currentMatrix = &RLSW.stackTexture[(--RLSW.stackTextureCounter) - 1];
} break;
default: break;
}