|
CeresEngine 0.2.0
A game development framework
|
A shader that must be compiled as a "HLSL Shading Language". More...
#include <CeresEngine/Material/Shader.hpp>
Public Member Functions | |
| ShadingLanguage | getShadingLanguage () const noexcept final |
| Specifies the shading language of the shader resource. | |
| Optional< ShaderBinary > | compile (ShaderType type, const ShaderSpecializationConstants &specializationConstants={}) const final |
| Compiles the shader into a binary that can be loaded by the render API. | |
Public Member Functions inherited from CeresEngine::TResource< HLSLShader, Shader > | |
| ResourceHandle< HLSLShader > | getResourceHandle () const noexcept |
| Generates a hash for the provided type. | |
| SPtr< HLSLShader > | getShared () noexcept |
| Gets a shared pointer to the resource. | |
| SPtr< const HLSLShader > | getShared () const noexcept |
| Gets a shared pointer to the resource. | |
| const ResourceTypeInfo & | getResourceType () const noexcept override |
| Returns the resource type information descriptor. | |
| TResource (ResourceData &data, InputStream &dataStream) | |
| void | serialize (OutputStream &dataStream) const override |
Serializes a resource by writing data to dataStream. | |
Public Member Functions inherited from CeresEngine::Shader | |
| Shader ()=default | |
| Shader (const ShaderSource &source, const ShaderStages &stage) | |
| ~Shader () noexcept override=default | |
| const ShaderSource & | getSource () const noexcept |
| The shader source to compile the final shader to. | |
| void | setSource (const ShaderSource &source) |
| The shader source to compile the final shader to. | |
| Async< Optional< ShaderBinary > > | compileAsync (ShaderType type, ShaderSpecializationConstants specializationConstants={}) |
| Asynchronously compiles the shader into a binary that can be loaded by the render API. | |
| String | getSourceName () const |
| Gets the shader source name. | |
Public Member Functions inherited from CeresEngine::TResource< Shader > | |
| ResourceHandle< Shader > | getResourceHandle () const noexcept |
| Generates a hash for the provided type. | |
| SPtr< Shader > | getShared () noexcept |
| Gets a shared pointer to the resource. | |
| SPtr< const Shader > | getShared () const noexcept |
| Gets a shared pointer to the resource. | |
| const ResourceTypeInfo & | getResourceType () const noexcept override |
| Returns the resource type information descriptor. | |
| TResource (ResourceData &data, InputStream &dataStream) | |
| void | serialize (OutputStream &dataStream) const override |
Serializes a resource by writing data to dataStream. | |
Public Member Functions inherited from CeresEngine::Resource | |
| Resource () | |
Default constructor for the Resource class. | |
| Resource (ResourceData &data) | |
Creates a new Resource instance by passing a ResourceData instance. | |
| virtual | ~Resource () noexcept=default |
Resource virtual destructor. | |
| ResourceManager * | getResourceManager () const noexcept |
| HResource | getResourceHandle () const noexcept |
| Generates a hash for the provided type. | |
| UUID | getResourceID () const noexcept |
| HResource | getParentResource () const noexcept |
| A parent resource to which this resource is attached to. | |
| SPtr< ResourceMetadata > | getResourceMetadata () const noexcept |
| A pointer to the user-defined resource metadata. | |
| const PackagePtr & | getPackage () const noexcept |
| The package from which the resource was loaded from. | |
| template<typename T = Resource> | |
| SPtr< T > | getShared () noexcept |
| Gets a shared pointer to the resource. | |
| template<typename T = Resource> | |
| SPtr< const T > | getShared () const noexcept |
| Gets a shared pointer to the resource. | |
| Resource (ResourceData &data, InputStream &dataStream) | |
Creates a new resource by reading data from dataStream. | |
Public Member Functions inherited from CeresEngine::IReflectable | |
| virtual | ~IReflectable () noexcept=default |
Private Types | |
| using | super = TResource< HLSLShader, Shader > |
Additional Inherited Members | |
Static Public Member Functions inherited from CeresEngine::Resource | |
| template<typename Processor > | |
| static constexpr void | reflect (Processor &&RTTI) |
| Executes the given processor for every field of the struct. | |
Protected Member Functions inherited from CeresEngine::Shader | |
| ShaderSource | preProcessShader (const ShaderSource &sourceCode, const ShaderSpecializationConstants &specializationConstants, const URI &includeSearchPath) const |
| Runs the shader pre-processor on the shader. | |
| Optional< ShaderBinary > | compileShaderInternal (const ShaderSource &sourceCode, ShadingLanguage language, const URI &includeSearchPath) const |
Internal method to compile the given shaderSource using the ShaderC compiler. | |
Protected Member Functions inherited from CeresEngine::Resource | |
| HResourceStream | createStream (const ResourceStreamFlags &flags=ResourceStreamFlag::Default) |
| Creates a new resource stream. | |
| void | destroyStream (HResourceStream &stream) |
| Destroys a stream. | |
| void | markAsDirty () |
| Marks the resource as dirty. | |
Protected Attributes inherited from CeresEngine::Shader | |
| ShaderStages | mStages |
| A set of stages supported by the shader. | |
| ShaderSource | mSource = ShaderSource(ShaderType::Undefined, "") |
| The shader source to compile the final shader to. | |
A shader that must be compiled as a "HLSL Shading Language".
|
private |
|
finalvirtual |
Compiles the shader into a binary that can be loaded by the render API.
| type | The type of shader to compile. |
Implements CeresEngine::Shader.
|
inlinefinalvirtualnoexcept |
Specifies the shading language of the shader resource.
Implements CeresEngine::Shader.