Replies: 2 comments 1 reply
-
I can't see how you set the color. |
Beta Was this translation helpful? Give feedback.
-
The vsg::Builder is meant to be have a simple interface and generate a relative small range of geometries. Trying to chase all possible combinations of what users might want really isn't what it's meant for. If the class doesn't do exactly what you want out of the box just roll your own scene graph - the vsg::Builder source code illustrates what is one route to setting up vsg::StateGroup and vsg::DrawIndexed/Draw nodes. Have a look at vsgExamples for use of StateGroup/Draw/DrawIndex/Geometry/BindIndexBuffers etc. |
Beta Was this translation helpful? Give feedback.
-
I try to use builer to create a square with different colors for each vertex. Modify the relevant code as follows,But only the first color of the drawn box works. Can there only be one color?

ref_ptr myBuilder::createBox(const GeometryInfo& info, const StateInfo& stateInfo)
{
auto& subgraph = _boxes[std::make_pair(info, stateInfo)];
if (subgraph)
{
return subgraph;
}
}
Beta Was this translation helpful? Give feedback.
All reactions