mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-03 17:58:34 +00:00
initial release of new RasterFont without color support
this new design will once create a texture for all chars. while rendering a string, a list of polygons (position on screen + texture) for this string is generated on the fly and print at once by glDrawArrays. atm, there is no support for colors, so everything will display white. Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
This commit is contained in:
parent
c207422987
commit
75dd48247f
4 changed files with 120 additions and 105 deletions
|
@ -101,12 +101,11 @@ void SWRenderer::RenderText(const char* pstr, int left, int top, u32 color)
|
|||
{
|
||||
int nBackbufferWidth = (int)OpenGL_GetBackbufferWidth();
|
||||
int nBackbufferHeight = (int)OpenGL_GetBackbufferHeight();
|
||||
glColor4f(((color>>16) & 0xff)/255.0f, ((color>> 8) & 0xff)/255.0f,
|
||||
((color>> 0) & 0xff)/255.0f, ((color>>24) & 0xFF)/255.0f);
|
||||
|
||||
s_pfont->printMultilineText(pstr,
|
||||
left * 2.0f / (float)nBackbufferWidth - 1,
|
||||
1 - top * 2.0f / (float)nBackbufferHeight,
|
||||
0, nBackbufferWidth, nBackbufferHeight);
|
||||
0, nBackbufferWidth, nBackbufferHeight, color);
|
||||
}
|
||||
|
||||
void SWRenderer::DrawDebugText()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue