FnUsdAbstractionLib 0.6.0
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
usg::SourceCodeGenerator Class Referenceabstract

#include <ShaderSource.h>

Public Member Functions

virtual const TokensourceType () const =0
 Returns the source target type of the generator.
 
virtual MaterialSourcecreateMaterialSourceGenerator (const ShaderDescGroup &shaderGroup) const =0
 

Detailed Description

Helper interface to define material source code for different targets. Primarily use case is for creating custom glslfx runtime code.

Member Function Documentation

◆ createMaterialSourceGenerator()

virtual MaterialSource * usg::SourceCodeGenerator::createMaterialSourceGenerator ( const ShaderDescGroup shaderGroup) const
pure virtual

Create (allocate) and return the MaterialSource generator to use when creating custom shader code for this generator's source type. Calling code takes ownership of returned allocation and typically will destroy it after the MaterialSource's emitSourceCode() method has been run.



©2025 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk