muda icon indicating copy to clipboard operation
muda copied to clipboard

Add New View and Viewer: IndirectBufferView

Open MuGdxy opened this issue 8 months ago • 0 comments

template<bool IsConst, typename IndexType, typename ValueType>
class IndirectBufferView
{
using value_type = ValueType;
const IndexType* m_index_buffer;
size_t m_index_buffer_offset;
size_t m_index_buffer_size;
auto_const_t<ValueType>* m_value_buffer;
size_t m_value_buffer_offset;
size_t m_value_buffer_size;
};
IndirectBufferView[i] -> 
{
    auto offset = m_index_buffer[m_index_buffer_offset + i];
    return m_value_buffer[m_value_buffer_offset + offset];
}

MuGdxy avatar Jun 23 '24 01:06 MuGdxy