Skip to content

Use same syntax for updating uniform inputs and uniform buffer inputs #1683

@heinezen

Description

@heinezen

Required Skills: C++, maybe OpenGL

Difficulty: Easy

In #1664 we switched the structure of OpenGL uniform inputs (GlUniformInput) to more performance friendly code. Uniform buffer inputs (GlUniformBufferInput) were not changed in the PR as the performance gain would have been only marginal. However, it would make sense for code quality purposes to keep the update syntax of both input types roughly the same, so that they can be maintained in the same way.

The tasks mostly consist of porting the changes from #1664 to the flow used for updating the uniform buffers. A simple example for uniform buffers that can be used for testing purposes is available in renderer demo 5 which you can access by running this command:

./run test -d renderer.tests.renderer_demo 5

Tasks:

  • Port the changes to GlUniformInput made in Vectorize uniform inputs #1664 to the GlUniformBufferInput class
  • Change the update workflow of uniform buffers, so that it aligns with the update workflow of regular uniform inputs
  • (optional) Test the performance of the new solution using callgrind:
valgrind --tool=callgrind ./run test -d renderer.tests.renderer_demo 5

Further Reading

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: rendererConcerns our graphics renderercode qualityDoes not alter behavior, but beauty of our codegood first issueSuitable for newcomershacktoberfestFor newcomers from Hacktoberfest eventimprovementEnhancement of an existing componentjust do itYou can start working on this, there should be nothing left to discusslang: c++Done in C++ codeopengl

    Type

    No type

    Projects

    Status

    Done

    Status

    ✅ Done

    Status

    renderer

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions