Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::RenderStateCacheCreateInfo Struct Reference

Render state cache create information. More...

#include <RenderStateCache.h>

Public Attributes

IRenderDevicepDevice = nullptr
 A pointer to the render device, must not be null.
 
struct IArchiverFactorypArchiverFactory = nullptr
 Archiver factory, must not be null.
 
RENDER_STATE_CACHE_LOG_LEVEL LogLevel = RENDER_STATE_CACHE_LOG_LEVEL_NORMAL
 Logging level, see Diligent::RENDER_STATE_CACHE_LOG_LEVEL.
 
RENDER_STATE_CACHE_FILE_HASH_MODE FileHashMode = RENDER_STATE_CACHE_FILE_HASH_MODE_BY_CONTENT
 Source file hash mode, see Diligent::RENDER_STATE_CACHE_FILE_HASH_MODE.
 
bool EnableHotReload = false
 Whether to enable hot shader and pipeline state reloading.
 
bool OptimizeGLShaders = true
 Whether to optimize OpenGL shaders.
 
IShaderSourceInputStreamFactorypReloadSource = nullptr
 

Detailed Description

Render state cache create information.

Member Data Documentation

◆ EnableHotReload

bool Diligent::RenderStateCacheCreateInfo::EnableHotReload = false

Whether to enable hot shader and pipeline state reloading.

When enabled, the cache will support the Reload() method that detects changes in the original shader source files and reloads the corresponding shaders and pipeline states.

Hot reloading requires that the file hash mode is Diligent::RENDER_STATE_CACHE_FILE_HASH_MODE_BY_CONTENT.

Note
Hot reloading introduces some overhead and should generally be disabled in production builds.

◆ OptimizeGLShaders

bool Diligent::RenderStateCacheCreateInfo::OptimizeGLShaders = true

Whether to optimize OpenGL shaders.

This option directly controls the value of the SerializationDeviceGLInfo::OptimizeShaders member of the internal serialization device.

◆ pArchiverFactory

struct IArchiverFactory* Diligent::RenderStateCacheCreateInfo::pArchiverFactory = nullptr

Archiver factory, must not be null.

Use LoadAndGetArchiverFactory() from ArchiverFactoryLoader.h to create the factory.

◆ pReloadSource

IShaderSourceInputStreamFactory* Diligent::RenderStateCacheCreateInfo::pReloadSource = nullptr

Optional shader source input stream factory to use when reloading shaders. If null, original source factory will be used.