MCPcopy Create free account
hub / github.com/RenderKit/embree / TablePushBackgroundChannel

Method TablePushBackgroundChannel

tutorials/common/imgui/imgui_tables.cpp:2237–2247  ·  view source on GitHub ↗

Bg2 is used by Selectable (and possibly other widgets) to render to the background. Unlike our Bg0/1 channel which we uses for RowBg/CellBg/Borders and where we guarantee all shapes to be CPU-clipped, the Bg2 channel being widgets-facing will rely on regular ClipRect.

Source from the content-addressed store, hash-verified

2235// Bg2 is used by Selectable (and possibly other widgets) to render to the background.
2236// Unlike our Bg0/1 channel which we uses for RowBg/CellBg/Borders and where we guarantee all shapes to be CPU-clipped, the Bg2 channel being widgets-facing will rely on regular ClipRect.
2237void ImGui::TablePushBackgroundChannel()
2238{
2239 ImGuiContext& g = *GImGui;
2240 ImGuiWindow* window = g.CurrentWindow;
2241 ImGuiTable* table = g.CurrentTable;
2242
2243 // Optimization: avoid SetCurrentChannel() + PushClipRect()
2244 table->HostBackupInnerClipRect = window->ClipRect;
2245 SetWindowClipRectBeforeSetChannel(window, table->Bg2ClipRectForDrawCmd);
2246 table->DrawSplitter->SetCurrentChannel(window->DrawList, table->Bg2DrawChannelCurrent);
2247}
2248
2249void ImGui::TablePopBackgroundChannel()
2250{

Callers

nothing calls this directly

Calls 1

SetCurrentChannelMethod · 0.80

Tested by

no test coverage detected