[Feature Proposal] Vertex Colors on TriangleMesh

Michael Strauß michaelstrau2 at gmail.com
Fri Aug 23 01:27:56 UTC 2024


> Any solution which was good enough for normals is also good enough for vertex colors right?

Not necessarily. Designing APIs is hard, and one should try to start
from a point of asking "how would the API look like if we had
considered all of the things we know now from the beginning".

An idea that might be worth exploring is the following. Instead of
storing positions, normals, texture coordinates, etc. in separate
buffers as it is currently done in TriangleMesh, we could have a
CustomMesh<TVertex>, where TVertex is a structure that stores all
relevant components in the same place. This could be a sealed
interface that only allows a limited set of implementations (because
we don't have the option of user-defined vertex structures at the
moment), but could allow for future extension with user-defined vertex
structures.


More information about the openjfx-dev mailing list