aconstlink / motor

Software Framework for Audio/Visual/Interactive Real-Time Applications
MIT License
1 stars 0 forks source link

determine_oid improvement #65

Closed aconstlink closed 3 months ago

aconstlink commented 3 months ago

The function determine_oid in the rendering backends can be improved by passing in the old or known oid and check if the name is still the same. If so, the input known id is returned.

New syntax:

template< typename T >
static size_t determine_oid( motor::string_cref_t name, size_t oid, motor::vector< T >& v ) noexcept

And then within the function check if oid is valid and the name equals with the stored one...

The function is implemented in the d3d11 and gl4 backends.