VideoCommon: Merge LineGeometryShader into GeometryShaderGen.

This adds line-width emulation support to OpenGL.
This commit is contained in:
Jules Blok
2014-12-15 22:12:17 +01:00
parent 275af9c5e4
commit 55e60a9c22
15 changed files with 81 additions and 366 deletions

View File

@ -881,9 +881,6 @@ void Renderer::DrawDebugInfo()
GLsizei count = static_cast<GLsizei>(stats.efb_regions.size() * 2*6);
glDrawArrays(GL_LINES, 0, count);
// Restore Line Size
SetLineWidth();
// Clear stored regions
stats.efb_regions.clear();
}
@ -1901,17 +1898,6 @@ void Renderer::SetDitherMode()
glDisable(GL_DITHER);
}
void Renderer::SetLineWidth()
{
float fratio = xfmem.viewport.wd != 0 ?
((float)Renderer::GetTargetWidth() / EFB_WIDTH) : 1.0f;
if (bpmem.lineptwidth.linesize > 0)
// scale by ratio of widths
glLineWidth((float)bpmem.lineptwidth.linesize * fratio / 6.0f);
if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL && bpmem.lineptwidth.pointsize > 0)
glPointSize((float)bpmem.lineptwidth.pointsize * fratio / 6.0f);
}
void Renderer::SetSamplerState(int stage, int texindex)
{
auto const& tex = bpmem.tex[texindex];