[2.1] OgreMeshTool Cannot initialise - no render system has been selected

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


KammutierSpule
Gnoblar
Posts: 13
Joined: Tue Oct 10, 2017 12:22 pm
x 1

[2.1] OgreMeshTool Cannot initialise - no render system has been selected

Post by KammutierSpule »

I built the 2.1 version and I am trying to run OgreMeshTool.
If I call it it display the help but once I need to convert a mesh it outputs:

"Exception caught: Cannot initialise - no render system has been selected."

It looks to be related with ogre.cfg but why a command line tool will need graphic configurations?
Any help idea how can I make it work?
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 151

Re: [2.1] OgreMeshTool Cannot initialise - no render system has been selected

Post by spookyboo »

It needs plugins_tools.cfg with content:

Code: Select all

# Defines plugins to load

# Define plugin folder
PluginFolder=.

# Define plugins
Plugin=RenderSystem_NULL
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5436
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1343

Re: [2.1] OgreMeshTool Cannot initialise - no render system has been selected

Post by dark_sylinc »

spookyboo wrote:It needs plugins_tools.cfg with content:

Code: Select all

# Defines plugins to load

# Define plugin folder
PluginFolder=.

# Define plugins
Plugin=RenderSystem_NULL
And it needs the RenderSystem_NULL.dll as well! :D
KammutierSpule wrote:why a command line tool will need graphic configurations?
Just in case it isn't obvious after these answers, it's because it doesn't, but Ogre still needs the "NULL" RenderSystem to fool the rest of the code into not crashing and keeps all buffers CPU only. :)
KammutierSpule
Gnoblar
Posts: 13
Joined: Tue Oct 10, 2017 12:22 pm
x 1

Re: [2.1] OgreMeshTool Cannot initialise - no render system has been selected

Post by KammutierSpule »

Thanks I managed to get it work!
User avatar
areay
Bugbear
Posts: 819
Joined: Wed May 05, 2010 4:59 am
Location: Auckland, NZ
x 69

Re: [2.1] OgreMeshTool Cannot initialise - no render system has been selected

Post by areay »

FYI, for the other johnny-come-latelys out there, the 'fix' is to copy the plugins_tools.cfg file from your Ogre2.1 $BUILD_DIR/bin/ directory to the location that you wish to run the OgreMeshTool binary from. Which is a bit of pain as the 1.X OgreMeshUpgrader or OgreXMLConverter tools would run from any dir happily. The new one has to be able to fine this .cfg file in the current working dir

ie.

Code: Select all

cp /home/areay/build/ogre-2.1/bin/plugins_tools.cfg .
OgreMeshTool -e -t -ts 4 -O puqs -v2 ./Media/models/THE_MESH_I_WANT_TO_UPGRADE.mesh
Thankfully the tool will at least write to the same dir as the existing mesh so that saves some pain
jwwalker
Goblin
Posts: 248
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 18

Re: [2.1] OgreMeshTool Cannot initialise - no render system has been selected

Post by jwwalker »

For posterity, I'll note that if you make a debug build of OgreMeshTool, it will be looking for "plugins_tools_d.cfg", which in turn expects to find "RenderSystem_NULL_d", which I didn't have. The build process I used created RenderSystem_NULL.framework in a Debug folder. So I needed to put an edited version of "plugins_tools_d.cfg" into the folder with OgreMeshTool.