VertexManager: Disable culling for lines and points.
This commit is contained in:
parent
0ac7103391
commit
2850c9a206
|
@ -141,6 +141,7 @@ void VertexManager::Draw(u32 stride)
|
|||
}
|
||||
else if (current_primitive_type == PRIMITIVE_LINES)
|
||||
{
|
||||
((DX11::Renderer*)g_renderer)->ApplyCullDisable();
|
||||
D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
|
||||
D3D::stateman->SetGeometryConstants(GeometryShaderCache::GetConstantBuffer());
|
||||
D3D::stateman->SetGeometryShader(GeometryShaderCache::GetActiveShader());
|
||||
|
@ -151,9 +152,11 @@ void VertexManager::Draw(u32 stride)
|
|||
INCSTAT(stats.thisFrame.numDrawCalls);
|
||||
|
||||
D3D::stateman->SetGeometryShader(nullptr);
|
||||
((DX11::Renderer*)g_renderer)->RestoreCull();
|
||||
}
|
||||
else //if (current_primitive_type == PRIMITIVE_POINTS)
|
||||
{
|
||||
((DX11::Renderer*)g_renderer)->ApplyCullDisable();
|
||||
D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
|
||||
D3D::stateman->SetGeometryConstants(GeometryShaderCache::GetConstantBuffer());
|
||||
D3D::stateman->SetGeometryShader(GeometryShaderCache::GetActiveShader());
|
||||
|
@ -164,6 +167,7 @@ void VertexManager::Draw(u32 stride)
|
|||
INCSTAT(stats.thisFrame.numDrawCalls);
|
||||
|
||||
D3D::stateman->SetGeometryShader(nullptr);
|
||||
((DX11::Renderer*)g_renderer)->RestoreCull();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,9 +101,11 @@ void VertexManager::Draw(u32 stride)
|
|||
{
|
||||
case PRIMITIVE_POINTS:
|
||||
primitive_mode = GL_POINTS;
|
||||
glDisable(GL_CULL_FACE);
|
||||
break;
|
||||
case PRIMITIVE_LINES:
|
||||
primitive_mode = GL_LINES;
|
||||
glDisable(GL_CULL_FACE);
|
||||
break;
|
||||
case PRIMITIVE_TRIANGLES:
|
||||
primitive_mode = g_ActiveConfig.backend_info.bSupportsPrimitiveRestart ? GL_TRIANGLE_STRIP : GL_TRIANGLES;
|
||||
|
@ -120,6 +122,9 @@ void VertexManager::Draw(u32 stride)
|
|||
}
|
||||
|
||||
INCSTAT(stats.thisFrame.numDrawCalls);
|
||||
|
||||
if (current_primitive_type != PRIMITIVE_TRIANGLES)
|
||||
((OGL::Renderer*)g_renderer)->SetGenerationMode();
|
||||
}
|
||||
|
||||
void VertexManager::vFlush(bool useDstAlpha)
|
||||
|
|
Loading…
Reference in New Issue