diff --git a/examples/projector/Main.cc b/examples/projector/Main.cc index 5dc678db8..a991c98dd 100644 --- a/examples/projector/Main.cc +++ b/examples/projector/Main.cc @@ -27,7 +27,6 @@ #include #include - #include #include @@ -210,7 +209,6 @@ int main(int _argc, char** _argv) } catch (...) { - // std::cout << ex.what() << std::endl; std::cerr << "Error starting up: " << engineName << std::endl; } } diff --git a/include/gz/rendering/Projector.hh b/include/gz/rendering/Projector.hh index ddfd4053e..b041d966a 100644 --- a/include/gz/rendering/Projector.hh +++ b/include/gz/rendering/Projector.hh @@ -42,15 +42,15 @@ namespace gz /// \brief Destructor public: virtual ~Projector(); - /// \brief Get the camera's far clipping plane distance + /// \brief Get the projector's far clipping plane distance /// \return Far clipping plane distance public: virtual double FarClipPlane() const = 0; - /// \brief Set the camera's far clipping plane distance + /// \brief Set the projector's far clipping plane distance /// \param[in] _far Far clipping plane distance public: virtual void SetFarClipPlane(double _far) = 0; - /// \brief Get the camera's near clipping plane distance + /// \brief Get the projector's near clipping plane distance /// \return Near clipping plane distance public: virtual double NearClipPlane() const = 0; @@ -58,11 +58,11 @@ namespace gz /// \param[in] _near Near clipping plane distance public: virtual void SetNearClipPlane(double _near) = 0; - /// \brief Get the camera's horizontal field-of-view - /// \return Angle containing the camera's horizontal field-of-view + /// \brief Get the projector's horizontal field-of-view + /// \return Angle containing the projector's horizontal field-of-view public: virtual math::Angle HFOV() const = 0; - /// \brief Set the camera's horizontal field-of-view + /// \brief Set the projector's horizontal field-of-view /// \param[in] _hfov Desired horizontal field-of-view public: virtual void SetHFOV(const math::Angle &_hfov) = 0; diff --git a/include/gz/rendering/Scene.hh b/include/gz/rendering/Scene.hh index 8235ab852..de516bcff 100644 --- a/include/gz/rendering/Scene.hh +++ b/include/gz/rendering/Scene.hh @@ -43,7 +43,6 @@ namespace gz // class RenderEngine; class SceneExt; -// static std::unordered_map g_sceneExtMap; /// \class Scene Scene.hh gz/rendering/Scene.hh /// \brief Manages a single scene-graph. This class updates scene-wide diff --git a/ogre2/src/Ogre2Material.cc b/ogre2/src/Ogre2Material.cc index 240e9164a..464158028 100644 --- a/ogre2/src/Ogre2Material.cc +++ b/ogre2/src/Ogre2Material.cc @@ -1535,6 +1535,9 @@ void Ogre2Material::SetFragmentShader(const std::string &_path) auto mat = this->Material(); auto pass = mat->getTechnique(0u)->getPass(0); + Ogre::HlmsBlendblock block; + block.setBlendType(Ogre::SBT_TRANSPARENT_ALPHA); + pass->setBlendblock(block); pass->setFragmentProgram(fragmentShader->getName()); mat->compile(); mat->load(); diff --git a/ogre2/src/Ogre2Projector.cc b/ogre2/src/Ogre2Projector.cc index ad9683f58..1e25281e8 100644 --- a/ogre2/src/Ogre2Projector.cc +++ b/ogre2/src/Ogre2Projector.cc @@ -115,7 +115,7 @@ Ogre2Projector::~Ogre2Projector() if (!this->scene->IsInitialized()) return; - for (auto &ogreCamIt : this->dataPtr->camerasWithListener) + for (const auto &ogreCamIt : this->dataPtr->camerasWithListener) { Ogre::IdString camName = ogreCamIt.second; auto ogreCam = this->scene->OgreSceneManager()->findCameraNoThrow(camName); diff --git a/src/base/BaseScene.cc b/src/base/BaseScene.cc index 975d7441f..3803d127f 100644 --- a/src/base/BaseScene.cc +++ b/src/base/BaseScene.cc @@ -1613,21 +1613,3 @@ void BaseScene::CreateMaterials() material->SetReceiveShadows(true); material->SetLightingEnabled(true); } - -/* -////////////////////////////////////////////////// -BaseSceneExt::BaseSceneExt(Scene *_scene) -{ - this->scene = _scene; -} - -////////////////////////////////////////////////// -ObjectPtr BaseScene::CreateExt(const std::string &_type) -{ - BaseScene *baseScene = dynamic_cast(this->scene); - if (_type == "projector") - { - return std::dynamic_pointer_cast(baseScene->CreateProjector()); - } -} -*/