DX11: Don't apply culling to lines and points. Fixes Metroid Prime beam-charging effects.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7346 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check
2011-03-15 03:51:31 +00:00
parent a55e63c697
commit c83e5ee35b
3 changed files with 30 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "MainBase.h"
#include "PixelShaderManager.h"
#include "RenderBase.h"
#include "Render.h"
#include "Statistics.h"
#include "TextureCacheBase.h"
#include "VertexShaderManager.h"
@ -147,6 +148,9 @@ void VertexManager::Draw(UINT stride)
D3D::context->DrawIndexed(IndexGenerator::GetTriangleindexLen(), m_triangleDrawIndex, 0);
INCSTAT(stats.thisFrame.numIndexedDrawCalls);
}
// Disable culling for lines and points
if (IndexGenerator::GetNumLines() > 0 || IndexGenerator::GetNumPoints() > 0)
((DX11::Renderer*)g_renderer)->ApplyCullDisable();
if (IndexGenerator::GetNumLines() > 0)
{
float lineWidth = float(bpmem.lineptwidth.linesize) / 6.f;
@ -175,6 +179,8 @@ void VertexManager::Draw(UINT stride)
D3D::context->GSSetShader(NULL, NULL, 0);
}
}
if (IndexGenerator::GetNumLines() > 0 || IndexGenerator::GetNumPoints() > 0)
((DX11::Renderer*)g_renderer)->RestoreCull();
}
void VertexManager::vFlush()