MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / EmitLineRect

Method EmitLineRect

IntelPresentMon/Core/source/gfx/impl/FastRenderer.cpp:564–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

FastLineRectEmitMethod · 0.80

Calls 4

GetTopLeftMethod · 0.80
GetTopRightMethod · 0.80
GetBottomLeftMethod · 0.80
GetBottomRightMethod · 0.80

Tested by

no test coverage detected