From 63b963ced8b174c86342a12f64fba3d595a39631 Mon Sep 17 00:00:00 2001 From: PeterLValve Date: Tue, 25 Mar 2014 09:23:58 -0700 Subject: [PATCH] UI: Calls within glBegin/glEnd blocks are now nested in the API call tree (including the glEnd) --- src/vogleditor/vogleditor_qapicalltreemodel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/vogleditor/vogleditor_qapicalltreemodel.cpp b/src/vogleditor/vogleditor_qapicalltreemodel.cpp index 3c75d3e..a3f8ca3 100644 --- a/src/vogleditor/vogleditor_qapicalltreemodel.cpp +++ b/src/vogleditor/vogleditor_qapicalltreemodel.cpp @@ -235,6 +235,16 @@ void vogleditor_QApiCallTreeModel::setupModelData(vogl_trace_file_reader* pTrace // reset the CurFrame so that a new frame node will be created on the next api call pCurFrame = NULL; } + else if (entrypoint_id == VOGL_ENTRYPOINT_glBegin) + { + // items in the glBegin/glEnd block will be nested, including the glEnd + pCurParent = item; + } + else if (entrypoint_id == VOGL_ENTRYPOINT_glEnd) + { + // move the parent back one level of the hierarchy, to its own parent + pCurParent = pCurParent->parent(); + } } if (pTrace_reader->get_packet_type() == cTSPTEOF) -- 2.43.0