Merge pull request #15021 from unknownbrackets/ui-font-atlas

UI: Support a second texture for just fonts
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2021-11-09 22:51:09 +01:00
commit 4161b500ab
7 files changed
+91 -36

No files matched your search

+4
View File
@@ -1154,6 +1154,8 @@ static void DrawCrashDump(UIContext *ctx) {
sysName.c_str(), sysVersion, GetCompilerABI()
);
if (ctx->Draw()->GetFontAtlas()->getFont(ubuntu24))
ctx->BindFontTexture();
ctx->Draw()->SetFontScale(.7f, .7f);
ctx->Draw()->DrawTextShadow(ubuntu24, statbuf, x, y, 0xFFFFFFFF);
y += 140;
@@ -1205,6 +1207,8 @@ BREAK
CheatsInEffect() ? "Y" : "N", HLEPlugins::HasEnabled() ? "Y" : "N");
ctx->Draw()->DrawTextShadow(ubuntu24, statbuf, x, y, 0xFFFFFFFF);
ctx->Flush();
ctx->RebindTexture();
}
static void DrawAudioDebugStats(DrawBuffer *draw2d, const Bounds &bounds) {