MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / drawCheckerboardTexture

Method drawCheckerboardTexture

Gui/ViewerGLPrivate.cpp:760–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758}
759
760void
761ViewerGL::Implementation::drawCheckerboardTexture(const RectD& rod)
762{
763 // Re-use drawCheckerboardTexture(const QPolygonF& polygon).
764 // Another solution would be to use glScissor, but:
765 // - glScissor is not used often in OpenGL, and often has bugs in OpenGL implementations.
766 // - glScissor seems to have a bug, at least on macOS Catalina and Big Sur (10.15/11.x).
767 // See:
768 // - https://discuss.pixls.us/t/checker-mask-offset-issue/24784
769 // - https://github.com/NatronGitHub/Natron/issues/614
770 // glScissor-based implementation available from:
771 // https://github.com/NatronGitHub/Natron/blob/c8e931817493afaf44bac0ca8f78c982b4c50a31/Gui/ViewerGLPrivate.cpp#L735
772
773 QPolygonF polygon;
774 polygon << QPointF(rod.x1, rod.y1) << QPointF(rod.x2, rod.y1) << QPointF(rod.x2, rod.y2) << QPointF(rod.x1, rod.y2);
775 drawCheckerboardTexture(polygon);
776}
777
778void
779ViewerGL::Implementation::drawCheckerboardTexture(const QPolygonF& polygon)

Callers 2

drawRenderingVAOMethod · 0.95
paintGLMethod · 0.80

Calls 6

QPointFClass · 0.70
toZoomCoordinatesMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected