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

Common vertex format #42

Closed
kvark opened this issue May 24, 2017 · 1 comment
Closed

Common vertex format #42

kvark opened this issue May 24, 2017 · 1 comment
Labels

Comments

@kvark
Copy link
Member

kvark commented May 24, 2017

Considering #25 and #26 to generate more vertex data, we may end up with too much (partially redundant) code if we want the generators to support various combinations like vertex + normal, vertex, vertex + tex-coords.

We might want to consider a single vertex format to be used by all generators, potentially also covering #27. The user should still be able to map the vertex to its own format and drop some of the generated data.

The main problem I see here is the complexity of shared vertex generation. For example, a cube would no longer be able to share any vertices, since each face has a different normal (unless we smooth normals over the cube, which doesn't make much sense).

@kvark kvark added the question label May 24, 2017
@kvark
Copy link
Member Author

kvark commented May 24, 2017

Another idea is to only generate fat vertices with the Iterator implementation of the generator (thus, non-shared). This is rather straightforward, and then we can use LruIndexer to make shared vertices and indexed polygons from it.

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