cleanup for mesh example

This commit is contained in:
Hartmut Seichter 2024-07-31 23:51:58 +02:00
parent b564c2b87c
commit 43d5ceabb8

View file

@ -23,11 +23,10 @@ auto main() -> int {
.topology = pw::primitives::topology_type::triangle_list
};
auto mesh = pw::mesh{.geometry = geom};
mesh.attributes.emplace_back(
pw::attribute{.type = pw::attribute::normals,
.data = std::vector{pw::vector{1.2f, 2.4f, 4.8f}}});
auto mesh = pw::mesh{
.geometry = geom,
.attributes = {{.type = pw::attribute::normals,
.data = std::vector{pw::vector{1.2f, 2.4f, 4.8f}}}}};
for (auto i : geom.indices) {
std::print("vertex[{}]({})\n", i, geom.vertices[i]);