Material.pkg 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. $#include "Material.h"
  2. enum CullMode{};
  3. class Material : public Resource
  4. {
  5. Material();
  6. ~Material();
  7. void SetNumTechniques(unsigned num);
  8. void SetTechnique(unsigned index, Technique* tech, unsigned qualityLevel = 0, float lodDistance = 0.0f);
  9. void SetShaderParameter(const String name, const Variant& value);
  10. void SetTexture(TextureUnit unit, Texture* texture);
  11. void SetUVTransform(const Vector2& offset, float rotation, const Vector2& repeat);
  12. void SetUVTransform(const Vector2& offset, float rotation, float repeat);
  13. void SetCullMode(CullMode mode);
  14. void SetShadowCullMode(CullMode mode);
  15. void SetDepthBias(const BiasParameters& parameters);
  16. void RemoveShaderParameter(const String name);
  17. void ReleaseShaders();
  18. // SharedPtr<Material> Clone(const String cloneName = String::EMPTY) const;
  19. void SortTechniques();
  20. void MarkForAuxView(unsigned frameNumber);
  21. unsigned GetNumTechniques() const;
  22. Technique* GetTechnique(unsigned index) const;
  23. Pass* GetPass(unsigned index, StringHash passType) const;
  24. Pass* GetPass(unsigned index, const String passType) const;
  25. Texture* GetTexture(TextureUnit unit) const;
  26. CullMode GetCullMode() const;
  27. CullMode GetShadowCullMode() const;
  28. const BiasParameters& GetDepthBias() const;
  29. unsigned GetAuxViewFrameNumber() const;
  30. bool GetOcclusion() const;
  31. bool GetSpecular() const;
  32. tolua_readonly tolua_property__get_set CullMode cullMode;
  33. tolua_readonly tolua_property__get_set CullMode shadowCullMode;
  34. tolua_readonly tolua_property__get_set unsigned auxViewFrameNumber;
  35. tolua_readonly tolua_property__get_set bool occlusion;
  36. tolua_readonly tolua_property__get_set bool specular;
  37. };
  38. ${
  39. #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Material_new00
  40. static int tolua_GraphicsLuaAPI_Material_new00(lua_State* tolua_S)
  41. {
  42. return ToluaNewObject<Material>(tolua_S);
  43. }
  44. #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Material_new00_local
  45. static int tolua_GraphicsLuaAPI_Material_new00_local(lua_State* tolua_S)
  46. {
  47. return ToluaNewObjectGC<Material>(tolua_S);
  48. }
  49. $}