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

fix critical issue w/ ofVbo shallow copies (custom attributes) #2843

Merged

Conversation

tgfrerer
Copy link
Member

  • fixes an issue where custom vbo attributes (and their buffers) would not be retained whenever the ofVbo was copied, since the ofVbo copy constructors would not include custom attribute data & GL handlers when assigning data from their mom object.

note

this is might have especially tripped you up if you wanted to create, and then store vbos with custom attributes in a c++ vector, since push_back() does initialise by copy, and you'd have lost all your attributes upon pushing the new ofVbo to your storage vector...

Signed-off-by: tgfrerer tim@poniesandlight.co.uk

* fixes an issue where custom vbo attributes (and their buffers) would not be retained whenever the vbo was shallow copied, since the copy constructors would not copy them over from their mom object.
* this is might have especially tripped you up when you wanted to create & then store vbos in a c++ vector, since push_back does initialise by copy, and you'd have lost all your attributes upon pushing the new ofVbo to your storage vector...

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
arturoc added a commit that referenced this pull request Mar 12, 2014
fix critical issue w/ ofVbo shallow copies (custom attributes)
@arturoc arturoc merged commit bf4d6bc into openframeworks:master Mar 12, 2014
@arturoc
Copy link
Member

arturoc commented Mar 12, 2014

thanks!

@tgfrerer tgfrerer deleted the fix-critical-vbo-attribute-copy branch March 12, 2014 19:39
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 this pull request may close these issues.

None yet

2 participants