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

TriMesh cannot be default constructed #801

Closed
richardeakin opened this issue Apr 3, 2015 · 2 comments
Closed

TriMesh cannot be default constructed #801

richardeakin opened this issue Apr 3, 2015 · 2 comments
Labels

Comments

@richardeakin
Copy link
Collaborator

Sometimes it is convenient to have a TriMesh as a member variable on your App class or something similar, however this isn't currently possible because it has no default constructor. Could we not just add a default Format() like so, to get the default constructor?

TriMesh( const Format &format = Format() );
@richardeakin richardeakin added the gl label Apr 3, 2015
@richardeakin
Copy link
Collaborator Author

Actually it seems like if a TriMesh were to be default constructed on the stack, it would have the same layout as if heap allocated by TriMesh::create() with no arguments, like:

 TriMesh( const TriMesh::Format &format = TriMesh::Format().positions().normals().texCoords() );

@richardeakin
Copy link
Collaborator Author

Fixed with #874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant