| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- $#include "Material.h"
- enum CullMode{};
- class Material : public Resource
- {
- Material();
- ~Material();
-
- void SetNumTechniques(unsigned num);
- void SetTechnique(unsigned index, Technique* tech, unsigned qualityLevel = 0, float lodDistance = 0.0f);
- void SetShaderParameter(const String name, const Variant& value);
- void SetTexture(TextureUnit unit, Texture* texture);
- void SetUVTransform(const Vector2& offset, float rotation, const Vector2& repeat);
- void SetUVTransform(const Vector2& offset, float rotation, float repeat);
- void SetCullMode(CullMode mode);
- void SetShadowCullMode(CullMode mode);
- void SetDepthBias(const BiasParameters& parameters);
- void RemoveShaderParameter(const String name);
- void ReleaseShaders();
-
- // SharedPtr<Material> Clone(const String cloneName = String::EMPTY) const;
- tolua_outside Material* MaterialClone @ Clone(const String cloneName = String::EMPTY) const;
-
- void SortTechniques();
- void MarkForAuxView(unsigned frameNumber);
-
- unsigned GetNumTechniques() const;
-
- Technique* GetTechnique(unsigned index) const;
-
- Pass* GetPass(unsigned index, StringHash passType) const;
- Pass* GetPass(unsigned index, const String passType) const;
-
- Texture* GetTexture(TextureUnit unit) const;
-
- CullMode GetCullMode() const;
- CullMode GetShadowCullMode() const;
- const BiasParameters& GetDepthBias() const;
- unsigned GetAuxViewFrameNumber() const;
- bool GetOcclusion() const;
- bool GetSpecular() const;
-
- tolua_readonly tolua_property__get_set CullMode cullMode;
- tolua_readonly tolua_property__get_set CullMode shadowCullMode;
- tolua_readonly tolua_property__get_set unsigned auxViewFrameNumber;
- tolua_readonly tolua_property__get_set bool occlusion;
- tolua_readonly tolua_property__get_set bool specular;
- };
- ${
- #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Material_new00
- static int tolua_GraphicsLuaAPI_Material_new00(lua_State* tolua_S)
- {
- return ToluaNewObject<Material>(tolua_S);
- }
- #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Material_new00_local
- static int tolua_GraphicsLuaAPI_Material_new00_local(lua_State* tolua_S)
- {
- return ToluaNewObjectGC<Material>(tolua_S);
- }
- static Material* MaterialClone(const Material* material, const String& cloneName = String::EMPTY)
- {
- if (!material)
- return 0;
-
- SharedPtr<Material> clonedMaterialPtr = material->Clone(cloneName);
- Material* clonedMaterial = clonedMaterialPtr.Get();
- clonedMaterialPtr.Detach();
-
- return clonedMaterial;
- }
- $}
|