Hi Guys,
I have successfully built Ogre 1.9 from source, choosing to create a static build.
So, I have now included my newly built SDK into my project and all is working well when I create 'root'. Everything initialises happily and program terminates normally.
But, it seems that now that I am working with a static build, you now need to setup the plug-ins (i.e. the DX9 renderer) differently.
Could anyone please share some wisdom on how you include a renderer on a static built Ogre?
Thanks in advance
Renderer plug-in question (static build)
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
Re: Renderer plug-in question (static build)
Oh, I got it
Seems that static building becomes a lot more 'dependant' - LOL
At the top I have included the following;
And in the body of the code to load the actual plug-in.
Seems that static building becomes a lot more 'dependant' - LOL
At the top I have included the following;
Code: Select all
#include"RenderSystems\Direct3D9\include\OgreD3D9Plugin.h"
#pragma comment(lib,"d3d9.lib")
#pragma comment(lib,"d3dx9.lib")
#pragma comment(lib,"dxerr.lib")
#pragma comment(lib,"dxguid.lib")
Code: Select all
D3D9Plugin* mD3D9Plugin;
mD3D9Plugin = OGRE_NEW D3D9Plugin();
mRoot->installPlugin(mD3D9Plugin);
- LJS
- Greenskin
- Posts: 138
- Joined: Wed Jan 09, 2013 8:58 pm
- x 6
Re: Renderer plug-in question (static build)
Don't forget to free the memory, otherwise your application would leak.
R,
Code: Select all
OGRE_DELETE mD3D9Plugin;
// if you are tidy enough, the next is required too :P
// i.e. reusable code && valid pointer usage
mD3D9Plugin = 0;
(am very clumbsy, especially with words on a static screen.)
Ogre 3D 1.9.0 static
Bullet 2.8 static
Ogre 3D 1.9.0 static
Bullet 2.8 static
- LJS
- Greenskin
- Posts: 138
- Joined: Wed Jan 09, 2013 8:58 pm
- x 6
Re: Renderer plug-in question (static build)
P.S. clean up after the root has been freed, destroy-ing will be done by the Ogre::Root
(am very clumbsy, especially with words on a static screen.)
Ogre 3D 1.9.0 static
Bullet 2.8 static
Ogre 3D 1.9.0 static
Bullet 2.8 static
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
Re: Renderer plug-in question (static build)
Yep, always do