It should be very obvious what I am doing here. I am moving all of the namespace enigma:: scoped render state to a struct whose type is
RenderStateand whose members are public by default. This completes the first part of the work detailed in #1681 that is necessary to add dirty tracking. By having all of the render state encapsulated in a struct, we can do things like push and pop states as well as serialize the state to targets other than a GPU, such as including it in the
I am not exactly sure of the performance implications of this change, but haven't noticed any degradation in any benchmarks. I have done extensive regression testing to ensure there's been no relapse in correctness either.
@JoshDreamland I think we also need to begin considering now what type of state belongs in this struct, and what type doesn't. For example, there is "render" state, such as circle precision, which is used by the general graphics functions, but does NOT need to be known by the GPU. However, it may still be useful to include in a
game_save serialization and thus could still go into the new struct.
❗️No coverage uploaded for pull request base (
master@3031c06). Click here to learn what that means.
The diff coverage is
@@ Coverage Diff @@ ## master #1738 +/- ## ========================================= Coverage ? 24.77% ========================================= Files ? 166 Lines ? 16588 Branches ? 0 ========================================= Hits ? 4109 Misses ? 12479 Partials ? 0
|Impacted Files||Coverage Δ|