You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vello should provide a SceneMetrics type, which could be returned from a Scene; multiple SceneMetrics could be added together.
Scene should have a new Scene::reserve(metrics) constructor taking a SceneMetrics value.
This could be useful for consumers who want to stitch a large amount of pre-existing scenes together in one pass. The consumer would scan over the scene metrics, reserve one giant scene, and then run a second pass to add the sub-scenes to it.
I think this would be a useful API to have, although I don't think it's a high priority.
In most cases, you will be rendering more than one frame, and so retaining the giant scene between frames is probably better anyway. Maybe my intuition about the total memory usage of a scene is off, but I expect it to be relatively small?
In most cases, you will be rendering more than one frame, and so retaining the giant scene between frames is probably better anyway.
I disagree it's a better idea.
Forgetting to reset scenes between frames is already a common footgun. The advantage of a reserve-like API is that it lets you write APIs in a more functional style, where they return Scene instead of taking a mutable reference to them.
Vello should provide a
SceneMetrics
type, which could be returned from a Scene; multiple SceneMetrics could be added together.Scene should have a new
Scene::reserve(metrics)
constructor taking a SceneMetrics value.This could be useful for consumers who want to stitch a large amount of pre-existing scenes together in one pass. The consumer would scan over the scene metrics, reserve one giant scene, and then run a second pass to add the sub-scenes to it.
The text was updated successfully, but these errors were encountered: