this was a hard fix to found:
if a degenerated primitive is passed to the VertexManager treat it as a compatible primitive, for example if a 5 vertex quad is passed treat it as a triangle fan. as crazy at this seems it fix the sun glare in ZWW, please test an d let me know if it make a difference in other games git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4931 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
35b6e71f03
commit
9ec5ee94b4
|
@ -101,13 +101,13 @@ void AddIndices(int _primitive, int _numVertices)
|
|||
{
|
||||
switch (_primitive)
|
||||
{
|
||||
case GX_DRAW_QUADS: IndexGenerator::AddQuads(_numVertices); return;
|
||||
case GX_DRAW_TRIANGLES: IndexGenerator::AddList(_numVertices); return;
|
||||
case GX_DRAW_TRIANGLE_STRIP: IndexGenerator::AddStrip(_numVertices); return;
|
||||
case GX_DRAW_TRIANGLE_FAN: IndexGenerator::AddFan(_numVertices); return;
|
||||
case GX_DRAW_LINE_STRIP: IndexGenerator::AddLineStrip(_numVertices); return;
|
||||
case GX_DRAW_LINES: IndexGenerator::AddLineList(_numVertices); return;
|
||||
case GX_DRAW_POINTS: IndexGenerator::AddPoints(_numVertices); return;
|
||||
case GX_DRAW_QUADS: if ((_numVertices % 4) == 0 ) {IndexGenerator::AddQuads(_numVertices);} else {IndexGenerator::AddFan(_numVertices);} break;
|
||||
case GX_DRAW_TRIANGLES: if ((_numVertices % 3) == 0 ) {IndexGenerator::AddList(_numVertices);} else {IndexGenerator::AddStrip(_numVertices);} break;
|
||||
case GX_DRAW_TRIANGLE_STRIP: IndexGenerator::AddStrip(_numVertices); break;
|
||||
case GX_DRAW_TRIANGLE_FAN: IndexGenerator::AddFan(_numVertices); break;
|
||||
case GX_DRAW_LINE_STRIP: IndexGenerator::AddLineStrip(_numVertices); break;
|
||||
case GX_DRAW_LINES: if ((_numVertices % 2) == 0 ) {IndexGenerator::AddLineList(_numVertices);} else {IndexGenerator::AddLineStrip(_numVertices);} break;
|
||||
case GX_DRAW_POINTS: IndexGenerator::AddPoints(_numVertices); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,12 +110,12 @@ void AddIndices(int primitive, int numVertices)
|
|||
{
|
||||
switch (primitive)
|
||||
{
|
||||
case GX_DRAW_TRIANGLES: IndexGenerator::AddList(numVertices); break;
|
||||
case GX_DRAW_QUADS: IndexGenerator::AddQuads(numVertices); break;
|
||||
case GX_DRAW_QUADS: if ((numVertices % 4) == 0 ) {IndexGenerator::AddQuads(numVertices);} else {IndexGenerator::AddFan(numVertices);} break;
|
||||
case GX_DRAW_TRIANGLES: if ((numVertices % 3) == 0 ) {IndexGenerator::AddList(numVertices);} else {IndexGenerator::AddStrip(numVertices);} break;
|
||||
case GX_DRAW_TRIANGLE_STRIP: IndexGenerator::AddStrip(numVertices); break;
|
||||
case GX_DRAW_TRIANGLE_FAN: IndexGenerator::AddFan(numVertices); break;
|
||||
case GX_DRAW_LINE_STRIP: IndexGenerator::AddLineStrip(numVertices); break;
|
||||
case GX_DRAW_LINES: IndexGenerator::AddLineList(numVertices); break;
|
||||
case GX_DRAW_LINES: if ((numVertices % 2) == 0 ) {IndexGenerator::AddLineList(numVertices);} else {IndexGenerator::AddLineStrip(numVertices);} break;
|
||||
case GX_DRAW_POINTS: IndexGenerator::AddPoints(numVertices); break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue