Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for util ShaderCompilerSettings to Visitor and ConstVisitor #971

Merged

Conversation

theodoregoetz
Copy link
Contributor

Visitor for ShaderCompilerSettings class as used in GraphicsPipelineConfigurator::traverse()

  • New feature (non-breaking change which adds functionality)

This change allows a GraphicsPipelineConfigurator Visitor to apply to the shader hints:

struct SetPipelineStates : public vsg::Visitor
{
    void apply(vsg::Object& object) { object.traverse(*this); }
    void apply(vsg::ShaderCompileSettings& scs)
    {
        scs.defines.insert("VSG_TWO_SIDED_LIGHTING");
    }
} sps;
auto gpConf = vsg::GraphicsPipelineConfigurator::create(shaderSet);
gpConf->accept(sps);
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

@robertosfield robertosfield merged commit 3e14a30 into vsg-dev:master Sep 19, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants