RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.03k stars 178 forks source link

Upgrade to Ogre 13 #2858

Closed ohlidalp closed 2 years ago

ohlidalp commented 2 years ago

Closes https://github.com/RigsOfRods/rigs-of-rods/issues/2599 Closes https://github.com/RigsOfRods/rigs-of-rods/issues/2351 Fixes https://github.com/RigsOfRods/rigs-of-rods/issues/2823 Fixes https://github.com/RigsOfRods/rigs-of-rods/issues/2353

tritonas00 commented 2 years ago

Known issues:

paroj commented 2 years ago

CaelumPlugin API dropped ...

this only affects initialization: https://github.com/OGRECave/ogre-caelum/commit/70bebc7e28bdb92d58664378056fc9705bdbbf1c#diff-8904f998aade7df6ea9a53f3dcbd5edf259fe6b8aaa7fb5179b8708fefde9773R101-R104

so that call should still work.

tritonas00 commented 2 years ago

CaelumPlugin API dropped ...

this only affects initialization: OGRECave/ogre-caelum@70bebc7#diff-8904f998aade7df6ea9a53f3dcbd5edf259fe6b8aaa7fb5179b8708fefde9773R101-R104

so that call should still work.

I'm getting

19:50:33: Parsing script RoRSkies.os
19:50:33: Error: ScriptCompiler - unexpected token in (1): 'caelum_sky_system'. If this is a legacy script you must prepend the type (e.g. font, overlay).
19:50:33: Error: ScriptCompiler - unexpected token in (7): 'point_starfield'. If this is a legacy script you must prepend the type (e.g. font, overlay).
19:50:33: Error: ScriptCompiler - unexpected token in (21): 'sun'. If this is a legacy script you must prepend the type (e.g. font, overlay).
19:50:33: Error: ScriptCompiler - unexpected token in (30): 'moon'. If this is a legacy script you must prepend the type (e.g. font, overlay).
19:50:33: Error: ScriptCompiler - unexpected token in (51): 'sky_dome'. If this is a legacy script you must prepend the type (e.g. font, overlay).
19:50:33: Error: ScriptCompiler - unexpected token in (57): 'cloud_system'. If this is a legacy script you must prepend the type (e.g. font, overlay).
19:50:33: Error: ScriptCompiler - unexpected token in (59): 'cloud_layer'. If this is a legacy script you must prepend the type (e.g. font, overlay).

same with CaelumSkies.os

https://github.com/RigsOfRods/rigs-of-rods/blob/master/resources/caelum/RoRSkies.os https://github.com/RigsOfRods/rigs-of-rods/blob/master/resources/caelum/CaelumSkies.os

current ror master parses them cleanly

compiled our caelum (https://github.com/RigsOfRods/ogre-caelum/commits/master) with ogre 13, still the same, so something must be changed on ogre's side since 1.11.6 works fine

paroj commented 2 years ago

where is your CaelumPlugin::getSingleton().initialise();? That must happen before you initialise the resource group containing the caelum script. The caelum demo successfully parses TestSkyScript.os

tritonas00 commented 2 years ago

where is your CaelumPlugin::getSingleton().initialise();? That must happen before you initialise the resource group containing the caelum script. The caelum demo successfully parses TestSkyScript.os

OK i should have done that, now it parses them correctly, still this https://github.com/RigsOfRods/rigs-of-rods/blob/49dc172b2a2ef58f519fdf2a5469af9530f22d41/source/main/gfx/SkyManager.cpp#L89 complains

05:34:37: [RoR] Exception while loading sky script: RuntimeAssertionException: !resourceName.empty() failed. resourceName is empty string in openResourceImpl at /home/babis/Downloads/ogre13/ror-dependencies/Source/ogre/OgreMain/src/OgreResourceGroupManager.cpp (line 528)
paroj commented 2 years ago

this means some resource got an empty name. Need a callstack to figure out which one.

tritonas00 commented 2 years ago

@paroj any idea why texture doesn't work here? https://github.com/RigsOfRods/rigs-of-rods/blob/master/resources/managed_materials/managed_mats.material#L13 with texture_alias roads are normal, with texture they are black

Not an issue, just out of curiosity

paroj commented 2 years ago

any idea why texture doesn't work here?

see my previous comment https://github.com/RigsOfRods/rigs-of-rods/pull/2858#pullrequestreview-899223118

the texture line will attempt to load a file named "diffuse_tex" and fail.

tritonas00 commented 2 years ago

https://github.com/RigsOfRods/rigs-of-rods/pull/2943