mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-25 23:04:53 +00:00
OGL: Make OSD messages fade out properly instead of having them disappear spontaneously.
This commit is contained in:
parent
2dd570c880
commit
2fedab3bad
1 changed files with 5 additions and 0 deletions
|
@ -604,12 +604,17 @@ void Renderer::RenderText(const char *text, int left, int top, u32 color)
|
||||||
glColor4f(((color>>16) & 0xff)/255.0f, ((color>> 8) & 0xff)/255.0f,
|
glColor4f(((color>>16) & 0xff)/255.0f, ((color>> 8) & 0xff)/255.0f,
|
||||||
((color>> 0) & 0xff)/255.0f, ((color>>24) & 0xFF)/255.0f);
|
((color>> 0) & 0xff)/255.0f, ((color>>24) & 0xFF)/255.0f);
|
||||||
|
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
s_pfont->printMultilineText(text,
|
s_pfont->printMultilineText(text,
|
||||||
left * 2.0f / (float)nBackbufferWidth - 1,
|
left * 2.0f / (float)nBackbufferWidth - 1,
|
||||||
1 - top * 2.0f / (float)nBackbufferHeight,
|
1 - top * 2.0f / (float)nBackbufferHeight,
|
||||||
0, nBackbufferWidth, nBackbufferHeight);
|
0, nBackbufferWidth, nBackbufferHeight);
|
||||||
|
|
||||||
GL_REPORT_ERRORD();
|
GL_REPORT_ERRORD();
|
||||||
|
|
||||||
|
glDisable(GL_BLEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetRectangle Renderer::ConvertEFBRectangle(const EFBRectangle& rc)
|
TargetRectangle Renderer::ConvertEFBRectangle(const EFBRectangle& rc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue