Lysa  0.0
Lysa 3D Engine
ShaderMaterial Class Reference

Detailed Description

Shader-based material

+ Inheritance diagram for ShaderMaterial:

Public Member Functions

 ShaderMaterial (const std::shared_ptr< ShaderMaterial > &orig)
 
 ShaderMaterial (const std::string &fragShaderFileName, const std::string &vertShaderFileName="")
 
pipeline_id getPipelineId () const override
 
const auto & getFragFileName () const
 
const auto & getVertFileName () const
 
void setParameter (int index, const float4 &value)
 
auto getParameter (const int index) const
 
MaterialData getMaterialData () const override
 
- Public Member Functions inherited from Material
auto getCullMode () const
 
void setCullMode (const vireo::CullMode mode)
 
auto getTransparency () const
 
void setTransparency (const Transparency transparencyMode)
 
auto getAlphaScissor () const
 
void setAlphaScissor (const float scissor)
 
auto isUploaded () const
 
void upload () const
 
const auto & getIndex () const
 
auto getType () const
 
void setBypassUpload (const bool bypass)
 
- Public Member Functions inherited from ManagedResource
 ManagedResource () = default
 
 ManagedResource (UniqueResource &) = delete
 
ManagedResource & operator= (ManagedResource &) = delete
 
- Public Member Functions inherited from Resource
bool operator== (const Resource &other) const
 
 Resource () = default
 
 Resource (const unique_id id)
 
virtual ~Resource () = default
 

Additional Inherited Members

- Public Types inherited from Material
enum  Type { STANDARD, SHADER }
 
- Public Attributes inherited from ManagedResource
uint32 refCounter {0}
 
- Public Attributes inherited from Resource
unique_id id {INVALID_ID}
 
- Protected Member Functions inherited from Material
 Material (Type type)
 

Constructor & Destructor Documentation

ShaderMaterial ( const std::shared_ptr< ShaderMaterial > &  orig)

Creates a ShaderMaterial by copy

ShaderMaterial ( const std::string &  fragShaderFileName,
const std::string &  vertShaderFileName = "" 
)

Creates a ShaderMaterial

Parameters
fragShaderFileNamefragment shader file path, relative to the application directory
vertShaderFileNamevertex shader file path, relative to the application directory

Member Function Documentation

const auto& getFragFileName ( ) const
inline

Returns the fragment shader file path, relative to the application directory

MaterialData getMaterialData ( ) const
overridevirtual
auto getParameter ( const int  index) const
inline

Returns a parameter value

pipeline_id getPipelineId ( ) const
overridevirtual
const auto& getVertFileName ( ) const
inline

Returns the vertex shader file path, relative to the application directory

void setParameter ( int  index,
const float4 &  value 
)

Sets a parameter value