If only one window is used, a bid (backend id) is not required anymore and could be replaced. In the graphics object class, the bid management can be removed and replaced by a single size_t field for the oid to be stored.
The bid/oid pair is required when a single graphics object is used in multiple windows. Each window has a backend for its own so in the backend a single graphics object is mapped to the internal data struct which is identified by the oid in the object class.
The MOTOR_SINGLE_WINDOW_OPTIMIZATION flag need to be opt-in via CMake.
If only one window is used, a
bid
(backend id) is not required anymore and could be replaced. In the graphicsobject
class, thebid
management can be removed and replaced by a singlesize_t
field for theoid
to be stored.The
bid
/oid
pair is required when a single graphicsobject
is used in multiple windows. Each window has a backend for its own so in the backend a single graphicsobject
is mapped to the internal data struct which is identified by theoid
in theobject
class.The
MOTOR_SINGLE_WINDOW_OPTIMIZATION
flag need to be opt-in via CMake.