Material.pkg 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. $#include "Material.h"
  2. /// Describes how to render 3D geometries.
  3. class Material : public Resource
  4. {
  5. public:
  6. /// Return number of techniques.
  7. unsigned GetNumTechniques() const { return techniques_.Size(); }
  8. /// Return technique entry by index.
  9. const TechniqueEntry& GetTechniqueEntry(unsigned index) const;
  10. /// Return technique by index.
  11. Technique* GetTechnique(unsigned index) const;
  12. /// Return pass by technique index and pass type.
  13. Pass* GetPass(unsigned index, StringHash passType) const;
  14. /// Return texture by unit.
  15. Texture* GetTexture(TextureUnit unit) const;
  16. /// Return all textures.
  17. const SharedPtr<Texture>* GetTextures() const { return &textures_[0]; }
  18. /// Return shader parameter.
  19. const Vector4& GetShaderParameter(const String& name) const;
  20. /// Return normal culling mode.
  21. CullMode GetCullMode() const { return cullMode_; }
  22. /// Return culling mode for shadows.
  23. CullMode GetShadowCullMode() const { return shadowCullMode_; }
  24. /// Return depth bias.
  25. const BiasParameters& GetDepthBias() const { return depthBias_; }
  26. /// Return last auxiliary view rendered frame number.
  27. unsigned GetAuxViewFrameNumber() const { return auxViewFrameNumber_; }
  28. /// Return whether should render occlusion.
  29. bool GetOcclusion() const { return occlusion_; }
  30. /// Return whether should render specular.
  31. bool GetSpecular() const { return specular_; }
  32. /// Return name for texture unit.
  33. static String GetTextureUnitName(TextureUnit unit);
  34. };