Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre/OgreRenderTargetMaterial.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef GZ_RENDERING_OGRE_OGRRENDERTARGETMATERIAL_HH_
18 #define GZ_RENDERING_OGRE_OGRRENDERTARGETMATERIAL_HH_
19 
20 #include <vector>
21 
22 #include "gz/rendering/config.hh"
25 #include "gz/rendering/ogre/Export.hh"
26 
27 // Ogre::MaterialManager::Listener isn't a dll-interface class, this may cause
28 // issues
29 #ifdef _MSC_VER
30  #pragma warning(push)
31  #pragma warning(disable:4275)
32 #endif
33 
34 namespace ignition
35 {
36  namespace rendering
37  {
38  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
39  //
52  class IGNITION_RENDERING_OGRE_VISIBLE OgreRenderTargetMaterial :
53  public Ogre::RenderTargetListener,
54  public Ogre::MaterialManager::Listener
55  {
61  Ogre::RenderTarget *_renderTarget, Ogre::Material *_material);
62 
64  public: ~OgreRenderTargetMaterial();
65 
69  private: virtual void preRenderTargetUpdate(
70  const Ogre::RenderTargetEvent &_evt) override;
71 
75  private: virtual void postRenderTargetUpdate(
76  const Ogre::RenderTargetEvent &_evt) override;
77 
88  public: virtual Ogre::Technique *handleSchemeNotFound(
89  uint16_t _schemeIndex, const Ogre::String &_schemeName,
90  Ogre::Material *_originalMaterial, uint16_t _lodIndex,
91  const Ogre::Renderable *_rend) override;
92 
94  private: OgreScenePtr scene;
95 
97  private: Ogre::RenderTarget *renderTarget;
98 
100  private: Ogre::Material *material;
101 
103  private: Ogre::String schemeName;
104  };
105  }
106  }
107 }
108 
109 #ifdef _MSC_VER
110  #pragma warning(pop)
111 #endif
112 
113 #endif
STL class.
Causes all objects in a scene to be rendered with the same material when rendered by a given RenderTa...
Definition: gz/rendering/ogre/OgreRenderTargetMaterial.hh:52