ogre inside a uiview

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
dowi
Halfling
Posts: 48
Joined: Wed Sep 07, 2011 3:37 am

ogre inside a uiview

Post by dowi »

hi guys

im new to ogre.
i've managed to setup ogre the iphone with the templates and in windows without the templatess.
but i could not figure out how to place ogre inside a uiview!
that is so i can control it's level (below somthing, above something)

can someone please help ??

thanks alot in advanced
Last edited by dowi on Wed Sep 07, 2011 12:43 pm, edited 1 time in total.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: ogre inside a uiview

Post by masterfalcon »

There are a whole bunch of threads about this on the forums. Just search for UIView. There could also be something on the wiki as well. Embedding Ogre in a custom UIView is only properly supported in 1.8.
dowi
Halfling
Posts: 48
Joined: Wed Sep 07, 2011 3:37 am

Re: ogre inside a uiview

Post by dowi »

hi, thanks for the quick reply!

i have searched and found the threads you referring to but they are not "complete":
http://www.ogre3d.org/forums/viewtopic. ... ew#p433713
http://www.ogre3d.org/forums/viewtopic. ... ew#p420578


also, i didnt know its only supported in 1.8! i used 1.7.3...
i'll try with it


another problem i have:

do you know what could cause ogre window to be black and blank?
i have a suspicion that the rendersystem is not set correctly.

Code: Select all

#define OGRE_STATIC_GLES
...
mRoot = new Ogre::Root("","");
...
StaticPluginLoader mStaticPluginLoader;
mStaticPluginLoader.load();

RenderSystemList renderers = mRoot->getAvailableRenderers();

//See if the list is empty (no renderers available)
	if(renderers.empty())
		return false;

	// pick up the first one from the list - should be only GL
	mRenderSystem = (*renderers.begin());
		
	Root::getSingleton().setRenderSystem(mRenderSystem);
i have not used root->loadPlugin nor config file
is what i did suppose to work?

thanks
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: ogre inside a uiview

Post by masterfalcon »

It would be a good idea to use a config file to easily let it know what render system to use and options for setting it up.
dowi
Halfling
Posts: 48
Joined: Wed Sep 07, 2011 3:37 am

Re: ogre inside a uiview

Post by dowi »

ok, but should it work?

Code: Select all

#define OGRE_STATIC_GLES
mRoot = new Ogre::Root("","");
...
StaticPluginLoader mStaticPluginLoader;
mStaticPluginLoader.load();
is this a valid way to go through?

because i see a black blank screen
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: ogre inside a uiview

Post by masterfalcon »

Maybe, maybe not. It very easy to just use a config file though.