Ignition Rendering

API Reference

4.1.0
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 IGNITION_RENDERING_OGRE_OGRRENDERTARGETMATERIAL_HH_
18 #define IGNITION_RENDERING_OGRE_OGRRENDERTARGETMATERIAL_HH_
19 
20 #include <vector>
21 
22 #include "ignition/rendering/config.hh"
25 #include "ignition/rendering/ogre/Export.hh"
26 
27 namespace ignition
28 {
29  namespace rendering
30  {
31  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
32  //
45  class IGNITION_RENDERING_OGRE_VISIBLE OgreRenderTargetMaterial :
46  public Ogre::RenderTargetListener,
47  public Ogre::MaterialManager::Listener
48  {
54  Ogre::RenderTarget *_renderTarget, Ogre::Material *_material);
55 
57  public: ~OgreRenderTargetMaterial();
58 
62  private: virtual void preRenderTargetUpdate(
63  const Ogre::RenderTargetEvent &_evt) override;
64 
68  private: virtual void postRenderTargetUpdate(
69  const Ogre::RenderTargetEvent &_evt) override;
70 
81  public: virtual Ogre::Technique *handleSchemeNotFound(
82  uint16_t _schemeIndex, const Ogre::String &_schemeName,
83  Ogre::Material *_originalMaterial, uint16_t _lodIndex,
84  const Ogre::Renderable *_rend) override;
85 
87  private: OgreScenePtr scene;
88 
90  private: Ogre::RenderTarget *renderTarget;
91 
93  private: Ogre::Material *material;
94 
96  private: Ogre::String schemeName;
97  };
98  }
99  }
100 }
101 
102 #endif
Causes all objects in a scene to be rendered with the same material when rendered by a given RenderTa...
Definition: OgreRenderTargetMaterial.hh:45