-
Notifications
You must be signed in to change notification settings - Fork 10
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
Make texture=, shader= setters work on Weak* types #96
Comments
Right that was done on purpose in order to be able to share resources, however this design hits a limit with temporaries. the fix isn't obvious. |
This comment was marked as off-topic.
This comment was marked as off-topic.
It actually makes sense for these setters to only accept Weak* counterparts making it explicit that they are unmanaged resources. |
On the other hand, it's not a weak resource, UnloadMaterial unloads both shader and all the textures... But if part of a Model, then it's not destroyed... |
I am going full circle here, that's what the repo used in 88cd872 that's a year ago! |
Also review |
The solution here is to make a setter with parameter constraints that disallow rvalues. |
Somehow tmp are not sinked into the setter and a destructor call is generated in the outer scope.
The text was updated successfully, but these errors were encountered: