GPU/PrimitiveAssembler: Fixed drawing triangle fans.
It was skipping the second vertex assignment and using uninitialized garbage when assembling the corresponding triangle.
This commit is contained in:
parent
644d1e7ca3
commit
7b33e163b9
1 changed files with 4 additions and 5 deletions
|
@ -39,13 +39,12 @@ void PrimitiveAssembler<VertexType>::SubmitVertex(VertexType& vtx, TriangleHandl
|
||||||
|
|
||||||
buffer[buffer_index] = vtx;
|
buffer[buffer_index] = vtx;
|
||||||
|
|
||||||
if (topology == Regs::TriangleTopology::Strip) {
|
|
||||||
strip_ready |= (buffer_index == 1);
|
strip_ready |= (buffer_index == 1);
|
||||||
|
|
||||||
|
if (topology == Regs::TriangleTopology::Strip)
|
||||||
buffer_index = !buffer_index;
|
buffer_index = !buffer_index;
|
||||||
} else if (topology == Regs::TriangleTopology::Fan) {
|
else if (topology == Regs::TriangleTopology::Fan)
|
||||||
buffer_index = 1;
|
buffer_index = 1;
|
||||||
strip_ready = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue