Not getting render systems to select in showConfigDialog

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


dsobiera
Gnoblar
Posts: 9
Joined: Sat Apr 12, 2008 12:35 am

Not getting render systems to select in showConfigDialog

Post by dsobiera »

I'm using static libraries for Ogre Next 3.0.0. When the showConfigDialog() comes up there isn't a list of render systems to select from.

I did link w/ the opengl render system...

Code: Select all

target_link_libraries(hello_ogre_next
        OgreHlmsPbsStatic_d OgreHlmsUnlitStatic_d RenderSystem_GL3PlusStatic_d
        OgreSamplesCommon_d
        OgreMainStatic_d

    X11 xcb freeimage zzip Xt Xrandr Xaw)

At first I thought plugins_d.cfg needed something but that seems to only deal with shared libraries as whatever I name in there it put a ".so" extension on the end in the error that follows.

Code: Select all

# Defines plugins to load

# Define plugin folder
PluginFolder=Dependencies/ogre-next/build/Debug/lib

# Define plugins
Plugin=RenderSystem_GL3PlusStatic_d

Gives me:

Code: Select all

terminate called after throwing an instance of 'Ogre::InternalErrorException'
  what():  OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library Dependencies/ogre-next/build/Debug/lib/RenderSystem_GL3PlusStatic_d.  System Error: Dependencies/ogre-next/build/Debug/lib/RenderSystem_GL3PlusStatic_d.so.3.0: cannot open shared object file: No such file or directory in DynLib::load at /home/dsobiera/src/vendor/ogre-next/OgreMain/src/OgreDynLib.cpp (line 107)

Dependencies/ogre-next/build/Debug/lib/ contains:

Code: Select all

libOgreAtmosphereStatic_d.a
libOgreHlmsPbsStatic_d.a
libOgreHlmsUnlitStatic_d.a
libOgreMainStatic_d.a
libOgreMeshLodGeneratorStatic_d.a
libOgreOverlayStatic_d.a
libOgreSamplesCommon_d.a
libOgreSceneFormatStatic_d.a
libPlugin_ParticleFXStatic_d.a
libRenderSystem_GL3PlusStatic_d.a
libRenderSystem_NULLStatic_d.a
libRenderSystem_VulkanStatic_d.a

Any idea what I am doing wrong?

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5454
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1352

Re: Not getting render systems to select in showConfigDialog

Post by dark_sylinc »

Hi!

When using static libs you must manually register the plugins yourself, instead of using the plugins.cfg file (which is used for loading plugins compiled as shared objects, i.e. DLLs in Windows lingo).

See StaticPluginLoader::install in Samples/2.0/Common/src/System/StaticPluginLoader.cpp

This must be done quite early, but after initializing Root. See GraphicsSystem.cpp when it calls mStaticPluginLoader.install( mRoot );

Cheers.

dsobiera
Gnoblar
Posts: 9
Joined: Sat Apr 12, 2008 12:35 am

Re: Not getting render systems to select in showConfigDialog

Post by dsobiera »

After I did what you suggested and linked against GLX and GL, things worked quite nicely. Thank you!

Lax
Gnoll
Posts: 665
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 64

Re: Not getting render systems to select in showConfigDialog

Post by Lax »

Just out for curiosity, why are you using static linking of Ogre?
The common case is using Ogre as shared libs due to license agreements.

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

dsobiera
Gnoblar
Posts: 9
Joined: Sat Apr 12, 2008 12:35 am

Re: Not getting render systems to select in showConfigDialog

Post by dsobiera »

I didn't give it much thought. I'm just learning right now and not distributing anything. Good to know that shared library seems to be the "norm" as it protects from license breach of some of the helper libraries