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
Port to Ogre 1.11+ while keeping 1.9 compatibility #23
Conversation
Fixes the following GCC 8 error: error: invalid conversion from 'int' to 'Ogre::Exception::ExceptionCodes' [-fpermissive] Used ERR_INVALIDPARAMS in some places where ERR_INVALID_CALL would be more appropriate, because ERR_INVALID_CALL is new in Ogre 1.10+ and using it would break Ogre 1.9 support.
Fixes the following issue on aarch64 with GCC 8.1: source/editor/TerrainBrushes.cpp:138:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] The signedness of 'char' is implementation defined, so we need to be explicit.
…dropped in 1.11 In Ogre 1.9 and earlier, the material APIs were inconsistent with some methods expecting a MaterialPtr& and others a String&. Ogre 1.10+ harmonized this, but that means that we need some version checks in a few places to keep using the old String& setters on Ogre < 1.10.
for whatever reason travis build is not linked here, but it passes: |
Wow, cool. Thanks. |
@paroj Any idea why then sample browser is not starting?
|
can you verify the following:
this is for me on Ubuntu 18.04 |
I could meanwhile track down the ogre release, that introduced the breaking change. It must be one of those: I suspect its one of the pixel format related commits |
Okay I got scanelf with pax-utils from Apper,
Wow, libGLX.so is not in my RenderSystem_GL.so 😨 |
and neither is libGL.so.
in cmake |
I have:
The final files are there. So, what should I do? |
I could reproduce your issue by setting OPENGL_gl_LIBRARY="", so it is definitely the cause. Unfortunately I can only guess how to solve this - the solution should involve finding the right libGL I guess. Candidates are: This might be also related to the newer glvnd you got in Debian 10 which might be incompatible with the ancient glew we have in Ogre. Do you get the same error with GL3+? It does a proper GL symbol resolution. |
I get the same error with GL3 only (I added # for GL in plugins.cfg):
But, I got my old SR working with Ogre 1.9 and looks like it is using:
Should I like, put those paths into cmake (OPENGL_gl_LIBRARY and OPENGL_glx_LIBRARY) and rebuild Ogre 1.12? |
its worth giving a try |
found the bug BTW: the blendmap was incorrectly requested as RGBA but accessed as BGRA. Ogre 1.9 used to always give you BGRA. |
Ugh. This didn't change, same error. And I did put paths for gl, glx, glu (there is also EGL and opengl?) and rebuilt. Still no libGL in RenderSystem_GL.so nor in GL3. |
we only do pretty standard stuff there. I guess the breakage is due to the newer GLVND on Debian 10: You could try adding |
Okay I got Ogre built. |
resurrected the relevant parts from Ogre 1.10.12
png will already be loaded by load(fpng) - no further handling needed.
can you point me to how/ where you set-up that square-view clipping? |
I thought that too but old SR build with Ogre 1.9 does not have this Vsync issue, I can turn it off and Fps goes to max.
So a few fragments in code:
So I hide all on current mViewport and show ndMini with Rectangle2D
And lastly VisibilityFlags (and Render Queue Groups) are set for terrain in:
and defined in: /source/ogre/common/RenderConst.h
|
it might be SDL2 then. Try reverting this: you will lose FSAA, but maybe VSync will be gone as well. found the Terrain issues. The visibility flags were not properly propagated. OGRECave/ogre@d453756 do you know that you can directly push to my fork instead of posting patches here? |
I reverted 3fb3a29 but it didn't help, still 60 Fps like Vsync was on and it introduced a crash on Alt-Tab:
Good, terrain visibility got fixed with latest Ogre commits. I changed plugin to: Okay I didn't know I can push to your fork, cool. But I get: ERROR: Permission to paroj/stuntrally.git denied to cryham.
One other thing: there are lots of deprecated warnings, I changed #include "OgreVector3.h" (also for 2 and 4) to "OgreVector.h" to get rid of some of them can this go in here, or is it something that would break Ogre 1.9 compatibility? |
you have to use the https://.. when adding the remote. More details:
"OgreVector.h" does not exist in 1.9. While you could #ifdef that, you should rather do as the warning says and use "Ogre.h" instead (which is backward compatible to 1.9). |
Sorry for making yet another noise in this PR, but I wonder what is the current state of Stunt Rally running on Ogre 1.11+. Is the game playable? If so, are there any major issues? Thanks! |
you can try yourself using the edge channel of: The stable channel is built against Ogre 1.9. You can install both in parallel for comparison: |
Thanks, but I don't have Snap on any of my systems. However, I am thinking about making a beta branch of the Stunt Rally Flatpak with changes from this PR. |
From my side, the only major issue left is (as in 1st post):
which means I can't compare or tell how much better it is. |
@cryham If vsync is the only remaining (major) issue and there are no ideas how to fix it, would it be possible to merge the current code as it is into master? :-) |
It is possible. |
just did another test-build against libogre-1.9-dev and libmygui-dev and everything works fine. |
Okay great. |
you pulled #21 which contained conflicting changes with me upgrading the buld from trusty to xenial here. As travis seems to be dead anyway, I will just drop mine |
recent ogre does not like this
Will building with ogre 13.x going to work? |
Well, in my case (Flatpak package), even 12.x does not work properly. |
for 13.x, the bundled paged-geometry needs to pull some changes from upstream - but the remaining code should work as is. If you want to test stuntrally with latest 1.12, you can use the "edge" snap here: |
most maps load with Ogre 1.12, but assert at 25115e6 after some time. Notably "Asphalt" does not load, but asserts immediately.Requires Ogre in full legacy mode as:
for 1.12 additionally this content has to be placed at some known resource location:https://github.com/OGRECave/ogre/tree/master/Media/ShadowVolume
based on #17
Performance
high peaks went up from 75 to 94 fps, which is quite nice I guess. Flooded stayed about the same.
(higher, 3 shadows, 6 reflections at once)
Remaining Tasks
Remaining editor issue is RTT binding. See:https://github.com/OGRECave/ogre/blob/master/Docs/1.11-Notes.md#breaking-non-api-changes nr. 2
Can't save jpg screenshots, also from RTT causing editor to crash on save F4https://github.com/OGRECave/ogre/blob/45f2531138902414072cbba551b77b11aebb692d/PlugIns/STBICodec/src/OgreSTBICodec.cpp#L112