Skip to content

Commit

Permalink
Relax assert to allow changing orientaionMode for resident square RTT…
Browse files Browse the repository at this point in the history
… - usefull for reflections rendering on rotated Android devices
  • Loading branch information
dyunchik authored and eugenegff committed Sep 14, 2023
1 parent e444329 commit 2eb8af6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion RenderSystems/GL3Plus/src/OgreGL3PlusTextureGpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,8 @@ namespace Ogre
//-----------------------------------------------------------------------------------
void GL3PlusTextureGpuRenderTarget::setOrientationMode( OrientationMode orientationMode )
{
OGRE_ASSERT_LOW( mResidencyStatus == GpuResidency::OnStorage || isRenderWindowSpecific() );
OGRE_ASSERT_LOW( mResidencyStatus == GpuResidency::OnStorage || isRenderWindowSpecific() ||
isRenderToTexture() && mWidth == mHeight );
#if OGRE_NO_VIEWPORT_ORIENTATIONMODE == 0
mOrientationMode = orientationMode;
#endif
Expand Down
3 changes: 2 additions & 1 deletion RenderSystems/Vulkan/src/OgreVulkanTextureGpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,8 @@ namespace Ogre
//-----------------------------------------------------------------------------------
void VulkanTextureGpuRenderTarget::setOrientationMode( OrientationMode orientationMode )
{
OGRE_ASSERT_LOW( mResidencyStatus == GpuResidency::OnStorage || isRenderWindowSpecific() );
OGRE_ASSERT_LOW( mResidencyStatus == GpuResidency::OnStorage || isRenderWindowSpecific() ||
isRenderToTexture() && mWidth == mHeight );
#if OGRE_NO_VIEWPORT_ORIENTATIONMODE == 0
mOrientationMode = orientationMode;
#endif
Expand Down

0 comments on commit 2eb8af6

Please sign in to comment.