|
|
|
@ -47,10 +47,8 @@ int main() { |
|
|
|
{ |
|
|
|
{ |
|
|
|
Trade::MeshData meshData{MeshPrimitive::Lines, 5}; |
|
|
|
Trade::MeshData meshData{MeshPrimitive::Lines, 5}; |
|
|
|
/* [compile-external] */ |
|
|
|
/* [compile-external] */ |
|
|
|
GL::Buffer indices, vertices; |
|
|
|
GL::Buffer indices{meshData.indexData()}; |
|
|
|
indices.setData(meshData.indexData()); |
|
|
|
GL::Buffer vertices{meshData.vertexData()}; |
|
|
|
vertices.setData(meshData.vertexData()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GL::Mesh mesh = MeshTools::compile(meshData, indices, vertices); |
|
|
|
GL::Mesh mesh = MeshTools::compile(meshData, indices, vertices); |
|
|
|
/* [compile-external] */ |
|
|
|
/* [compile-external] */ |
|
|
|
} |
|
|
|
} |
|
|
|
@ -60,9 +58,8 @@ Trade::MeshData meshData{MeshPrimitive::Lines, 5}; |
|
|
|
/* [compile-external-attributes] */ |
|
|
|
/* [compile-external-attributes] */ |
|
|
|
Trade::MeshAttribute myCustomAttribute = DOXYGEN_ELLIPSIS({}); |
|
|
|
Trade::MeshAttribute myCustomAttribute = DOXYGEN_ELLIPSIS({}); |
|
|
|
|
|
|
|
|
|
|
|
GL::Buffer indices, vertices; |
|
|
|
GL::Buffer indices{meshData.indexData()}; |
|
|
|
indices.setData(meshData.indexData()); |
|
|
|
GL::Buffer vertices{meshData.vertexData()}; |
|
|
|
vertices.setData(meshData.vertexData()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Let compile() handle the usual attributes and configure custom ones after */ |
|
|
|
/* Let compile() handle the usual attributes and configure custom ones after */ |
|
|
|
GL::Mesh mesh = MeshTools::compile(meshData, std::move(indices), vertices); |
|
|
|
GL::Mesh mesh = MeshTools::compile(meshData, std::move(indices), vertices); |
|
|
|
|