Replies: 2 comments 6 replies
-
Find the color vsg4Array node. This example may help you:“vsgExamples: state\vsgdynamicvertex ”. |
Beta Was this translation helpful? Give feedback.
-
You can dive into the subgraph and modifying the existing colour as suggested above or add your own behaviors, like additional colours used for picking, you can modifying the vsg::ShaderSet that the loaders use by setting the vsg::Options::shaderSets[] or by setting the vsg::Builder.shaderSet. The vsg::ShaderSet provides a way of specifying what uniforms, textures and and vertex arrays should be used with a set of shaders, along with #define support for enabling/disabling different code paths in the shaders. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm exploring how to Vulkan Scene Graph in a CAD context and as part of that I'd like to be able to click on an object and make it "selected", and make it show visually.
To make things simpler, I'd initially like to change the color of a box created by the Builder. By dumping the box created by the builder as a vsgt file by
vsg::write()
, I found that the color is resides in avsg4Array
of size 1 with id=6. But how would I find this node programmatically, and how would I set its value and refresh the view?I'd also like to be able to do the same with an STL file loaded by
vsg::read_cast<vsg::Node>()
, and I wonder how would I change the color of such a node. However I'm wondering ifvsgXchange
does not add a lot of nodes and memory model that would be "redundant" in a CAD context?Beta Was this translation helpful? Give feedback.
All reactions