Use depth in default sort mode (#2744)

submit param _depth is no longer ignored when using default sort mode
This commit is contained in:
Alexander 2022-03-14 18:58:59 +03:00 committed by GitHub
parent 12e3ad2970
commit 6a1809baa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1263,13 +1263,13 @@ namespace bgfx
m_key.m_view = _id;
SortKey::Enum type = SortKey::SortProgram;
SortKey::Enum type;
switch (s_ctx->m_view[_id].m_mode)
{
case ViewMode::Sequential: m_key.m_seq = s_ctx->getSeqIncr(_id); type = SortKey::SortSequence; break;
case ViewMode::DepthAscending: m_key.m_depth = _depth; type = SortKey::SortDepth; break;
case ViewMode::DepthDescending: m_key.m_depth = UINT32_MAX-_depth; type = SortKey::SortDepth; break;
default: break;
default: m_key.m_depth = _depth; type = SortKey::SortProgram; break;
}
uint64_t key = m_key.encodeDraw(type);