Diligent::HLSL2GLSLConverterImpl class

HLSL to GLSL shader source code converter implementation.

Contents

Public types

struct ConversionAttribs
Conversion attributes.

Public functions

auto Convert(ConversionAttribs& Attribs) const -> String
Converts HLSL source to GLSL.
void CreateStream(const Char* InputFileName, IShaderSourceInputStreamFactory* pSourceStreamFactory, const Char* HLSLSource, size_t NumSymbols, IHLSL2GLSLConversionStream** ppStream) const
Creates a conversion stream.

Function documentation

String Diligent::HLSL2GLSLConverterImpl::Convert(ConversionAttribs& Attribs) const

Converts HLSL source to GLSL.

Parameters
Attribs in - Conversion attributes.
Returns Converted GLSL source code.

void Diligent::HLSL2GLSLConverterImpl::CreateStream(const Char* InputFileName, IShaderSourceInputStreamFactory* pSourceStreamFactory, const Char* HLSLSource, size_t NumSymbols, IHLSL2GLSLConversionStream** ppStream) const

Creates a conversion stream.

Parameters
InputFileName in - Input file name. If HLSLSource is null, this name will be used to load shader source code from the input stream factory. If HLSLSource is not null, the name will only be used for information purposes.
pSourceStreamFactory in - Input stream factory that is used to load shader includes as well as to load the shader source code if HLSLSource is null.
HLSLSource in - HLSL source code. If this parameter is null, the source will be loaded from the input stream factory using InputFileName.
NumSymbols in - Number of symbols in the HLSLSource string \prarm [out] ppStream - Memory address where pointer to the created stream will be written
ppStream