| 562 | } |
| 563 | |
| 564 | void FastRenderer::EmitLineRect(const Rect& rect, Color c) |
| 565 | { |
| 566 | #ifdef _DEBUG |
| 567 | if (!activeBatch) |
| 568 | { |
| 569 | pmlog_warn("Batch not open"); |
| 570 | } |
| 571 | if (chainSize > 0) |
| 572 | { |
| 573 | pmlog_warn("Chain not closed"); |
| 574 | } |
| 575 | if (activeBatch->topology != D3D11_PRIMITIVE_TOPOLOGY_LINELIST) |
| 576 | { |
| 577 | pmlog_error("Not line topology"); |
| 578 | throw Except<GraphicsException>(); |
| 579 | } |
| 580 | #endif |
| 581 | chainColor = c; |
| 582 | WriteVertex(rect.GetTopLeft()); |
| 583 | WriteVertex(rect.GetTopRight()); |
| 584 | WriteVertex(rect.GetBottomLeft()); |
| 585 | WriteVertex(rect.GetBottomRight()); |
| 586 | WriteIndex(nVertices - 4); |
| 587 | WriteIndex(nVertices - 3); |
| 588 | WriteIndex(nVertices - 2); |
| 589 | WriteIndex(nVertices - 1); |
| 590 | WriteIndex(nVertices - 4); |
| 591 | WriteIndex(nVertices - 2); |
| 592 | WriteIndex(nVertices - 3); |
| 593 | WriteIndex(nVertices - 1); |
| 594 | } |
| 595 | |
| 596 | void FastRenderer::EmitLineRectTop(const Rect& rect, Color c) |
| 597 | { |
no test coverage detected