-
Notifications
You must be signed in to change notification settings - Fork 109
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
renderer/Scene: Scene paints modifications #2957
Comments
See also: #2598 |
@lpogic Hello, this is my suggestion. Please let me know if this doesn't compatible with you. Thanks. Addition
Remove
|
@hermet Such an API would be enough for me. Only thing is will there be control over paint free during |
@lpogic Please check
|
@hermet In fact, this way I can ensure that the reference counter does not reset to zero until I decrement it externally. Thanks for the tip! |
For now, the only ways to modify scene paints are
Result Scene::push(Paint* paint)
andResult Scene::clear(bool free)
methods. It is still possible to get scene paints vialist<Paint*>& Scene::paints()
and modify the list directly, but this is probably not the best way to do it because it breaks the reference counting.My suggestion is to add some methods for more control over the paints in the scene, for example:
Result Scene::remove(Paint* paint)
- removespaint
from sceneResult Scene::insert(size_t index, Paint* paint)
- insertspaint
into scene atindex
The text was updated successfully, but these errors were encountered: