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

ModelLoader: specify size of v/vn/vt/f arrays when loading file #22

Open
jpaoneMines opened this issue Aug 26, 2023 · 1 comment
Open

Comments

@jpaoneMines
Copy link
Owner

For a performance boost, don't scan the file to count the number of vertices, normals, texCoords, faces.

Instead provide parameters to the function. These default to -1.

If vertices is -1, then scan the file and count.

Otherwise, allocate arrays to those initial sizes. If the provided size is greater than the actual encountered, print a message to the screen informing the user they allocated too much memory. If the provided size is too small, print a message to the screen informing the user they didn't allocate enough memory. TBD - resize the array? Or fail?

@jpaoneMines
Copy link
Owner Author

Need to investigate if the preprocessing of attributes can be done in a single pass by removing the need to count.

@jpaoneMines jpaoneMines added this to the ModelLoader updates milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant