... but variable sets are still stored additionally for variables.
// user provided variable set
motor::vector< std::pair<
motor::graphics::variable_set_ptr_t,
motor::vector< uniform_variable_link > > > var_sets_data ;
This could be changed so that the variable set index var_set_idx is stored with the uniform link
struct uniform_variable_link
{
size_t var_set_idx ;
// the index into the shader_config::uniforms array
size_t uniform_id ;
// the user variable holding the data.
motor::graphics::ivariable_ptr_t var ;
// pointing into the mem_block
void_ptr_t mem = nullptr ;
};
Because the multiple variable sets feature is rarely used, this could be simply faster because less memory indirection is done.
There are many vector in vector variable storage containers.
Since the refactoring of the managed pointer model, there are placehoders for every variable set ...
... but variable sets are still stored additionally for variables.
This could be changed so that the variable set index
var_set_idx
is stored with the uniform linkBecause the multiple variable sets feature is rarely used, this could be simply faster because less memory indirection is done.
This could be done for GL4 and D3D11.