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

Method setState

qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp:1377–2686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1375}
1376
1377void GLPipelineStateViewer::setState()
1378{
1379 if(!m_Ctx.IsCaptureLoaded())
1380 {
1381 clearState();
1382 return;
1383 }
1384
1385 const GLPipe::State &state = *m_Ctx.CurGLPipelineState();
1386 const ActionDescription *action = m_Ctx.CurAction();
1387
1388 bool showUnused = ui->showUnused->isChecked();
1389 bool showEmpty = ui->showEmpty->isChecked();
1390
1391 const QPixmap &tick = Pixmaps::tick(this);
1392 const QPixmap &cross = Pixmaps::cross(this);
1393
1394 bool usedBindings[128] = {};
1395
1396 ////////////////////////////////////////////////
1397 // Vertex Input
1398
1399 int vs = 0;
1400
1401 vs = ui->viAttrs->verticalScrollBar()->value();
1402 ui->viAttrs->beginUpdate();
1403 ui->viAttrs->clear();
1404 {
1405 int i = 0;
1406 for(const GLPipe::VertexAttribute &a : state.vertexInput.attributes)
1407 {
1408 bool filledSlot = true;
1409 bool usedSlot = false;
1410
1411 QString name = tr("Attribute %1").arg(i);
1412
1413 uint32_t compCount = 4;
1414 CompType compType = CompType::Float;
1415
1416 if(state.vertexShader.shaderResourceId != ResourceId())
1417 {
1418 int attrib = a.boundShaderInput;
1419
1420 if(attrib >= 0 && attrib < state.vertexShader.reflection->inputSignature.count())
1421 {
1422 name = state.vertexShader.reflection->inputSignature[attrib].varName;
1423 compCount = state.vertexShader.reflection->inputSignature[attrib].compCount;
1424 compType = VarTypeCompType(state.vertexShader.reflection->inputSignature[attrib].varType);
1425 usedSlot = true;
1426 }
1427 }
1428
1429 if(showNode(usedSlot, filledSlot))
1430 {
1431 QString format = QString(a.format.Name());
1432
1433 if(!a.enabled)
1434 format = tr("Generic=") + MakeGenericValueString(compCount, compType, a);

Callers

nothing calls this directly

Calls 15

tickFunction · 0.85
VarTypeCompTypeFunction · 0.85
PatchList_CountFunction · 0.85
fromValueFunction · 0.85
GLVBIBTagClass · 0.85
GLReadOnlyTagClass · 0.85
verticalScrollBarMethod · 0.80
beginUpdateMethod · 0.80
NameMethod · 0.80
setTagMethod · 0.80
addTopLevelItemMethod · 0.80

Tested by

no test coverage detected