struct IShaderPublicParams { };
IShader.h
IShaderPublicParams can be used to hold a collection of the shader public params. Manipulate this collection, and use them during rendering by submit to the SRendParams.
virtual ~IShaderPublicParams();
virtual void AddParam(const SShaderParam & param) = 0;
Adds a new shader public parameter at the end of the collection.
virtual void AddRef() = 0;
virtual void AssignToRenderParams(struct SRendParams & rParams) = 0;
Assigns collection of shader public parameters to the specified render params structure.
virtual SShaderParam& GetParam(int nIndex) = 0;
Retrieves shader public parameter at specified index of the collection.
virtual const SShaderParam& GetParam(int nIndex) const = 0;
virtual SShaderParam* GetParamByName(const char * pszName) = 0;
Retrieves shader public parameter at specified index of the collection.
virtual const SShaderParam* GetParamByName(const char * pszName) const = 0;
virtual SShaderParam* GetParamBySemantic(uint8 eParamSemantic) = 0;
virtual const SShaderParam* GetParamBySemantic(uint8 eParamSemantic) const = 0;
virtual int GetParamCount() const = 0;
Retrieves number of parameters in collection.
virtual uint8 GetSemanticByName(const char* pszName) = 0;
virtual DynArray<SShaderParam> * GetShaderParams() = 0; virtual const DynArray<SShaderParam> * GetShaderParams() const = 0;
Gets shader parameters.
virtual void Release() = 0;
virtual void RemoveParamByName(const char * pszName) = 0;
Removes a shader public parameter
virtual void RemoveParamBySemantic(uint8 eParamSemantic) = 0;
virtual void SetParam(const char * pszName, UParamVal & pParam, EParamType nType = eType_FLOAT, uint8 eSemantic = 0) = 0;
Sets a shader parameter (and if doesn't exists, add it to the parameters list).
virtual void SetParam(int nIndex, const SShaderParam & param) = 0;
Assigns shader public parameter at specified index of the collection.
virtual void SetParamCount(int nParam) = 0;
Changes number of parameters in collection.
virtual void SetShaderParams(const DynArray<SShaderParam> & pParams) = 0;
Assigns existing shader parameters list.