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

Model plugin #76

Merged
merged 6 commits into from
Oct 12, 2014
Merged

Model plugin #76

merged 6 commits into from
Oct 12, 2014

Conversation

avilleret
Copy link
Contributor

first draft to fix #31

add some vector<vector > to and an associated getter to modelloader API to get model data
use VBO to display model
modelOBJ now return float array instead of glList

TODO : delete other OpenGL call from modelOBJ
TODO2 : modify modelASSIMP to use the new API

@umlaeute
Copy link
Owner

thanks. hopefully i i will be able to review and merge this by next week.

as for TODO2: i think you might rather spend your energy in creating a new modelASSIMP3 plugin than trying to resurrect modelASSIMP2...

@umlaeute umlaeute merged commit b2c3423 into umlaeute:master Oct 12, 2014
@avilleret
Copy link
Contributor Author

actually my pull request doesn't fix all the issues but only for modelOBJ plugin.
I'll try to make a modelASSIMP3 plugin when I have time.
Can I push some changes to an already merged branch ?

@umlaeute
Copy link
Owner

yes, push ahead :-)

random thoughts:

  • use const std::string& rather than std::string for performance reasons.
  • probably use enum rather than std::string for even more performance.
  • easy way to check whether a given array (e.g. "color") exists.
  • possibility to have plugin-defined stride
  • probably combine the last items two with an uint getStride(const std::string&name) that returns 0 if name doesn't name a known array.

@avilleret
Copy link
Contributor Author

ok,

I remove the string comparison (at least, by default it uses a new getVBOarray() which uses enum).
This new getter return alls VBO arrays filled by the plugin.

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.

model-loaders broken in multicontext
2 participants