Nameless Engine
|
#include <ShaderResource.h>
Public Member Functions | |
virtual std::optional< Error > | useNewTexture (std::unique_ptr< TextureHandle > pTextureToUse)=0 |
![]() | |
virtual std::optional< Error > | changeUsedPipelines (const std::unordered_set< Pipeline * > &pipelinesToUse)=0 |
std::string | getResourceName () const |
Protected Member Functions | |
ShaderTextureResource (const std::string &sResourceName) | |
![]() | |
ShaderResourceBase (const std::string &sResourceName) | |
virtual std::optional< Error > | onAfterAllPipelinesRefreshedResources ()=0 |
References some texture (maybe array/table) from shader code.
|
protected |
Initializes the resource.
sResourceName | Name of the resource we are referencing (should be exactly the same as the resource name written in the shader file we are referencing). |
|
pure virtual |
Makes the shader resource to reference the new (specified) texture.
draw
function while this function is not finished (i.e. make sure the CPU will not queue a new frame while this function is not finished).pTextureToUse | Texture to reference. |
Implemented in ne::GlslShaderTextureResource, and ne::HlslShaderTextureResource.