$OGRE_HOME/include/OGRE/Hlms/Common
is not in my include paths, although I've added OGRE_INCLUDE_DIRS
, OGRE_HlmsPbs_INCLUDE_DIRS
and OGRE_HlmsUnlit_INCLUDE_DIRS
.
file
is a std::string
which contains full path (like /home/user/.rigsofrods/mods/mod.zip
)
Ogre::Archive* arc = nullptr;
try
{
arc = Ogre::ArchiveManager::getSingleton().load(file, "Zip", true);
}
catch (...) {}
if (arc != nullptr)
{
Ogre::ArchiveManager::getSingleton().unload(file);
}
Ogre::FileSystemLayer::removeFile(file);
I'm afraid I need advice how to deal with pre-existing material manipulation code.
In Rigs of Rods, we allow content creators to just specify texture files and we fill them in pre-made materials.
doc: https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/#managedmaterials
materials: https://github.com/RigsOfRods/rigs-of-rods/tree/master/resources/managed_materials
code (snippet to illustrate): https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/physics/ActorSpawner.cpp#L2238-L2241
It completely relied on texture_unit names which are gone in OGRE13 - the name is now set to texture_alias and even that is deprecated.
The logged warning suggests using variables, but I can't find any API to define them in code - is there such option?
I realize I have resarch of RTSS to do, but if I can get some beginner tips it would be great.
findResourceFileInfo()
https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/resources/CacheSystem.cpp#L992
zzip_dir_open_ext_io
vs zip_open_stream
another issue came around while loading a terrain
InvalidParametersException: Closer detail levels must be added before farther ones in _addDetailLevel at /home/babis/Downloads/ogre13/ror-dependencies/Source/paged-geometry/source/PagedGeometry.cpp (line 376)
but we do it that way no? https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/terrain/TerrainObjectManager.cpp#L306-L313
geom->addDetailLevel
(doesn't matter which) it works
#0 0x00007ffff409d894 in Ogre::GL3PlusSampler::bind (this=0x0, unit=0) at /home/tom/Downloads/ogre-13.3.1/RenderSystems/GL3Plus/src/OgreGL3PlusTextureManager.cpp:109
#1 0x00007ffff7388984 in Ogre::RenderSystem::_setTextureUnitSettings (this=0xcef650, texUnit=0, tl=...) at /usr/include/c++/11/bits/shared_ptr_base.h:1295
#2 0x00007ffff73cbb5b in Ogre::SceneManager::_setPass (this=0x4e9b4a0, pass=0x6063b80, evenIfSuppressed=<optimized out>, shadowDerivation=<optimized out>)
at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1065
#3 0x00007ffff73d6273 in Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::visit (rs=std::vector of length 1, capacity 1 = {...}, p=0x6063b80, this=0x4e9bc00)
at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1562
#4 Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::visit (this=0x4e9bc00, p=0x6063b80, rs=std::vector of length 1, capacity 1 = {...})
at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1554
#5 0x00007ffff7383593 in Ogre::QueuedRenderableCollection::acceptVisitorGrouped (this=0x4f5f0a0, visitor=0x4e9bc00)
at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:474
#6 0x00007ffff7383642 in Ogre::QueuedRenderableCollection::acceptVisitor (this=this@entry=0x4f5f0a0, visitor=visitor@entry=0x4e9bc00, om=<optimized out>,
om@entry=Ogre::QueuedRenderableCollection::OM_PASS_GROUP) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:452
#7 0x00007ffff73c88c1 in Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::renderObjects (this=this@entry=0x4e9bc00, objs=...,
om=om@entry=Ogre::QueuedRenderableCollection::OM_PASS_GROUP, lightScissoringClipping=lightScissoringClipping@entry=true, doLightIteration=doLightIteration@entry=true,
_manualLightList=_manualLightList@entry=0x0, _transparentShadowCastersMode=false) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1607
#8 0x00007ffff73c8a56 in Ogre::SceneManager::renderBasicQueueGroupObjects (this=0x4e9b4a0, pGroup=0x5dad480, om=Ogre::QueuedRenderableCollection::OM_PASS_GROUP)
at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1707
#9 0x00007ffff73c90a0 in Ogre::SceneManager::renderVisibleObjectsDefaultSequence (this=this@entry=0x4e9b4a0) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1533
#10 0x00007ffff73cd0a6 in Ogre::SceneManager::_renderVisibleObjects (this=0x4e9b4a0) at /home/tom/Downloads/ogre-13.3.1/OgreMain/include/OgreSceneManager.h:1852
#11 Ogre::SceneManager::_renderScene (this=0x4e9b4a0, camera=0x4f7f490, vp=<optimized out>, includeOverlays=<optimized out>)
at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1305
#12 0x00007ffff7278a98 in Ogre::Camera::_renderScene (this=0x4f7f490, vp=0x4eb91c0) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreCamera.cpp:496
#13 0x00007ffff74726a1 in Ogre::Viewport::update (this=<optimized out>) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreViewport.cpp:217
#14 0x00007ffff73a1de8 in Ogre::RenderTarget::_updateViewport (this=0xd1e4e0, viewport=0x4eb91c0, updateStatistics=<optimized out>)
at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderTarget.cpp:198
#15 0x00007ffff73a13fa in Ogre::RenderTarget::_updateAutoUpdatedViewports (this=0xd1e4e0, updateStatistics=true) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderTarget.cpp:176
#16 0x00007ffff73a1f78 in Ogre::RenderTarget::updateImpl (this=0xd1e4e0) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderTarget.cpp:153
#17 0x00007ffff73a19e4 in Ogre::RenderTarget::update (this=0xd1e4e0, swap=<optimized out>) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderTarget.cpp:555
#18 0x00007ffff7385d5f in Ogre::RenderSystem::_updateAllRenderTargets (this=0xcef650, swapBuffers=false) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderSystem.cpp:264
#19 0x00007ffff73c2f26 in Ogre::Root::_updateAllRenderTargets (this=this@entry=0x7fffffffcca0) at /home/tom/Downloads/ogre-13.3.1/