Skip to content

Commit

Permalink
Mantain ABI compatibility #Ogre2IsRenderWindowABI
Browse files Browse the repository at this point in the history
When merging to newer branches that can break the ABI,
revert this commit

Signed-off-by: Matias N. Goldberg <[email protected]>
  • Loading branch information
darksylinc committed May 15, 2021
1 parent a1c1968 commit b52af92
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ogre2/include/ignition/rendering/ogre2/Ogre2RenderTarget.hh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ namespace ignition
public: void SetShadowsNodeDefDirty();

/// \brief Returns true if this is a render window
public: virtual bool isRenderWindow() const;
/// TODO(anyone): this function should be virtual.
/// We didn't do it to preserve ABI.
/// Look in commit history for '#Ogre2IsRenderWindowABI' to
/// see changes made and revert
public: bool isRenderWindow() const;

/// \brief Get a pointer to the ogre render target containing
/// the results of the render
Expand Down Expand Up @@ -269,8 +273,11 @@ namespace ignition
// Documentation inherited.
public: virtual void Destroy() override;

// Documentation inherited.
public: virtual bool isRenderWindow() const override;
// TODO(anyone): this function should be virtual.
// We didn't do it to preserve ABI.
// Looks in commit history for '#Ogre2IsRenderWindowABI' to
// see changes made and revert
public: bool isRenderWindow() const;

// Documentation inherited.
public: virtual Ogre::RenderTarget *RenderTarget() const override;
Expand Down
5 changes: 5 additions & 0 deletions ogre2/src/Ogre2RenderTarget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,11 @@ void Ogre2RenderTarget::Render()
//////////////////////////////////////////////////
bool Ogre2RenderTarget::isRenderWindow() const
{
const Ogre2RenderWindow *asWindow =
dynamic_cast<const Ogre2RenderWindow*>(this);
if (asWindow)
return true;

return false;
}

Expand Down

0 comments on commit b52af92

Please sign in to comment.