| 1152 | } |
| 1153 | |
| 1154 | void TextureViewer::UI_UpdateTextureDetails() |
| 1155 | { |
| 1156 | QString status; |
| 1157 | |
| 1158 | TextureDescription *texptr = GetCurrentTexture(); |
| 1159 | if(texptr == NULL) |
| 1160 | { |
| 1161 | ui->texStatusName->setText(status); |
| 1162 | ui->texStatusDim->setText(status); |
| 1163 | ui->texStatusFormat->setText(status); |
| 1164 | |
| 1165 | ui->renderContainer->setWindowTitle(tr("Unbound")); |
| 1166 | return; |
| 1167 | } |
| 1168 | |
| 1169 | TextureDescription ¤t = *texptr; |
| 1170 | |
| 1171 | ResourceId followID = m_Following.GetResourceId(m_Ctx); |
| 1172 | |
| 1173 | { |
| 1174 | TextureDescription *followtex = m_Ctx.GetTexture(followID); |
| 1175 | BufferDescription *followbuf = m_Ctx.GetBuffer(followID); |
| 1176 | |
| 1177 | QString title; |
| 1178 | |
| 1179 | if(followID == ResourceId()) |
| 1180 | { |
| 1181 | title = tr("Unbound"); |
| 1182 | } |
| 1183 | else if(followtex || followbuf) |
| 1184 | { |
| 1185 | QString name = m_Ctx.GetResourceName(followID); |
| 1186 | |
| 1187 | switch(m_Following.Type) |
| 1188 | { |
| 1189 | case FollowType::OutputColor: |
| 1190 | title = QString(tr("Cur Output %1 - %2")).arg(m_Following.index).arg(name); |
| 1191 | break; |
| 1192 | case FollowType::OutputDepth: title = QString(tr("Cur Depth Output - %1")).arg(name); break; |
| 1193 | case FollowType::ReadWrite: |
| 1194 | title = QString(tr("Cur RW Output %1 - %2")).arg(m_Following.index).arg(name); |
| 1195 | break; |
| 1196 | case FollowType::ReadOnly: |
| 1197 | title = QString(tr("Cur Input %1 - %2")).arg(m_Following.index).arg(name); |
| 1198 | break; |
| 1199 | case FollowType::OutputDepthResolve: |
| 1200 | title = QString(tr("Cur Depth Resolve Output - %1")).arg(name); |
| 1201 | break; |
| 1202 | } |
| 1203 | } |
| 1204 | else |
| 1205 | { |
| 1206 | switch(m_Following.Type) |
| 1207 | { |
| 1208 | case FollowType::OutputColor: |
| 1209 | title = QString(tr("Cur Output %1")).arg(m_Following.index); |
| 1210 | break; |
| 1211 | case FollowType::OutputDepth: title = QString(tr("Cur Depth Output")); break; |
nothing calls this directly
no test coverage detected