Description
owlInstanceGroupCreate
allows the list of child groups to be null. The documentation used to say (a PR has been submitted changing this) that this sets each of the children to a "null group", which together with the surrounding language implies that this is acceptable. However, if the child groups are not all set to valid groups before the parent group is used, it will crash. And, manually setting a child group to null hits an assertion if in debug mode and crashes if in release mode.
With the aforementioned PR, the documentation now clarifies that the children must be initialized before the parent group is used. So, there will no longer be an ambiguity. However, it seemed there may have been some interest in actually supporting null groups.
- The parent would not have to be re-created every time the number of children changed; the parent could be created to hold a larger number of children, and the unused children could be set to null.
- Supporting null groups would also remove the invalid intermediate state OWL can be put in where
owlInstanceGroupCreate
was called but the children were not yet set. For example, in a larger, interactive application, the loading or setup of a child object might get aborted for some reason, but the rendering might need to continue, and this invalid state might therefore lead to a crash.