Go to the documentation of this file.
17 #ifndef GZ_RENDERING_OGRE_OGREMATERIAL_HH_
18 #define GZ_RENDERING_OGRE_OGREMATERIAL_HH_
22 #include <gz/common/SuppressWarning.hh>
32 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
35 "depth_vertex_shader.glsl";
37 "depth_fragment_shader.glsl";
47 public:
virtual void Destroy()
override;
49 public:
virtual bool LightingEnabled()
const override;
51 public:
virtual void SetLightingEnabled(
const bool _enabled)
override;
54 public:
virtual bool DepthCheckEnabled()
const override;
57 public:
virtual void SetDepthCheckEnabled(
bool _enabled)
override;
60 public:
virtual bool DepthWriteEnabled()
const override;
63 public:
virtual void SetDepthWriteEnabled(
bool _enabled)
override;
65 public:
virtual math::Color Ambient()
const override;
67 public:
virtual void SetAmbient(
const math::Color &_color)
override;
69 public:
virtual math::Color Diffuse()
const override;
71 public:
virtual void SetDiffuse(
const math::Color &_color)
override;
73 public:
virtual math::Color Specular()
const override;
75 public:
virtual void SetSpecular(
const math::Color &_color)
override;
77 public:
virtual math::Color Emissive()
const override;
79 public:
virtual void SetEmissive(
const math::Color &_color)
override;
81 public:
virtual double Shininess()
const override;
83 public:
virtual void SetShininess(
const double _shininess)
override;
85 public:
virtual double Transparency()
const override;
87 public:
virtual void SetTransparency(
const double _transparency)
90 public:
virtual double Reflectivity()
const override;
92 public:
virtual void SetReflectivity(
const double _reflectivity)
95 public:
virtual bool CastShadows()
const override;
98 public:
virtual void SetCastShadows(
const bool _castShadows)
override;
100 public:
virtual bool ReceiveShadows()
const override;
102 public:
virtual void SetReceiveShadows(
const bool _receiveShadows)
105 public:
virtual bool ReflectionEnabled()
const override;
107 public:
virtual void SetReflectionEnabled(
const bool _enabled)
override;
109 public:
virtual bool HasTexture()
const override;
111 public:
virtual std::string Texture()
const override;
114 public:
virtual void SetTexture(
const std::string &_texture)
override;
116 public:
virtual void ClearTexture()
override;
118 public:
virtual bool HasNormalMap()
const override;
120 public:
virtual std::string NormalMap()
const override;
123 public:
virtual void SetNormalMap(
const std::string &_normalMap)
override;
125 public:
virtual void ClearNormalMap()
override;
130 public:
virtual void SetShaderType(
enum ShaderType _type)
override;
132 public:
virtual Ogre::MaterialPtr
Material()
const;
136 public:
virtual void SetDepthMaterial(
const double far,
137 const double near)
override;
141 public:
virtual void SetVertexShader(
const std::string &_path)
override;
145 public:
virtual std::string VertexShader()
const override;
153 public:
virtual void SetFragmentShader(
const std::string &_path)
158 public:
virtual std::string FragmentShader()
const override;
166 public:
virtual void PreRender()
override;
168 protected:
virtual void LoadOneImage(
const std::string &_name,
169 Ogre::Image &_image);
173 protected:
virtual void SetTextureImpl(
const std::string &_texture);
175 protected:
virtual Ogre::TexturePtr Texture(
const std::string &_name);
177 protected:
virtual Ogre::TexturePtr CreateTexture(
180 protected:
virtual void UpdateTransparency();
182 protected:
virtual void UpdateColorOperation();
185 protected:
void UpdateShaderParams();
191 Ogre::GpuProgramParametersSharedPtr _ogreParams);
193 protected:
virtual void Init()
override;
198 protected: Ogre::Technique *ogreTechnique =
nullptr;
200 protected: Ogre::Pass *ogrePass =
nullptr;
202 protected: Ogre::TextureUnitState *ogreTexState =
nullptr;
206 #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR <= 7
std::string vertexShaderPath
Path to vertex shader program.
Definition: gz/rendering/ogre/OgreMaterial.hh:216
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Definition: gz/rendering/ogre/OgreScene.hh:39
std::string normalMapName
Definition: gz/rendering/ogre/OgreMaterial.hh:211
const std::string depth_fragment_shader_file
Definition: gz/rendering/ogre/OgreMaterial.hh:36
Definition: gz/rendering/ogre/OgreMaterial.hh:39
Definition: gz/rendering/base/BaseMaterial.hh:38
std::string textureName
Definition: gz/rendering/ogre/OgreMaterial.hh:209
ShaderParamsPtr vertexShaderParams
Parameters to be bound to the vertex shader.
Definition: gz/rendering/ogre/OgreMaterial.hh:222
std::string fragmentShaderPath
Path to fragment shader program.
Definition: gz/rendering/ogre/OgreMaterial.hh:219
Ogre::String ogreGroup
Definition: gz/rendering/ogre/OgreMaterial.hh:204
Ogre::MaterialPtr ogreMaterial
Definition: gz/rendering/ogre/OgreMaterial.hh:196
@ ST_PIXEL
Per pixel lighting shader.
Definition: gz/rendering/ShaderType.hh:40
ShaderParamsPtr fragmentShaderParams
Parameters to be bound to the fragment shader.
Definition: gz/rendering/ogre/OgreMaterial.hh:225
ShaderType
Available types of shaders. Note that not all rendering-engines will be able to use each type....
Definition: gz/rendering/ShaderType.hh:34
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
const std::string depth_vertex_shader_file
Definition: gz/rendering/ogre/OgreMaterial.hh:34
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING