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

Method UpdateCurrentMeshConfig

qrenderdoc/Windows/BufferViewer.cpp:4941–4998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4939}
4940
4941void BufferViewer::UpdateCurrentMeshConfig()
4942{
4943 BBoxData bbox;
4944
4945 uint32_t eventId = m_Ctx.CurEvent();
4946
4947 {
4948 QMutexLocker autolocker(&m_BBoxLock);
4949 if(m_BBoxes.contains(eventId))
4950 bbox = m_BBoxes[eventId];
4951 }
4952
4953 m_Config.type = m_CurStage;
4954 switch(m_CurStage)
4955 {
4956 case MeshDataStage::VSIn:
4957 m_Config.position = m_InPosition;
4958 m_Config.second = m_InSecondary;
4959 break;
4960 case MeshDataStage::VSOut:
4961 m_Config.position = m_Out1Position;
4962 m_Config.second = m_Out1Secondary;
4963 break;
4964 case MeshDataStage::GSOut:
4965 case MeshDataStage::MeshOut:
4966 m_Config.position = m_Out2Position;
4967 m_Config.second = m_Out2Secondary;
4968 break;
4969 case MeshDataStage::TaskOut:
4970 default: break;
4971 }
4972
4973 UI_UpdateGuessParameters();
4974
4975 m_Config.showBBox = false;
4976
4977 if(m_CurStage == MeshDataStage::TaskOut)
4978 return;
4979
4980 BufferItemModel *model = currentBufferModel();
4981 int stage = currentStageIndex();
4982
4983 if(model)
4984 {
4985 int posEl = model->posColumn();
4986 if(posEl >= 0 && posEl < model->getConfig().columns.count() &&
4987 posEl < bbox.bounds[stage].Min.count())
4988 {
4989 m_Config.minBounds = bbox.bounds[stage].Min[posEl];
4990 m_Config.maxBounds = bbox.bounds[stage].Max[posEl];
4991 m_Config.showBBox = !isCurrentRasterOut();
4992
4993 int compCount = model->getConfig().columns[posEl].type.columns;
4994
4995 UI_UpdateBoundingBoxLabels(compCount);
4996 }
4997 }
4998}

Callers

nothing calls this directly

Calls 4

posColumnMethod · 0.80
CurEventMethod · 0.45
containsMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected