opengl: make GLRenderTimeQuery::query non-destructive
This commit is contained in:
parent
b167d1f56a
commit
e04ec0ce29
1 changed files with 1 additions and 6 deletions
|
@ -55,11 +55,7 @@ void GLRenderTimeQuery::end()
|
|||
|
||||
std::optional<RenderTimeSpan> GLRenderTimeQuery::query()
|
||||
{
|
||||
if (!m_hasResult) {
|
||||
return std::nullopt;
|
||||
}
|
||||
m_hasResult = false;
|
||||
|
||||
Q_ASSERT(m_hasResult);
|
||||
if (m_gpuProbe.query) {
|
||||
const auto context = m_context.lock();
|
||||
if (!context) {
|
||||
|
@ -80,5 +76,4 @@ std::optional<RenderTimeSpan> GLRenderTimeQuery::query()
|
|||
.end = end,
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue