Cogs.Core
Public Member Functions | Public Attributes | List of all members
Cogs::EffectsD3D11 Struct Reference
Inheritance diagram for Cogs::EffectsD3D11:
Cogs::EffectsCommon Cogs::IEffects

Public Member Functions

void setDevice (struct GraphicsDeviceD3D11 *graphicsDevice, const ResourcePointer< ID3D11Device > &device)
 
void annotate (EffectHandle handle, const StringView &name) override
 Associate a name with an object for use in graphics debugging.
 
void annotateVS (EffectHandle handle, const StringView &name) override
 Associate a name with an object for use in graphics debugging.
 
void annotateGS (EffectHandle handle, const StringView &name) override
 Associate a name with an object for use in graphics debugging.
 
void annotatePS (EffectHandle handle, const StringView &name) override
 Associate a name with an object for use in graphics debugging.
 
void annotateCS (EffectHandle handle, const StringView &name) override
 Associate a name with an object for use in graphics debugging.
 
EffectHandle loadComputeEffect (const StringView &fileName, EffectFlags::EEffectFlags effectFlags) override
 Load the compute shader with the given file name and create an effect.
 
EffectHandle loadComputeEffect (const StringView &fileName, const PreprocessorDefinitions &defines, EffectFlags::EEffectFlags effectFlags) override
 Load the compute shader with the given file name and create an effect.
 
void releaseEffect (EffectHandle handle) override
 Release the effect with the given handle, freeing all resources generated during program loading.
 
void releaseResources () override
 Release all allocated effect resources.
 
EffectHandle load (const ProcessedContent &vsSource, const ProcessedContent &hsSource, const ProcessedContent &dsSource, const ProcessedContent &gsSource, const ProcessedContent &psSource, const StringView &vsEntryPoint, const StringView &hsEntryPoint, const StringView &dsEntryPoint, const StringView &gsEntryPoint, const StringView &psEntryPoint, const EffectDescription &desc) override
 
void reflectShader (Shader &shader)
 
EffectHandle load (const ProcessedContent &vsSource, const ProcessedContent &psSource, const StringView &vsEntryPoint, const StringView &psEntryPoint, const EffectDescription &desc)
 
EffectHandle load (const ProcessedContent &vsSource, const ProcessedContent &gsSource, const ProcessedContent &psSource, const StringView &vsEntryPoint, const StringView &gsEntryPoint, const StringView &psEntryPoint, const EffectDescription &desc)
 
virtual EffectHandle load (const ProcessedContent &vsSource, const ProcessedContent &hsSource, const ProcessedContent &dsSource, const ProcessedContent &gsSource, const ProcessedContent &psSource, const StringView &vsEntryPoint, const StringView &hsEntryPoint, const StringView &dsEntryPoint, const StringView &gsEntryPoint, const StringView &psEntryPoint, const EffectDescription &desc)=0
 
- Public Member Functions inherited from Cogs::EffectsCommon
EffectHandle loadEffect (const EffectDescription &description) final
 Load an effect from the given description.
 
EffectHandle loadEffectSource (const EffectDescription &description)
 
EffectHandle loadEffectContents (const EffectDescription &description, const EffectContents &contents)
 
EffectHandle loadEffect (const StringView &fileName, EffectFlags::EEffectFlags effectFlags=EffectFlags::None) final
 Load the given single file effect.
 
EffectHandle loadEffect (const StringView &fileName, const PreprocessorDefinitions &defines, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)
 
EffectHandle loadEffect (const StringView &vsFileName, const StringView &psFileName, EffectFlags::EEffectFlags effectFlags=EffectFlags::None) final
 Load an effect created from the vertex and pixel shader files given.
 
EffectHandle loadEffect (const StringView &vsFileName, const StringView &psFileName, const PreprocessorDefinitions &defines, EffectFlags::EEffectFlags effectFlags=EffectFlags::None) final
 Load an effect created from the vertex and pixel shader files given, applying the given preprocessor definitions to the shaders.
 
EffectHandle loadEffectSource (const StringView &vsSource, const StringView &psSource, EffectFlags::EEffectFlags effectFlags=EffectFlags::None) final
 Load an effect created from the vertex and pixel shader sources given.
 
EffectHandle loadEffectSource (const StringView &vsSource, const StringView &psSource, const PreprocessorDefinitions &defines, EffectFlags::EEffectFlags effectFlags=EffectFlags::None) final
 Load an effect created from the vertex and pixel shader sources given, applying the given preprocessor definitions to the shaders.
 
EffectHandle loadEffectSource (const StringView &vsSource, const StringView &gsSource, const StringView &psSource, EffectFlags::EEffectFlags effectFlags=EffectFlags::None) final
 Load an effect created from the vertex, geometry, and pixel shader sources given.
 
EffectHandle loadEffectSource (const StringView &vsSource, const StringView &gsSource, const StringView &psSource, const PreprocessorDefinitions &defines, EffectFlags::EEffectFlags effectFlags=EffectFlags::None) final
 Load an effect created from the vertex, geometry, and pixel shader sources given, applying the given preprocessor definitions to the shaders.
 
EffectVariableHandle getEffectVariable (EffectHandle effectHandle, const StringView &name) override
 Get a handle to the variable with the given name in the effect with the given effectHandle.
 
ConstantBufferBindingHandle getConstantBufferBinding (EffectHandle effectHandle, const StringView &name) override
 Get a handle to a constant buffer binding, mapping how to bind a constant buffer to the given effect.
 
TextureBindingHandle getTextureBinding (EffectHandle effectHandle, const StringView &name, const unsigned int slot) override
 Get a handle to a texture object binding, mapping how to bind textures to the given effect.
 
SamplerStateBindingHandle getSamplerStateBinding (EffectHandle effectHandle, const StringView &name, const unsigned int slot) override
 Get a handle to a sampler state object binding, mapping how to bind the sampler state to the given effect.
 
BufferBindingHandle getBufferBinding (EffectHandle effectHandle, const StringView &name) override
 Get a handle to a buffer binding.
 
void releaseBufferBinding (BufferBindingHandle bufferBindingHandle) override
 Release a handle to a buffer binding.
 
void setIOHandler (IIOHandler *handler) override
 Sets an external I/O handler to use for I/O operations.
 
IIOHandlergetIOHandler () override
 Gets the external I/O handler.
 
EffectHandle load (const ProcessedContent &vsSource, const ProcessedContent &psSource, const StringView &vsEntryPoint, const StringView &psEntryPoint, const EffectDescription &desc)
 
EffectHandle load (const ProcessedContent &vsSource, const ProcessedContent &gsSource, const ProcessedContent &psSource, const StringView &vsEntryPoint, const StringView &gsEntryPoint, const StringView &psEntryPoint, const EffectDescription &desc)
 
virtual EffectHandle load (const ProcessedContent &vsSource, const ProcessedContent &hsSource, const ProcessedContent &dsSource, const ProcessedContent &gsSource, const ProcessedContent &psSource, const StringView &vsEntryPoint, const StringView &hsEntryPoint, const StringView &dsEntryPoint, const StringView &gsEntryPoint, const StringView &psEntryPoint, const EffectDescription &desc)=0
 
void initialize (struct IBuffers *buffers)
 
virtual EffectHandle loadEffect (const EffectDescription &description)=0
 Load an effect from the given description.
 
virtual EffectHandle loadEffect (const StringView &fileName, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load the given single file effect.
 
virtual EffectHandle loadComputeEffect (const StringView &fileName, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load the compute shader with the given file name and create an effect.
 
virtual EffectHandle loadComputeEffect (const StringView &fileName, const PreprocessorDefinitions &definitions, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load the compute shader with the given file name and create an effect.
 
virtual EffectHandle loadEffect (const StringView &vsFileName, const StringView &psFileName, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load an effect created from the vertex and pixel shader files given.
 
virtual EffectHandle loadEffect (const StringView &vsFileName, const StringView &psFileName, const PreprocessorDefinitions &definitions, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load an effect created from the vertex and pixel shader files given, applying the given preprocessor definitions to the shaders.
 
virtual EffectHandle loadEffectSource (const StringView &vsSource, const StringView &psSource, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load an effect created from the vertex and pixel shader sources given.
 
virtual EffectHandle loadEffectSource (const StringView &vsSource, const StringView &gsSource, const StringView &psSource, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load an effect created from the vertex, geometry, and pixel shader sources given.
 
virtual EffectHandle loadEffectSource (const StringView &vsSource, const StringView &psSource, const PreprocessorDefinitions &definitions, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load an effect created from the vertex and pixel shader sources given, applying the given preprocessor definitions to the shaders.
 
virtual EffectHandle loadEffectSource (const StringView &vsSource, const StringView &gsSource, const StringView &psSource, const PreprocessorDefinitions &definitions, EffectFlags::EEffectFlags effectFlags=EffectFlags::None)=0
 Load an effect created from the vertex, geometry, and pixel shader sources given, applying the given preprocessor definitions to the shaders.
 
virtual void releaseEffect (EffectHandle effectHandle)=0
 Release the effect with the given handle, freeing all resources generated during program loading.
 
virtual EffectVariableHandle getEffectVariable (EffectHandle effectHandle, const StringView &name)=0
 Get a handle to the variable with the given name in the effect with the given effectHandle.
 
virtual ConstantBufferBindingHandle getConstantBufferBinding (EffectHandle effectHandle, const StringView &name)=0
 Get a handle to a constant buffer binding, mapping how to bind a constant buffer to the given effect.
 
virtual TextureBindingHandle getTextureBinding (EffectHandle effectHandle, const StringView &name, const unsigned int slot)=0
 Get a handle to a texture object binding, mapping how to bind textures to the given effect.
 
virtual BufferBindingHandle getBufferBinding (EffectHandle effectHandle, const StringView &name)=0
 Get a handle to a buffer binding.
 
virtual void releaseBufferBinding (BufferBindingHandle bufferBindingHandle)=0
 Release a handle to a buffer binding.
 
virtual SamplerStateBindingHandle getSamplerStateBinding (EffectHandle effectHandle, const StringView &name, const unsigned int slot)=0
 Get a handle to a sampler state object binding, mapping how to bind the sampler state to the given effect.
 
virtual void releaseResources ()=0
 Release all allocated effect resources.
 
virtual void annotate (EffectHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual void annotateVS (EffectHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual void annotateGS (EffectHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual void annotatePS (EffectHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual void annotateCS (EffectHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual void setIOHandler (IIOHandler *handler)=0
 Sets an external I/O handler to use for I/O operations.
 
virtual IIOHandlergetIOHandler ()
 Gets the external I/O handler.
 

Public Attributes

ResourcePointer< ID3D11Device > device
 
struct GraphicsDeviceD3D11graphicsDevice = nullptr
 
- Public Attributes inherited from Cogs::EffectsCommon
SafeResourceMap< EffectHandle, Effecteffects
 
ResourceMap< BufferBindingHandle, BufferBindingbufferBindings
 
IIOHandlerhandler = nullptr
 
std::unique_ptr< IIOHandlerdefaultHandler
 
struct IBuffersbuffers = nullptr
 

Detailed Description

Definition at line 11 of file EffectsD3D11.h.

Member Function Documentation

◆ annotate()

void Cogs::EffectsD3D11::annotate ( EffectHandle  handle,
const StringView name 
)
overridevirtual

Associate a name with an object for use in graphics debugging.

Reimplemented from Cogs::IEffects.

Definition at line 163 of file EffectsD3D11.cpp.

◆ annotateCS()

void Cogs::EffectsD3D11::annotateCS ( EffectHandle  handle,
const StringView name 
)
overridevirtual

Associate a name with an object for use in graphics debugging.

Reimplemented from Cogs::IEffects.

Definition at line 207 of file EffectsD3D11.cpp.

◆ annotateGS()

void Cogs::EffectsD3D11::annotateGS ( EffectHandle  handle,
const StringView name 
)
overridevirtual

Associate a name with an object for use in graphics debugging.

Reimplemented from Cogs::IEffects.

Definition at line 187 of file EffectsD3D11.cpp.

◆ annotatePS()

void Cogs::EffectsD3D11::annotatePS ( EffectHandle  handle,
const StringView name 
)
overridevirtual

Associate a name with an object for use in graphics debugging.

Reimplemented from Cogs::IEffects.

Definition at line 197 of file EffectsD3D11.cpp.

◆ annotateVS()

void Cogs::EffectsD3D11::annotateVS ( EffectHandle  handle,
const StringView name 
)
overridevirtual

Associate a name with an object for use in graphics debugging.

Reimplemented from Cogs::IEffects.

Definition at line 177 of file EffectsD3D11.cpp.

◆ load() [1/4]

Cogs::EffectHandle Cogs::EffectsCommon::load ( const ProcessedContent vsSource,
const ProcessedContent gsSource,
const ProcessedContent psSource,
const StringView vsEntryPoint,
const StringView gsEntryPoint,
const StringView psEntryPoint,
const EffectDescription desc 
)

Definition at line 270 of file EffectsCommon.cpp.

◆ load() [2/4]

Cogs::EffectHandle Cogs::EffectsD3D11::load ( const ProcessedContent vsSource,
const ProcessedContent hsSource,
const ProcessedContent dsSource,
const ProcessedContent gsSource,
const ProcessedContent psSource,
const StringView vsEntryPoint,
const StringView hsEntryPoint,
const StringView dsEntryPoint,
const StringView gsEntryPoint,
const StringView psEntryPoint,
const EffectDescription desc 
)
overridevirtual

Implements Cogs::EffectsCommon.

Definition at line 356 of file EffectsD3D11.cpp.

◆ load() [3/4]

virtual EffectHandle Cogs::EffectsCommon::load ( const ProcessedContent vsSource,
const ProcessedContent hsSource,
const ProcessedContent dsSource,
const ProcessedContent gsSource,
const ProcessedContent psSource,
const StringView vsEntryPoint,
const StringView hsEntryPoint,
const StringView dsEntryPoint,
const StringView gsEntryPoint,
const StringView psEntryPoint,
const EffectDescription desc 
)
virtual

Implements Cogs::EffectsCommon.

◆ load() [4/4]

Cogs::EffectHandle Cogs::EffectsCommon::load ( const ProcessedContent vsSource,
const ProcessedContent psSource,
const StringView vsEntryPoint,
const StringView psEntryPoint,
const EffectDescription desc 
)

Definition at line 264 of file EffectsCommon.cpp.

◆ loadComputeEffect() [1/2]

Cogs::EffectHandle Cogs::EffectsD3D11::loadComputeEffect ( const StringView fileName,
const PreprocessorDefinitions definitions,
EffectFlags::EEffectFlags  effectFlags 
)
overridevirtual

Load the compute shader with the given file name and create an effect.

Parameters
fileNameFile name of a compute shader.
definitionsA set of preprocessor definitions to apply to the shader source.
Returns
Handle to the loaded effect, InvalidHandle if the operation failed.

Implements Cogs::IEffects.

Definition at line 228 of file EffectsD3D11.cpp.

References Cogs::EnableShaderCache, Cogs::EnableTraceLogging, Cogs::hash(), and Cogs::Handle_t< EffectTag >::InvalidHandle.

◆ loadComputeEffect() [2/2]

Cogs::EffectHandle Cogs::EffectsD3D11::loadComputeEffect ( const StringView fileName,
EffectFlags::EEffectFlags  effectFlags 
)
overridevirtual

Load the compute shader with the given file name and create an effect.

Parameters
fileNameFile name of a compute shader.
Returns
Handle to the loaded effect, InvalidHandle if the operation failed.

Implements Cogs::IEffects.

Definition at line 223 of file EffectsD3D11.cpp.

◆ reflectShader()

void Cogs::EffectsD3D11::reflectShader ( Shader shader)

Definition at line 635 of file EffectsD3D11.cpp.

◆ releaseEffect()

void Cogs::EffectsD3D11::releaseEffect ( EffectHandle  effectHandle)
overridevirtual

Release the effect with the given handle, freeing all resources generated during program loading.

Parameters
effectHandleValid handle to a previously created effect.

Implements Cogs::IEffects.

Definition at line 218 of file EffectsD3D11.cpp.

◆ releaseResources()

void Cogs::EffectsD3D11::releaseResources ( )
overridevirtual

Release all allocated effect resources.

Implements Cogs::IEffects.

Definition at line 351 of file EffectsD3D11.cpp.

◆ setDevice()

void Cogs::EffectsD3D11::setDevice ( struct GraphicsDeviceD3D11 graphicsDevice,
const ResourcePointer< ID3D11Device > &  device 
)

Definition at line 155 of file EffectsD3D11.cpp.

Member Data Documentation

◆ device

ResourcePointer<ID3D11Device> Cogs::EffectsD3D11::device

Definition at line 44 of file EffectsD3D11.h.

◆ graphicsDevice

struct GraphicsDeviceD3D11* Cogs::EffectsD3D11::graphicsDevice = nullptr

Definition at line 45 of file EffectsD3D11.h.


The documentation for this struct was generated from the following files: