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

Method exportHTML

qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp:2963–3121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2961}
2962
2963void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::VertexInput &vtx)
2964{
2965 const ActionDescription *action = m_Ctx.CurAction();
2966
2967 const GLPipe::State &pipe = *m_Ctx.CurGLPipelineState();
2968 {
2969 xml.writeStartElement(tr("h3"));
2970 xml.writeCharacters(tr("Vertex Attributes"));
2971 xml.writeEndElement();
2972
2973 QList<QVariantList> rows;
2974
2975 int i = 0;
2976 for(const GLPipe::VertexAttribute &a : vtx.attributes)
2977 {
2978 QString generic;
2979 if(!a.enabled)
2980 generic = MakeGenericValueString(a.format.compCount, a.format.compType, a);
2981 rows.push_back({i, (bool)a.enabled, a.vertexBufferSlot, a.format.Name(), a.byteOffset, generic});
2982
2983 i++;
2984 }
2985
2986 m_Common.exportHTMLTable(xml,
2987 {tr("Slot"), tr("Enabled"), tr("Vertex Buffer Slot"), tr("Format"),
2988 tr("Relative Offset"), tr("Generic Value")},
2989 rows);
2990 }
2991
2992 {
2993 xml.writeStartElement(tr("h3"));
2994 xml.writeCharacters(tr("Vertex Buffers"));
2995 xml.writeEndElement();
2996
2997 QList<QVariantList> rows;
2998
2999 int i = 0;
3000 for(const GLPipe::VertexBuffer &vb : vtx.vertexBuffers)
3001 {
3002 QString name = m_Ctx.GetResourceName(vb.resourceId);
3003 uint64_t length = 0;
3004
3005 if(vb.resourceId == ResourceId())
3006 {
3007 continue;
3008 }
3009 else
3010 {
3011 BufferDescription *buf = m_Ctx.GetBuffer(vb.resourceId);
3012 if(buf)
3013 length = buf->length;
3014 }
3015
3016 rows.push_back({i, name, vb.byteStride, vb.byteOffset, vb.instanceDivisor, (qulonglong)length});
3017
3018 i++;
3019 }
3020

Callers

nothing calls this directly

Calls 15

NameMethod · 0.80
exportHTMLTableMethod · 0.80
trFunction · 0.50
ResourceIdFunction · 0.50
ToQStrFunction · 0.50
FormatEnum · 0.50
CurActionMethod · 0.45
CurGLPipelineStateMethod · 0.45
push_backMethod · 0.45
GetResourceNameMethod · 0.45
GetBufferMethod · 0.45

Tested by

no test coverage detected