Lucebac already made some excellent comments which fully covered anything I would have had to comment.
It might be best to make a separate Ogre2Renderer for 2.0 and 2.1 compatibility. You can go crazy there and remove everything thats not necessary for 2.0+. We can add it to v0-8 and package it with future 0.8.X Releases. You can use all code changes you did and just copy paste them to "RendererModules/Ogre2"
The main difficulty then would be to make CMake ready for that. I think this should not be difficult though, you can use some Grep tool to find all occurances of Ogre in CMAKE files and add a line for Ogre2Renderer where necessary. Also it would be great if you can simply re-use all classes that do not need any changes.
Martin Preisler said it is ok to break ABI as long as you use macros to only break it for Ogre 2.0 and 2.1. So forget about my last message and go with the Macro approach. This will definitely save us a lot of duplicate code so that's great. I wasn't aware of that this is a legitimate way to avoid ABI-breakage, so sorry for initially misadvising you, I hope you haven't wasted any time on my false suggestions.
OK, good news! :)
I had not started the Ogre2Renderer yet, so yes, this will save me a lot of time!
I will make a new commit to take the other comments into account as soon as I have some time.
Pull request updated!
Sorry for the multiple updates, I kept forgotting 1 or 2 lines to change in each commit / update... -_-'
I hope it will be okay now!
Overall looks pretty good.
Did you introduce "CEGUI_USE_OGRE_COMPOSITOR2" as new variable to this branch? If yes, where does the user define it? Same question for "CEGUI_USE_OGRE_HLMS"
The 2 variables are defined automatically depending on the version of Ogre at the beginning of Renderer.h (lines 67-79).
These 2 variables shall not be modified by the user.
They ensure that the code builds with any version of Ogre without changing any build option.
Ah, I had accidentally skipped over that part. Thats a pretty optimal solution then.
I have removed the duplicate new lines.
Please tell me if there is any other change I have to make :)
Looks good. As far as I see all the old code is preserved in the old versions of Ogre and the new code is only added inside the macros.
Did you test if 1.9 still works?
Unfortunately I do not have a project on Ogre 1.9, but I have just tested it on Ogre 1.8 and it builds and works perfectly :)
Sounds good. I will look over it again this weekend in case you are done by then with your cleanup. If i dont find any issues i will approve of the merge. Since the changes are quite big I will pass it on to some other dev team member to look at one final time before I merge it ;)
Seems like no on had time. I am merging it. Thanks a lot for your PR, it seems to me that this is a very useful contribution. if any further changes are needed please make a new PR.
I tried to merge the changes into default branch but it is not trivial enough to do it blindly. So in the end I didnt take any of your changes over to default branch. I currently dont have the capacities to apply your changes manually and test them, if you would like to do it then this would be great.
It seems that the Ogre renderer has been deeply refactored recently in the default branch. I will see if I manage to port my changes to this branch when I get some time.
But before, I still have to finish the porting to Ogre 2.1 by making the D3D11 renderer work as well.
Also, it seems that Ogre 2.1 works best with the gamma correction enabled, which is not supported by CEGUI yet. This is also on my todo list :)
I will keep you informed on my progress.
there is time update to PSO finall OGRE 2.1 and cegui have errors as unported unexsisting methods throught changing ORGE.
Have you checked the Ogre changes? They must have documented the changes and that should give an indication on what to do to fix it. I personally do not know because I have not looked into it and dont use Ogre 2.1.
Btw you are replying to a two year old pull request, maybe a conversation about your problem would be better done in a new bug ticket or on forum, what do you think?
i think for this place good is complete current thread by some strokes of OGRE 2.1 pso modification.
I try to port, if i find.
Is need connect GEGUI shader that loads throught unported methods.
On ogre forum i also i write appropriate replying.
Are you, by any chance, using a translator program for translating to English? :D
this is personal foreign language sentence constructions.
Okay, in any case I find it difficult to understand what you are saying.
If you find a solution for this please report it. At the moment I can't help with Ogre 2.1. Also feel free to make a bug report.
ok. i think only text how to port-quoting- is enaf.