labyrinth/source/system/uniform_model_view_matrix.cpp
void
    update(entt::registry& rRegistry)
    {
        rRegistry.view<Component::Position,
                       Component::UniformModelViewMatrix,
                       Plight::Component::RenderData>().each([&](auto const& rPosition, auto& rUniformModelViewMatrix, auto& rRenderData)
                                                             {
                                                                 Plight::Graphics::UniformBufferUpdateData<float> update;
                                                                 update.m_offset = 12 * sizeof(float);
                                                                 update.m_data = {rPosition.m_value[0] / 10000.0f, rPosition.m_value[1] / 10000.0f};
                                                                 rUniformModelViewMatrix.m_uniformBufferData.m_floatUpdateData = {update};
                                                                 rRenderData.m_uniformBufferUpdates.emplace_back(rUniformModelViewMatrix.m_uniformBufferData);
                                                             });
    }
/*
        Update all uniforms "u_modelViewMatrix" based on position
    */
Update all uniforms "u_modelViewMatrix" based on position
Update all uniforms " u_modelViewMatrix " based on position
void
    update(entt::registry& rRegistry)
    {
        rRegistry.view<Component::Position,
                       Component::UniformModelViewMatrix,
                       Plight::Component::RenderData>().each([&](auto const& rPosition, auto& rUniformModelViewMatrix, auto& rRenderData)
                                                             {
                                                                 Plight::Graphics::UniformBufferUpdateData<float> update;
                                                                 update.m_offset = 12 * sizeof(float);
                                                                 update.m_data = {rPosition.m_value[0] / 10000.0f, rPosition.m_value[1] / 10000.0f};
                                                                 rUniformModelViewMatrix.m_uniformBufferData.m_floatUpdateData = {update};
                                                                 rRenderData.m_uniformBufferUpdates.emplace_back(rUniformModelViewMatrix.m_uniformBufferData);
                                                             });
    }
void update ( entt :: registry & rRegistry ) { rRegistry . view < Component :: Position , Component :: UniformModelViewMatrix , Plight :: Component :: RenderData > ( ) . each ( [ & ] ( auto const & rPosition , auto & rUniformModelViewMatrix , auto & rRenderData ) { Plight :: Graphics :: UniformBufferUpdateData < float > update ; update . m_offset = 12 * sizeof ( float ) ; update . m_data = { rPosition . m_value [ 0 ] / 10000.0f , rPosition . m_value [ 1 ] / 10000.0f } ; rUniformModelViewMatrix . m_uniformBufferData . m_floatUpdateData = { update } ; rRenderData . m_uniformBufferUpdates . emplace_back ( rUniformModelViewMatrix . m_uniformBufferData ) ; } ) ; }
Update all uniforms "u_modelViewMatrix" based on position
Update all uniforms " u_modelViewMatrix " based on position