Fix text rendering overlapping split lines on top of each other

This commit is contained in:
baldurk
2019-12-17 14:31:27 +00:00
parent 4b1bef5046
commit 36d9dc34bc
6 changed files with 18 additions and 0 deletions
@@ -348,7 +348,10 @@ void D3D11TextRenderer::RenderText(float x, float y, const rdcstr &text)
split(text, lines, '\n');
for(const rdcstr &line : lines)
{
RenderTextInternal(x, y, line);
y += 1.0f;
}
}
void D3D11TextRenderer::RenderTextInternal(float x, float y, const rdcstr &text)
@@ -451,7 +451,10 @@ void D3D12TextRenderer::RenderText(ID3D12GraphicsCommandList *list, float x, flo
split(text, lines, '\n');
for(const rdcstr &line : lines)
{
RenderTextInternal(list, x, y, line);
y += 1.0f;
}
}
void D3D12TextRenderer::RenderTextInternal(ID3D12GraphicsCommandList *list, float x, float y,
+3
View File
@@ -134,7 +134,10 @@ void D3D8DebugManager::RenderText(float x, float y, const rdcstr &text)
split(text, lines, '\n');
for(const rdcstr &line : lines)
{
RenderTextInternal(x, y, line);
y += 1.0f;
}
}
void D3D8DebugManager::RenderTextInternal(float x, float y, const rdcstr &text)
+3
View File
@@ -134,7 +134,10 @@ void D3D9DebugManager::RenderText(float x, float y, const rdcstr &text)
split(text, lines, '\n');
for(const rdcstr &line : lines)
{
RenderTextInternal(x, y, line);
y += 1.0f;
}
}
void D3D9DebugManager::RenderTextInternal(float x, float y, const rdcstr &text)
+3
View File
@@ -289,7 +289,10 @@ void WrappedOpenGL::RenderText(float x, float y, const rdcstr &text)
split(text, lines, '\n');
for(const rdcstr &line : lines)
{
RenderTextInternal(x, y, line);
y += 1.0f;
}
textState.Pop(ctxdata.Modern());
}
@@ -604,7 +604,10 @@ void VulkanTextRenderer::RenderText(const TextPrintState &textstate, float x, fl
split(text, lines, '\n');
for(const rdcstr &line : lines)
{
RenderTextInternal(textstate, x, y, line);
y += 1.0f;
}
}
void VulkanTextRenderer::RenderTextInternal(const TextPrintState &textstate, float x, float y,