Page 1 of 1

Porting from 1.12 to 2.1/2.2

Posted: Wed Sep 04, 2019 6:46 am
by libolt
Currently my project uses 1.12. I've been using Ogre since the early 1.x days. However, the graphics portion of my game is fairly primitive. I'm using the fixed function pipeline with the OpenGL 2.x render system and not using any shaders outside of RTSS for android support.

Is it best to port to 2.1 or 2.2 since I'm just starting the process?

I will be using the GL3Plus render system. I'm a novice when it comes to shaders so I will be learning from the ground up.

Is there a good guide/example for porting from 1.x to 2.1/2.2?

Thank you

Re: Porting from 1.12 to 2.1/2.2

Posted: Wed Sep 04, 2019 8:19 pm
by dark_sylinc
Hi!

The manual has a section on what has changed and how to port the code.

Ogre 1.12 has diverged a bit from what 1.9 was (back when it branched into 2.x) but the general recommendation probably still applies:

Our recommendation is to port 1.x first to Ogre 2.0; which is very similar to 1.9 except it has the new compositor (which is now a core required system that tells Ogre how you want to render and not an optional component) and the SceneNode changes as documented in the manual.

But it still works with regular materials, fixed function (D3D9 / GL2 is best for testing), and custom-written shaders.

Once you get your code to display in Ogre 2.0; port 2.0 -> 2.1 which implements Item; puts a lot of the older code under the v1 namespace; and uses Hlms materials.

The FAQ has a summary of differences between 1.x and 2.1

Once you're done with 2.1, an incremental update to 2.2 should be straightforward, since it mostly makes changes to textures.

You could port from 1.12 straight to 2.2; but there are too many changes which makes it harder to pinpoint what went wrong. Doing it in incremental steps 1.x -> 2.0 -> 2.1 -> 2.2 lets you port your codebase in chunks and verifying that works before moving on to the next changes.

Also searching in the forum with the right keywords gives a few good hits.

Cheers

Re: Porting from 1.12 to 2.1/2.2

Posted: Wed Sep 04, 2019 9:19 pm
by libolt
dark_sylinc,

Thanks for the detailed response.

I will port my code to 2.0 first then 2.1. My OGRE code hasn't changed much in several years other than some refactoring and fixes for newer 1.x releases.

It sounds like I have a lot of reading to do especially on the compositor. I will do my best to search out any problems I have on the forums but will post here if I get stumped.

I'm building 2.0 now and will create a new branch of my code to port to it.

Thanks again for all the information and tips.

Re: Porting from 1.12 to 2.1/2.2

Posted: Mon Sep 09, 2019 5:30 am
by rujialiu
libolt wrote: Wed Sep 04, 2019 9:19 pm I'm building 2.0 now and will create a new branch of my code to port to it.

Thanks again for all the information and tips.
Back to the time we were going from 1.9 to 2.0 (at that time the latest 1.x branch was 1.10 but we never tried it), it's almost painless. I created a middle layer that handles both 1.9 and 2.0 so our user code doesn't need to be aware of 2.0 (but they need to call the middle layer functions instead of Ogre functions directly). Compositor related stuffs are completely handles within our middle layer so most other devs in my teams don't even need to learn compositors :)

However, we spent a considerable amount of time from 2.0 to 2.1 because we need to adapt our custom shaders for HLMS and we need to learn PBR to make best use of it (in early 2016, PBR is less popular in realtime rendering than it is now). But once it's done, the visual improvement is huge. Good luck!

Re: Porting from 1.12 to 2.1/2.2

Posted: Mon Sep 09, 2019 10:37 pm
by libolt
rujialiu wrote: Mon Sep 09, 2019 5:30 am
libolt wrote: Wed Sep 04, 2019 9:19 pm I'm building 2.0 now and will create a new branch of my code to port to it.

Thanks again for all the information and tips.
Back to the time we were going from 1.9 to 2.0 (at that time the latest 1.x branch was 1.10 but we never tried it), it's almost painless. I created a middle layer that handles both 1.9 and 2.0 so our user code doesn't need to be aware of 2.0 (but they need to call the middle layer functions instead of Ogre functions directly). Compositor related stuffs are completely handles within our middle layer so most other devs in my teams don't even need to learn compositors :)

However, we spent a considerable amount of time from 2.0 to 2.1 because we need to adapt our custom shaders for HLMS and we need to learn PBR to make best use of it (in early 2016, PBR is less popular in realtime rendering than it is now). But once it's done, the visual improvement is huge. Good luck!
Thanks for the information and advice. I currently have no shaders in my project outside of what is used by RTSS on android to fake the fixed function pipeline. So I'm going to be learning everything from scratch.