diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index c8f136339..827855f61 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -119,7 +119,7 @@ void Ogre2RenderEngine::Destroy() this->ogreOverlaySystem = nullptr; // Clean up any textures that may still be in flight. - Ogre::TextureGpuManager *mgr = + Ogre::TextureGpuManager *mgr = this->ogreRoot->getRenderSystem()->getTextureGpuManager(); auto entries = mgr->getEntries(); diff --git a/ogre2/src/Ogre2ThermalCamera.cc b/ogre2/src/Ogre2ThermalCamera.cc index 92a4db06a..ef37f4ab1 100644 --- a/ogre2/src/Ogre2ThermalCamera.cc +++ b/ogre2/src/Ogre2ThermalCamera.cc @@ -893,7 +893,8 @@ void Ogre2ThermalCamera::PostRender() { unsigned int rawDataRowIdx = i * box.bytesPerRow / bytesPerChannel; unsigned int rowIdx = i * width * channelCount; - memcpy(&this->dataPtr->thermalImage[rowIdx], &thermalBuffer[rawDataRowIdx], + memcpy(&this->dataPtr->thermalImage[rowIdx], + &thermalBuffer[rawDataRowIdx], width * channelCount * bytesPerChannel); } }