MCPcopy Create free account
hub / github.com/baldurk/renderdoc / on_visualisation_currentIndexChanged

Method on_visualisation_currentIndexChanged

qrenderdoc/Windows/BufferViewer.cpp:7195–7233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7193}
7194
7195void BufferViewer::on_visualisation_currentIndexChanged(int index)
7196{
7197 ui->wireframeRender->setEnabled(index > 0);
7198
7199 if(!ui->wireframeRender->isEnabled())
7200 {
7201 ui->wireframeRender->setChecked(true);
7202 m_Config.wireframeDraw = true;
7203 }
7204
7205 bool explodeHidden = (index != (int)Visualisation::Explode);
7206 ui->vtxExploderLabel->setHidden(explodeHidden);
7207 ui->vtxExploderSlider->setHidden(explodeHidden);
7208 ui->exploderReset->setHidden(explodeHidden);
7209 ui->exploderScaleLabel->setHidden(explodeHidden);
7210 ui->exploderScale->setHidden(explodeHidden);
7211 // Because the vertex/prim highlights draw from a new, temporary vertex buffer,
7212 // those vertex IDs (which determine the explode displacement) won't necessarily
7213 // match the original mesh's IDs and exploded vertices. Because of this, it seems
7214 // cleanest to just avoid drawing the highlighted vert/prim with the explode
7215 // visualisation (while also getting back a little room on the toolbar used by
7216 // the extra exploder controls).
7217 ui->highlightVerts->setHidden(!explodeHidden);
7218 UpdateHighlightVerts();
7219
7220 m_Config.visualisationMode = (Visualisation)qMax(0, index);
7221
7222 m_ModelIn->setSecondaryColumn(m_ModelIn->secondaryColumn(),
7223 m_Config.visualisationMode == Visualisation::Secondary,
7224 m_ModelIn->secondaryAlpha());
7225 m_ModelOut1->setSecondaryColumn(m_ModelOut1->secondaryColumn(),
7226 m_Config.visualisationMode == Visualisation::Secondary,
7227 m_ModelOut1->secondaryAlpha());
7228 m_ModelOut2->setSecondaryColumn(m_ModelOut2->secondaryColumn(),
7229 m_Config.visualisationMode == Visualisation::Secondary,
7230 m_ModelOut2->secondaryAlpha());
7231
7232 INVOKE_MEMFN(RT_UpdateAndDisplay);
7233}
7234
7235void BufferViewer::on_drawRange_currentIndexChanged(int index)
7236{

Callers

nothing calls this directly

Calls 5

isEnabledMethod · 0.80
setSecondaryColumnMethod · 0.80
secondaryColumnMethod · 0.80
secondaryAlphaMethod · 0.80
setHiddenMethod · 0.45

Tested by

no test coverage detected