|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents a shader program that can be used in the rendering pipeline. More...
#include <IShader.hpp>


Public Member Functions | |
| void | SetData (uint index, IntPtr data, ulong dataSize) |
| void | SetTexture (uint index, ITexture2D texture) |
| void | SetTextures (Span< ITexture2D > textures) |
| void | SetSampler (uint index, ISamplerState samplerState) |
| void | SetShader () |
| Reflection.IReflectedField[] | GetVariables () |
| virtual void | SetData (unsigned index, const void *data, size_t dataSize)=0 |
| Sets an entire uniform buffer to the shader. | |
| virtual void | SetTexture (unsigned index, ITexture1D *texture)=0 |
| Sets the specified texture to a given index. | |
| virtual void | SetTextures (std::span< ITexture1D * > textures)=0 |
| Sets multiple textures to the shader using a span of ITexture1D pointers. | |
| virtual void | SetTexture (unsigned index, ITexture2D *texture)=0 |
| Sets an 2D texture to the shader at the specified index. | |
| virtual void | SetTextures (std::span< ITexture2D * > textures)=0 |
| Sets multiple 2D textures to the shader using a span of ITexture2D pointers. | |
| virtual void | SetTexture (unsigned index, ITextureCube *texture)=0 |
| Sets an cube texture to the shader at the specified index. | |
| virtual void | SetTextures (std::span< ITextureCube * > textures)=0 |
| Sets multiple cube textures to the shader using a span of ITextureCube pointers. | |
| virtual void | SetSampler (unsigned index, ISamplerState *samplerState)=0 |
| Sets an texture sampler state at the specified index. | |
| virtual void | SetShader ()=0 |
| Sets the constant buffers and the shader to the rendering pipeline. | |
| virtual std::vector< Reflection::IReflectedField * > | GetVariables () const =0 |
| Gets the exposed variables of the shader, which can be used to set values for the shader's uniform buffers. | |
| virtual void | Set (const std::string &name, const void *data, size_t dataSize)=0 |
| Sets a value for a shader variable by name. The data is copied into the shader's uniform buffer. | |
| template<typename T> | |
| void | Set (const std::string &name, const T &data) |
| Sets a value for a shader variable by name. The data is copied into the shader's uniform buffer. | |
| template<typename T> | |
| void | SetData (const T *data, unsigned index) |
| Sets an entire uniform buffer to the shader. | |
| virtual std::string_view | GetEntryName () const noexcept=0 |
| Gets the name of the entry point function for this shader. | |
| virtual const char * | GetCompilationErrorsAndWarnings () const noexcept=0 |
| Gets the compilation results for this shader. | |
| ~IShader () override=default | |
| Public Member Functions inherited from Engine3DRadSpace.Graphics.IGPUResource | |
| virtual void * | GetHandle () const noexcept=0 |
| Gets an opaque handle to the underlying GPU resource. | |
| virtual IGraphicsDevice * | GetGraphicsDevice () const noexcept=0 |
| Gets the GraphicsDevice that created this resource. | |
| virtual | ~IGPUResource ()=default |
Protected Member Functions | |
| IShader ()=default | |
| IShader (const IShader &)=delete | |
| IShader (IShader &&) noexcept=default | |
| IShader & | operator= (const IShader &)=delete |
| IShader & | operator= (IShader &&) noexcept=default |
| Protected Member Functions inherited from Engine3DRadSpace.Graphics.IGPUResource | |
| IGPUResource ()=default | |
| IGPUResource (const IGPUResource &)=delete | |
| IGPUResource & | operator= (const IGPUResource &)=delete |
| IGPUResource (IGPUResource &&) noexcept=default | |
| IGPUResource & | operator= (IGPUResource &&) noexcept=default |
Properties | |
| string | EntryName [get] |
| string | CompilationErrorsAndWarnings [get] |
| Properties inherited from Engine3DRadSpace.IPtrWrapper | |
| IntPtr | Handle [get] |
| Properties inherited from Engine3DRadSpace.Graphics.IGPUResource | |
| IGraphicsDevice | GraphicsDevice [get] |
| IntPtr | GPUHandle [get] |
Represents a shader program that can be used in the rendering pipeline.
|
protecteddefault |
|
protecteddelete |
|
protecteddefaultnoexcept |
|
overridedefault |
|
pure virtualnoexcept |
Gets the compilation results for this shader.
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::ShaderBase, and Engine3DRadSpace.Graphics::NullShader.
|
pure virtualnoexcept |
Gets the name of the entry point function for this shader.
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::ShaderBase, and Engine3DRadSpace.Graphics::NullShader.
| Reflection.IReflectedField[] Engine3DRadSpace.Graphics.IShader.GetVariables | ( | ) |
|
pure virtual |
Gets the exposed variables of the shader, which can be used to set values for the shader's uniform buffers.
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::ShaderBase, and Engine3DRadSpace.Graphics::NullShader.
|
inline |
Sets a value for a shader variable by name. The data is copied into the shader's uniform buffer.
| T | The type of the data to set. |
| name | The name of the shader variable to set. |
| data | The data to set. |
|
pure virtual |
Sets a value for a shader variable by name. The data is copied into the shader's uniform buffer.
Prefer setting the data drectly using the SetData<T> method for better performance.
| name | The name of the shader variable to set. |
| data | A pointer to the data to set. |
| dataSize | The size of the data in bytes. |
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::ShaderBase, and Engine3DRadSpace.Graphics::NullShader.
| void Engine3DRadSpace.Graphics.IShader.SetData | ( | uint | index, |
| IntPtr | data, | ||
| ulong | dataSize ) |
|
inline |
Sets an entire uniform buffer to the shader.
| T | The type of the data to set. |
| data | A pointer to the data to set. |
| index | The index of the uniform buffer to set. |
|
pure virtual |
Sets an entire uniform buffer to the shader.
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::ShaderBase, and Engine3DRadSpace.Graphics::NullShader.
| void Engine3DRadSpace.Graphics.IShader.SetSampler | ( | uint | index, |
| ISamplerState | samplerState ) |
|
pure virtual |
Sets an texture sampler state at the specified index.
| index | The index at which to set the sampler state. |
| samplerState | The sampler state to set. |
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::DomainShader, Engine3DRadSpace.Graphics::DirectX11::FragmentShader, Engine3DRadSpace.Graphics::DirectX11::GeometryShader, Engine3DRadSpace.Graphics::DirectX11::HullShader, Engine3DRadSpace.Graphics::DirectX11::VertexShader, and Engine3DRadSpace.Graphics::NullShader.
| void Engine3DRadSpace.Graphics.IShader.SetShader | ( | ) |
|
pure virtual |
Sets the constant buffers and the shader to the rendering pipeline.
Implemented in Engine3DRadSpace.Graphics.InstIShader, Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::DomainShader, Engine3DRadSpace.Graphics::DirectX11::FragmentShader, Engine3DRadSpace.Graphics::DirectX11::GeometryShader, Engine3DRadSpace.Graphics::DirectX11::HullShader, Engine3DRadSpace.Graphics::DirectX11::ShaderBase, Engine3DRadSpace.Graphics::DirectX11::VertexShader, and Engine3DRadSpace.Graphics::NullShader.
| void Engine3DRadSpace.Graphics.IShader.SetTexture | ( | uint | index, |
| ITexture2D | texture ) |
|
pure virtual |
Sets the specified texture to a given index.
| index | The index at which to set the texture. |
| texture | The texture to set. |
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::DomainShader, Engine3DRadSpace.Graphics::DirectX11::FragmentShader, Engine3DRadSpace.Graphics::DirectX11::GeometryShader, Engine3DRadSpace.Graphics::DirectX11::HullShader, Engine3DRadSpace.Graphics::DirectX11::VertexShader, and Engine3DRadSpace.Graphics::NullShader.
|
pure virtual |
Sets an 2D texture to the shader at the specified index.
| index | The index at which to set the texture. |
| texture | The texture to set. |
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::DomainShader, Engine3DRadSpace.Graphics::DirectX11::FragmentShader, Engine3DRadSpace.Graphics::DirectX11::GeometryShader, Engine3DRadSpace.Graphics::DirectX11::HullShader, Engine3DRadSpace.Graphics::DirectX11::VertexShader, and Engine3DRadSpace.Graphics::NullShader.
|
pure virtual |
Sets an cube texture to the shader at the specified index.
| index | The index at which to set the texture. |
| texture | The texture to set. |
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::DomainShader, Engine3DRadSpace.Graphics::DirectX11::FragmentShader, Engine3DRadSpace.Graphics::DirectX11::GeometryShader, Engine3DRadSpace.Graphics::DirectX11::HullShader, Engine3DRadSpace.Graphics::DirectX11::VertexShader, and Engine3DRadSpace.Graphics::NullShader.
| void Engine3DRadSpace.Graphics.IShader.SetTextures | ( | Span< ITexture2D > | textures | ) |
|
pure virtual |
Sets multiple textures to the shader using a span of ITexture1D pointers.
| textures | A span of ITexture1D pointers to set. |
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::DomainShader, Engine3DRadSpace.Graphics::DirectX11::FragmentShader, Engine3DRadSpace.Graphics::DirectX11::GeometryShader, Engine3DRadSpace.Graphics::DirectX11::HullShader, Engine3DRadSpace.Graphics::DirectX11::VertexShader, and Engine3DRadSpace.Graphics::NullShader.
|
pure virtual |
Sets multiple 2D textures to the shader using a span of ITexture2D pointers.
| textures | A span of ITexture2D pointers to set. |
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::DomainShader, Engine3DRadSpace.Graphics::DirectX11::FragmentShader, Engine3DRadSpace.Graphics::DirectX11::GeometryShader, Engine3DRadSpace.Graphics::DirectX11::HullShader, Engine3DRadSpace.Graphics::DirectX11::VertexShader, and Engine3DRadSpace.Graphics::NullShader.
|
pure virtual |
Sets multiple cube textures to the shader using a span of ITextureCube pointers.
| textures | A span of ITextureCube pointers to set. |
Implemented in Engine3DRadSpace.Graphics.Rendering.PostProcessEffect, Engine3DRadSpace.Graphics::DirectX11::DomainShader, Engine3DRadSpace.Graphics::DirectX11::FragmentShader, Engine3DRadSpace.Graphics::DirectX11::GeometryShader, Engine3DRadSpace.Graphics::DirectX11::HullShader, Engine3DRadSpace.Graphics::DirectX11::VertexShader, and Engine3DRadSpace.Graphics::NullShader.
|
get |
|
get |