NxOgre 1.5 and Linux : Bloody port

xabila

11-12-2008 14:44:39

Ok i have spent one day to port NxOgre, rendersystem and BloodyCake on linux.
Everything is compiling now.


Is there any particular things to add for linux or Cake will work on OpenGL as soos as i test it ?

I juste need to find the right name of the RenderSystems for openGL
on cake.cfg.

<edit>
Well it seems that i have much work to do :
Loading Library RenderSystem_OpenGL.dll

</edit>

betajaen

11-12-2008 14:55:13

If you've ported NxOgre to Linux, then you're 90% done. If you want to fill in the Linux bits for Ogrelicious, I'd be happy to accept them.

xabila

11-12-2008 15:02:23

Of course, and Ogrelicious make me ...suffer ;)

xabila

12-12-2008 11:02:25

Ok, it works


the config :

# Configuration file for Bloody Cake
[Plugins]
Plugins=/home/gvtadm/GVT/archiveOgre/ogreBin/lib/OGRE/Plugin_ParticleFX.so
RenderSystems=/home/gvtadm/GVT/archiveOgre/ogreBin/lib/OGRE/RenderSystem_GL.so
[RenderSystem]
Nomination=OpenGL Rendering Subsystem
[Window]
Depth=32
FSAA=0
Frequency=60
Fullscreen=false
Height=768
Left=0
Title=Ogrelicious, yummy!
Top=0
VSync=false
Width=1024


And actually it should be better ton add the ressources on the cfg also.

The SmartPlugin must be improve, i add the path but it's not perfect and i don't know why i still get "RenderSystems: " before my fileName, so i add on the code :

SmartPlugin& SmartPlugin::load()
{
if (mPlugin->mIsLibrary && !mPlugin->mIsLoaded)
{
size_t nbPlugins = Ogre::Root::getSingletonPtr()->getInstalledPlugins().size();
//NEED BETAJAEN ;)
Ogre::String file = mPlugin->mFilename;
if (Ogre::StringUtil::startsWith(file, "rendersystem: "))
file = file.substr(14, file.length());
else std::cout << " no subtring render" << std::endl;
if (Ogre::StringUtil::startsWith(file, "plugin: "))
file = file.substr(8, file.length());
else std::cout << " no subtring plug" << std::endl;

Ogre::Root::getSingletonPtr()->loadPlugin(file);
mPlugin->mIsLoaded = (nbPlugins < Ogre::Root::getSingletonPtr()->getInstalledPlugins().size());
}

_scout();

return *this;
}

betajaen

12-12-2008 11:11:19

Brilliant!

If you want to post your changes to NxOgre here, I'll try and whip a release within a few days to support both platforms. Don't worry to much about Ogrelicious just yet, but it is appreciated.

xabila

12-12-2008 13:59:46

Ok i've put the tarball here : http://dl.free.fr/ud6N7aswK/Bloody.tar.gz

So the main problem beetween windows compiler and linux compiler (gcc 4.3) seems to be a reference problem.
For example : on Ogrelicious.cpp


fill_all_ptr<SmartRenderSystems>(*this, FastConstIterator< Ogre::RenderSystemList > (Ogre::Root::getSingletonPtr()->getAvailableRenderers()->begin(), Ogre::Root::getSingletonPtr()->getAvailableRenderers()->end())));

need to be replace by

FastConstIterator< Ogre::RenderSystemList > it (Ogre::Root::getSingletonPtr()->getAvailableRenderers()->begin(), Ogre::Root::getSingletonPtr()->getAvailableRenderers()->end());

fill_all_ptr<SmartRenderSystems>(*this,it);

maybe there is another solution...

After of course sprintf_s don't exist on linux, so sprintf

And after the ::toto on header and namespace toto { void fun (toto::titi) } is not alloawed by gcc -> namespace toto { void fun (titi)}...

Maybe that can be improved, and i'm open from suggestions ...

If you have more questions , or if you want me to try the new version just pm me

betajaen

12-12-2008 14:11:37

Brilliant! I'm surprised that you didn't have much problems with porting NxOgre itself or at least you didn't mentioned any.

xabila

12-12-2008 14:57:04

Well you will see with a diff ;)

the NxOgreRigidBodyFunctions.cpp is now on the .h

Bon courage...

betajaen

12-12-2008 15:41:00

Yeah. I've just seen the change.

I'm afraid, I can't allow it.

One of the features of Bloody Mess is to use NxOgre without the PhysX libraries/headers linked. We can get away with this by prototyping most of the classes in a separate file, but it can never link to the PhysX headers in the NxOgre headers.

ramy

10-04-2009 14:02:41

Yeah. I've just seen the change.



I'm afraid, I can't allow it.



One of the features of Bloody Mess is to use NxOgre without the PhysX libraries/headers linked. We can get away with this by prototyping most of the classes in a separate file, but it can never link to the PhysX headers in the NxOgre headers.


Sorry to bring this thread back up,

I've been looking at what my options were to use NxOgre for physics and looking at this thread:
viewtopic.php?f=6&t=2617&hilit=linux&start=90

it seems that xabila's build is not a poor compromise for a working NxOgre port from where i am standing. This is meanly due because of no other alternatives for NxOgre/linux and all other links being broken because of age.

xabila feels i should ask you, betajaen, for permission to use it. I think that's a fair thing to do and it is after all his code but your project. So as i'm stuck in a crux, i'm asking for little lenience to help me, and others in my situation i suppose.

unless there's a secret linux compatible NxOgre prototype under someone's sleeve, this seems like a good, temporary, step to get things running on linux machines.

thanks.

betajaen

10-04-2009 14:10:55

I have no objections for you using that patch with 1.5 in your own project.

If you do manage to get it working, and stay in the guidelines, I'd be happy to put your changes in one of the future releases

xabila

10-04-2009 18:55:53

here is the sources https://www.yousendit.com/download/UmNL ... UUJMWEE9PQ

Unfortunately i'm leaving for 10 days , so no suport...
And don't forget to get cmake in order to compile it