Diligent Engine
Loading...
Searching...
No Matches
Diligent::IShaderSourceInputStreamFactory Struct Referenceabstract

#include <Shader.h>

Inheritance diagram for Diligent::IShaderSourceInputStreamFactory:
Diligent.IObject

Public Member Functions

virtual Bool DILIGENT_CALL_TYPE CreateInputStream (const Char *Name, IFileStream **ppStream)=0
 Creates a shader source input stream for the specified file name.
virtual Bool DILIGENT_CALL_TYPE CreateInputStream2 (const Char *Name, CREATE_SHADER_SOURCE_INPUT_STREAM_FLAGS Flags, IFileStream **ppStream)=0
 Creates a shader source input stream for the specified file name.
Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
template<typename DerivedType, typename = typename std::enable_if<std::is_base_of<IObject, DerivedType>::value>::type>
void QueryInterface (const INTERFACE_ID &IID, DerivedType **ppInterface)
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef ()=0
 Increments the number of strong references by 1.
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release ()=0
virtual IReferenceCounters *DILIGENT_CALL_TYPE GetReferenceCounters () const =0

Detailed Description

Shader source stream factory interface.

File names may use either '/' or '\' as a path separator. Implementations must treat both separators as equivalent.

Member Function Documentation

◆ CreateInputStream()

virtual Bool DILIGENT_CALL_TYPE Diligent::IShaderSourceInputStreamFactory::CreateInputStream ( const Char * Name,
IFileStream ** ppStream )
pure virtual

Creates a shader source input stream for the specified file name.

The stream is used to load the shader source code.

Parameters
[in]Name- The name of the file to load.
[out]ppStream- Pointer to the shader source input stream. May be null to only check if the source exists. The check never reports an error if the source is not found.
Returns
True if the source exists and, when ppStream is not null, the stream was created successfully. False otherwise.

◆ CreateInputStream2()

virtual Bool DILIGENT_CALL_TYPE Diligent::IShaderSourceInputStreamFactory::CreateInputStream2 ( const Char * Name,
CREATE_SHADER_SOURCE_INPUT_STREAM_FLAGS Flags,
IFileStream ** ppStream )
pure virtual

Creates a shader source input stream for the specified file name.

The stream is used to load the shader source code.

Parameters
[in]Name- The name of the file to load.
[in]Flags- Flags that control the stream creation, see Diligent::CREATE_SHADER_SOURCE_INPUT_STREAM_FLAGS.
[out]ppStream- Pointer to the shader source input stream. May be null to only check if the source exists. The check never reports an error if the source is not found, regardless of Flags.
Returns
True if the source exists and, when ppStream is not null, the stream was created successfully. False otherwise.