jfcameron / gdk-graphics

3D Rendering using OpenGLES 2.0/WebGL1.0. Platforms: Linux, Windows, Mac, x86 64bit, arm64, wasm
MIT License
1 stars 1 forks source link

vertex_data: create attribute_data class, create alternative vertex_data ctor #53

Open jfcameron opened 3 years ago

jfcameron commented 3 years ago

attribute_data_view is a good optimization for the case that the user has loaded their vertex data from elsewhere (e.g: a library that loads obj files from disk), but it is inconvenient to use when creating vertex data by hand. creating a attribute_data class that owns its data would allow the user to define their attribute data directly inside the vertex_data constructor call.