fix triangle_fan size calculation
wasn't updated for the new primitive restart implementation
This commit is contained in:
parent
a6412f7bd4
commit
1aa10b579a
|
@ -191,8 +191,8 @@ template <bool pr> void IndexGenerator::AddFan(u32 numVerts)
|
||||||
* or as strip: 1203, 5647
|
* or as strip: 1203, 5647
|
||||||
*
|
*
|
||||||
* Warning:
|
* Warning:
|
||||||
* A simple triangle have to be rendered for three vertices.
|
* A simple triangle has to be rendered for three vertices.
|
||||||
* SMS do this for sun rays
|
* ZWW do this for sun rays
|
||||||
*/
|
*/
|
||||||
template <bool pr> void IndexGenerator::AddQuads(u32 numVerts)
|
template <bool pr> void IndexGenerator::AddQuads(u32 numVerts)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,7 @@ u32 VertexManager::GetRemainingIndices(int primitive)
|
||||||
case GX_DRAW_TRIANGLE_STRIP:
|
case GX_DRAW_TRIANGLE_STRIP:
|
||||||
return (MAXIBUFFERSIZE - IndexGenerator::GetTriangleindexLen()) / 1 - 1;
|
return (MAXIBUFFERSIZE - IndexGenerator::GetTriangleindexLen()) / 1 - 1;
|
||||||
case GX_DRAW_TRIANGLE_FAN:
|
case GX_DRAW_TRIANGLE_FAN:
|
||||||
return (MAXIBUFFERSIZE - IndexGenerator::GetTriangleindexLen()) / 4 + 2;
|
return (MAXIBUFFERSIZE - IndexGenerator::GetTriangleindexLen()) / 6 * 4 + 1;
|
||||||
|
|
||||||
case GX_DRAW_LINES:
|
case GX_DRAW_LINES:
|
||||||
return (MAXIBUFFERSIZE - IndexGenerator::GetLineindexLen());
|
return (MAXIBUFFERSIZE - IndexGenerator::GetLineindexLen());
|
||||||
|
|
Loading…
Reference in New Issue