-
Notifications
You must be signed in to change notification settings - Fork 482
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
Using templated parameters for indices and vertex positions #2
Comments
This is now fixed for indices in master - all functions that accept index buffers have templated overloads. I do not plan on supporting double-precision vertex positions at this time since that would introduce extra complexity and this is a very niche use case. |
Just registering my desire for double-precision vertex support. I know that this is old and there don't appear to be many requests for it. I need it for data that is from planetary scale down to less than one meter. I try to to keep doubles around as long as possible and use some of the techniques in Cozzi & Ring's 3D Engine Design for Virtual Globes (namely eye relative coordinates and splitting double precision into two floats). Also, double precision support doesn't have to use templates in the API, you could just add overloads of double* instead. That still leaves open the possibility to use templates in the implementation files to minimize duplication. |
FWIW this is very unlikely to happen because of the extra overloads/variants it introduces to many APIs and implementations, and because the typical use case involves single-precision floats as this is the format GPUs support natively. However one important note is that most algorithms don't output positional data, and as such it's actually okay to - for example:
This should provide results that are pretty similar to running the original algorithms directly on double precision inputs. |
Thank you. That all sounds pretty reasonable and I will give that a try. |
If templated parameters were used for indices (common types include uint8_t, uint16_t, uint32_t, unsigned short, and unsigned int) and vertex positions (float, double), the library would be more flexible with regard to the potential needs of users.
The text was updated successfully, but these errors were encountered: