Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add anariUnsetAllParameters() API function #99

Closed
jeffamstutz opened this issue Jul 20, 2023 · 1 comment · Fixed by #100
Closed

Add anariUnsetAllParameters() API function #99

jeffamstutz opened this issue Jul 20, 2023 · 1 comment · Fixed by #100

Comments

@jeffamstutz
Copy link
Contributor

jeffamstutz commented Jul 20, 2023

This issue is for adding a new API call to ANARI: anariUnsetAllParameters().

TL;DR the premise is very simple -- it is helpful to have an API function which categorically unsets all parameters on an object. This enables a trivial way to robustly "clear" all set parameters.


When an application decouples a scene graph's parameter/array representation from a particular ANARI device's object handle, it can be tricky to keep track of what parameters were removed since the ANARI object was last updated. Currently this would require there to be significant book keeping of what parameters exist on the object vs. what has been set on the ANARI object -- if a new value is present, ANARI cleanly will just overwrite the old value to the new one. This is problematic if you want the parameter to no longer exist.

This use case came up specifically when multi-device applications are (lazily) managing N devices to a single scene representation. If an object could be cleanly cleared of all its parameters, it's trivial to then guarantee that the synchronizing of parameter values from the scene graph to the ANARI object is indeed correct.

@jeffamstutz jeffamstutz changed the title Add anariUnsetAllParameters() API Add anariUnsetAllParameters() API function Jul 20, 2023
@johguenther
Copy link
Collaborator

Sounds useful. So basically an object is reset into the state it was when freshly created (once the change is committed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants