Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::HLSL2GLSLConverterImpl Class Reference

HLSL to GLSL shader source code converter implementation. More...

#include <HLSL2GLSLConverterImpl.hpp>

Classes

struct  ConversionAttribs
 Conversion attributes. More...
 

Public Member Functions

String Convert (ConversionAttribs &Attribs) const
 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.
 

Detailed Description

HLSL to GLSL shader source code converter implementation.

Member Function Documentation

◆ Convert()

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

Converts HLSL source to GLSL.

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

◆ CreateStream()

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

Creates a conversion stream.

Parameters
[in]InputFileName- 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.
[in]pSourceStreamFactory- Input stream factory that is used to load shader includes as well as to load the shader source code if HLSLSource is null.
[in]HLSLSource- HLSL source code. If this parameter is null, the source will be loaded from the input stream factory using InputFileName.
[in]NumSymbols- Number of symbols in the HLSLSource string \prarm [out] ppStream - Memory address where pointer to the created stream will be written