Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading for OGRE 2.2 #223

Closed
6 tasks done
mjcarroll opened this issue Feb 2, 2021 · 10 comments · Fixed by #272
Closed
6 tasks done

Upgrading for OGRE 2.2 #223

mjcarroll opened this issue Feb 2, 2021 · 10 comments · Fixed by #272
Assignees
Labels
enhancement New feature or request 🏯 fortress Ignition Fortress

Comments

@mjcarroll
Copy link
Contributor

mjcarroll commented Feb 2, 2021

In order to take advantage of EGL Support in OGRE2, we will need to update ignition-rendering to use the OGRE 2.2 API.

Ogre 2.2 API Migration reference: https://ogrecave.github.io/ogre-next/api/2.2/_ogre22_changes.html

TODO List:

  • Update OGRE2 packaging for OGRE 2.2:
  • Update APIS for OGRE 2.2
    • Texture -> TextureGpu
    • RenderTarget -> TextureGpu
    • HardwarePixelBuffer -> StagingTextures
    • PixelFormat -> PixelFormatGpu
@chapulina chapulina added 🏢 edifice Ignition Edifice enhancement New feature or request labels Feb 2, 2021
@chapulina
Copy link
Contributor

It would be nice to enable the terrain component when packaging 2.2 so we can address #187.

@ahcorde ahcorde self-assigned this Feb 22, 2021
@ahcorde
Copy link
Contributor

ahcorde commented Feb 24, 2021

@chapulina
Copy link
Contributor

Here's Ogre;s 2.2.5 release announcement introducing EGL support:

https://www.ogre3d.org/2021/02/06/ogre-2-2-5-cerberus-released-and-egl-headless-support

@chapulina chapulina added 🏯 fortress Ignition Fortress and removed 🏢 edifice Ignition Edifice labels Apr 1, 2021
@ahcorde
Copy link
Contributor

ahcorde commented Jun 10, 2021

Related with this PR #272

@darksylinc
Copy link
Contributor

I started merging changes from the main branch into 2.2 while I still have these changes fresh on my mind. It was almost over but it needed more testing before I uploaded them.

I've got two questions (for now):

  1. Do you have anything specific I can look at for Ogre 2.2 branch that doesn't work correctly? I was expecting a mess and it was surprisingly working quite well 👍 .
  2. I noticed ign-rendering creates its RenderTargets as SaveToSystemRam e.g.
  this->ogreTexture = textureMgr->createOrRetrieveTexture(
    this->name,
    Ogre::GpuPageOutStrategy::SaveToSystemRam,
    Ogre::TextureFlags::RenderToTexture,
    Ogre::TextureTypes::Type2D);

is there any rationale behind this? SaveToSystemRam was conceived mostly for:

  1. In the future Ogre will automatically unload regular textures that are not in use (i.e. when memory limits are hit). Not yet implemented. This flag basically tells how fast textures are unloaded and loaded again. This is specially important if the texture was loaded from memory instead of disk
  2. I can't remember if the feature was tested against RenderTargets. RenderTargets have a similar issue as loading from memory instead of disk: when made Resident again, there is no disk. So either the initial contents are restored from previously-saved RAM or by rendering everything again. Most RenderTargets would commonly use GpuPageOutStrategy::Discard while only a few would use SaveToSystemRam assuming you want to unload them at some point and don't want to or can't re-render its contents. For RenderTargets you never plan to unload you should prefer Discard.

@mjcarroll
Copy link
Contributor Author

Do you have anything specific I can look at for Ogre 2.2 branch that doesn't work correctly? I was expecting a mess and it was surprisingly working quite well +1 .

I don't believe so. @ahcorde and @iche033 got everything working great. The only thing that remains is a Windows packaging detail so that CI will pass there.

is there any rationale behind this?

Not that I'm aware of.

@iche033
Copy link
Contributor

iche033 commented Jun 28, 2021

The last thing I was not sure of are the spam of console msgs, which were just fixed :)

I also don't think there is a specific reason to use SaveToSystemRam. We can change to Discard

@srmainwaring
Copy link
Contributor

I saw the note from @chapulina that you may have to drop macOS support in ignition-fortress
(Ogre 2 support on macOS in Ignition Fortress)

I'd like to see continued support for macOS and would like to get involved in helping that happen.

Thanks to help from @darksylinc I'm pretty close to completing a patch to the ogre-next/v2-2-egl branch that has fallback support for OpenGL on macOS: WIP: add GL3Plus support for macOS . It might be slow to load because of the shader compiling but then should run fine for PBS materials.

The next step would be to get the ignition rendering and gui components working for macOS - and I'd be happy to look further into that if the team can provide guidance.

@chapulina
Copy link
Contributor

Hi @srmainwaring , thanks for the help with macOS! We're happy to continue providing support if you and others manage to get the upfront work out of the way. We should be able to provide guidance between now and the Fortress release, but it will be best effort on our side. Hopefully it will be enough to get it working in time!

@chapulina chapulina linked a pull request Jul 6, 2021 that will close this issue
@ahcorde
Copy link
Contributor

ahcorde commented Oct 1, 2021

The Ogre 2.2 PR is merged, This feature is available in Fortress. I'm going to close this issue and consider this as done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants