Click or drag to resize
Ab4d.SharpEngine logo

ShadersManager Class

ShadersManager provides methods for loading and caching shaders (vertex, geometry, fragment shaders).
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CoreComponentBase
    Ab4d.SharpEngine.CoreGpuDeviceComponent
      Ab4d.SharpEngine.UtilitiesShadersManager

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public sealed class ShadersManager : GpuDeviceComponent

The ShadersManager type exposes the following members.

Methods
 NameDescription
Public methodStatic memberCreate 
Public methodCreateShaderModule Creates a ShaderModule from the specified shaderBytecode.
Public methodGetOrCreatePipelineShaderStage GetOrCreatePipelineShaderStage method first tries to gets the shader with shaderResourceName from the cache. If it does not exist in the cache, then a new a shader is created from the specified shaderResourceName. The method returns PipelineShaderStageCreateInfo. ShaderModule can be get from Module field on the returned PipelineShaderStageCreateInfo struct.
Public methodGetOrCreateShaderModule GetOrCreateShaderModule method first tries to gets the shader with shaderResourceName from the cache. If it does not exist in the cache, then a new a shader is created from the specified shaderResourceName.
Public methodGetRegisteredShaderResourceNames Returns an array of strings of all registered resource names. This method is the same as static GetRegisteredShaderResourceNamesStatic method.
Public methodStatic memberGetRegisteredShaderResourceNamesStatic Returns an array of strings of all registered resource names.
Public methodGetShaderBytes Gets bytes array of the shader byte code. Before using this method, the shader resources need to be registered with RegisterShaderResource(ShaderBytecodeProvider) method.
Public methodRegisterShaderResource(ShaderBytecodeProvider) Registers newShaderResource as source for shaders code. Returns true if resource was registered, false if the same resource was already registered. This method is the same as static RegisterShaderResourceStatic(ShaderBytecodeProvider) method.
Public methodRegisterShaderResource(String, Byte) Registers the specified resourceName and its bytes array as a source for the shaders bytecode. Returns true if resource was registered, false if the same resource was already registered. This method is the same as static RegisterShaderResourceStatic(String, Byte) method.
Public methodStatic memberRegisterShaderResourceStatic(ShaderBytecodeProvider) Registers newShaderResource as source for shaders code. Returns true if resource was registered, false if the same resource was already registered. This method is the same as non-static RegisterShaderResource(ShaderBytecodeProvider) method.
Public methodStatic memberRegisterShaderResourceStatic(String, Byte) Registers the specified resourceName and its bytes array as a source for the shaders bytecode. Returns true if resource was registered, false if the same resource was already registered. This method is the same as non-static RegisterShaderResource(String, Byte) method.
Public methodUnregisterShaderResource(ShaderBytecodeProvider) Unregisters shaderResource as source for shaders code. Returns true if resource was unregistered, false if the this resource was not registered and was therefore not unregistered. This method is the same as static UnregisterShaderResourceStatic(ShaderBytecodeProvider) method.
Public methodUnregisterShaderResource(String) Unregisters the specified resourceName from the list of registered shader resources (resource that was previously registered by RegisterShaderResource(String, Byte) or RegisterShaderResourceStatic(String, Byte). Returns true if resource was unregistered, false if the this resource was not registered and was therefore not unregistered. This method is the same as static UnregisterShaderResourceStatic(String) method.
Public methodStatic memberUnregisterShaderResourceStatic(ShaderBytecodeProvider) Unregisters shaderResource as source for shaders code. Returns true if resource was unregistered, false if the this resource was not registered and was therefore not unregistered. This method is the same as non-static UnregisterShaderResource(ShaderBytecodeProvider) method.
Public methodStatic memberUnregisterShaderResourceStatic(String) Unregisters the specified resourceName from the list of registered shader resources (resource that was previously registered by RegisterShaderResource(String, Byte) or RegisterShaderResourceStatic(String, Byte). Returns true if resource was unregistered, false if the this resource was not registered and was therefore not unregistered. This method is the same as non-static UnregisterShaderResource(String) method.
Top
See Also