New wiki article: Advanced Ogre Framework

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: New wiki article: Advanced Ogre Framework

Post by dave2041 »

i understand that, however i need st_exterior_close in order to load a terrain do i not? are you saying i can't use it currently with your framework?
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: New wiki article: Advanced Ogre Framework

Post by spacegaier »

Yes, it is needed for the terrain.cfg stuff (unless you move on to Ogre 1.7 and try sinbad's new (not totally finished) Ogre::Terrian; there isw a big thread on it somewhere here...).

And yes, you can use it with the framework.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: New wiki article: Advanced Ogre Framework

Post by dave2041 »

ok so sorry to be noob all over your thread but how can i get around the problem? (assuming that the problem is with the iteration through the results looking at the terrain which isn't an object)
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: New wiki article: Advanced Ogre Framework

Post by spacegaier »

In which line excactly does it crash? I can't see any reason for a crash from my first view as we are just handling movable objects. We check it via this itr->movable. If this would be null, itr->worldFragment would be set, but we don't cover this here.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: New wiki article: Advanced Ogre Framework

Post by dave2041 »

crashes on this line.

Code: Select all

    for(itr = result.begin(); itr != result.end(); itr++)
    {
        if(itr->movable)
        {
			OgreFramework::getSingletonPtr()->m_pLog->logMessage("MovableName: " + itr->movable->getName());
	------->		m_pCurrentObject = m_pSceneMgr->getEntity(itr->movable->getName())->getParentSceneNode();
			OgreFramework::getSingletonPtr()->m_pLog->logMessage("ObjName " + m_pCurrentObject->getName());
			m_pCurrentObject->showBoundingBox(true);
			m_pCurrentEntity = m_pSceneMgr->getEntity(itr->movable->getName());
			m_pCurrentEntity->getSubEntity(1)->setMaterial(m_pOgreHeadMatHigh);
            break;
        }			
    }
23:29:48: MovableName: tile[1][0,0]
23:29:49: OGRE EXCEPTION(5:ItemIdentityException): Object named 'tile[1][0,0]' does not exist. in SceneManager::getMovableObject at f:\codingextra\ogre\shoggoth_vc8\ogre\ogremain\src\ogrescenemanager.cpp (line 6247)

if i change ST_EXTERIOR_CLOSE back to ST_GENERIC and comment out the terrain result only has one thing in it,
where as with the terrain included the result of the ray cast is 2
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: New wiki article: Advanced Ogre Framework

Post by dave2041 »

OH i was just looking over a previous program that deals with mouse picking and it contained the following:

Code: Select all

if (itr->movable && itr->movable->getName().substr(0, 5) != "tile[")
			{	
			    mCurrentObject = itr->movable->getParentSceneNode();
				break;
			} // if
looks like it'll exclude that nasty terrain or tile ~ from getting into our results array lol

Update: confirmed working :)
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: New wiki article: Advanced Ogre Framework

Post by spacegaier »

o_O I thought that everything that belongs to the terrain and is hit, will result in itr->movable == null, but itr->worldFragment != null. So I thought we would have already excluded them with my version. Strange, but happy that you were able to sort that out :)
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: New wiki article: Advanced Ogre Framework

Post by dave2041 »

Yo space, just a quick question... do i need ogre 1.6.4 in order to use this? it seems that a few functions (setMaterial, something with the string convertor) aren't working properly in 1.6.0.

This wouldn't be a problem, however i don't have control over what version is installed at my university.

Cheers
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: New wiki article: Advanced Ogre Framework

Post by spacegaier »

I don't know excactly which version do you need, but the setMaterial() function was one of the rare exceptions that an extra function was added to the already released and stable codebase. See this revision made by sinbad on Jan 18 11:53:24 2009 UTC. So you either need a version having this commit in it or find a way to set the material without this function.

I myself currently use the version 1.6.1 [Shoggoth] (22 January 2009). I you have an older version at the university, it might be a good idea to ask for an update to the latest version (1.6.4) in which many smaller issues were fixed.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: New wiki article: Advanced Ogre Framework

Post by dave2041 »

ahh got it fixed now, got the admin to come down and run windows update. Same problem as my machine had here lol. Thanks anyway, i'm now using 1.6.4 :)
VEGETA_DTX
Gnoblar
Posts: 11
Joined: Sat Oct 03, 2009 11:37 am

Re: New wiki article: Advanced Ogre Framework

Post by VEGETA_DTX »

Hello, I hope this topic is appropriate for my Advanced Ogre Framework problem, I've really tried searching forums and I didn't find a single topic with this same problem unfortunately.

Now onto problem:
I've tried both following AOF guide and setting things up according to it, and downloading and running the AOF example(which is said to be running-out-of-the-box), still none of those two successfully compiled.
Then I decided I should only care about the example one for now, and once I eventually successfully compile it then I can compare those two and see whats the difference and eventually discover what was the problem with the one I built according to the guide.

The error is:
fatal error LNK1181: cannot open input file 'tinyxml.lib'
Please can anybody tell me why is this error showing up, should I just simply search for the tinyxml.lib on the internet, download it and place it in the appropriate directory so it can be included(and so far, I had no luck finding a place where I can download it), or is it some other error hidden behind this one?

I would appreciate any help! thank you for reading!
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: New wiki article: Advanced Ogre Framework

Post by dave2041 »

hello DTX,

you need to download tinyxml and compile it, then in the debug/release folder the tinyxml.lib will be created and then all you have to do is copy this .lib file to your ogresdk/lib's directory

P.S. hi space, just a quickie... would this be the correct way to get the render window from a game state within your framework?

Code: Select all

mRenderWin = OgreFramework::getSingletonPtr()->m_pRenderWnd;
i'm trying to use MOC as i'm having difficulty selecting targets and move about with the mouse (i can do one or the other but not both unfortunately.

Cheers
VEGETA_DTX
Gnoblar
Posts: 11
Joined: Sat Oct 03, 2009 11:37 am

Re: New wiki article: Advanced Ogre Framework

Post by VEGETA_DTX »

Hello Dave! thank you very much for helping!

I did what you said and compiled both tinyxml.lib for release and tinyxmld.lib for debug, placed them and linked them properly but now I got new errors:
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>DotSceneLoader.obj : error LNK2001: unresolved external symbol "public: char const * __thiscall TiXmlElement::Attribute(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?Attribute@TiXmlElement@@QBEPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>DotSceneLoader.obj : error LNK2001: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::FirstChildElement(void)const " (?FirstChildElement@TiXmlNode@@QBEPAVTiXmlElement@@XZ)
1>DotSceneLoader.obj : error LNK2001: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::FirstChildElement(char const *)const " (?FirstChildElement@TiXmlNode@@QBEPAVTiXmlElement@@PBD@Z)
1>DotSceneLoader.obj : error LNK2001: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::NextSiblingElement(char const *)const " (?NextSiblingElement@TiXmlNode@@QBEPAVTiXmlElement@@PBD@Z)
1>bin\Release\AdvancedOgreFramework.exe : fatal error LNK1120: 4 unresolved externals
Please can you explain why is this happening now and how can I solve it? :(
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: New wiki article: Advanced Ogre Framework

Post by spacegaier »

These errors indicate, that you did not link the library correcctly. You have to add the path where the LIB files are in, in your IDE settings and then add the library as an additional dependency in your project settings.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
VEGETA_DTX
Gnoblar
Posts: 11
Joined: Sat Oct 03, 2009 11:37 am

Re: New wiki article: Advanced Ogre Framework

Post by VEGETA_DTX »

Thank you spacegaier, I really appreciate it, unfortunately I still have problems, in the mean time I did something(whatsoever I think I did right what you've said) and those errors disappear now I only have one warning:
warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
But when the application actually runs, only black screen appears and it pops out that unavoidable "don't send" message saying
AdvancedOgreFramework.exe has encountered a problem and needs to close. We are sorry for the inconvenience
:(
Could it be that I simply didn't include the models textures etc from the AdvancedOgreFramework\bin\release\media and such? or is the example itself supposed to do that for me?

(I don't want to sound like tv shop but seriously if somebody is working on some project and is thinking that his project is errorless and perfect, please think twice and hire me to expose all the possible errors, I guarantee you that if I personally compile your project even on your own PC I will bump on every POSSIBLE error there can be on the planet earth, the errors that nobody ever heard of before. Sorry I had to rant :P, I am pissed as I NEVER compiled anything in my life at the first 3 times, let alone first try, and then how am I supposed to be motivated and learn further :()
Last edited by VEGETA_DTX on Fri Oct 23, 2009 8:22 pm, edited 1 time in total.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: New wiki article: Advanced Ogre Framework

Post by jacmoe »

VEGETA_DTX wrote:I am pissed as I NEVER compiled anything in my life at the first 3 times, let alone first try, and then how am I supposed to be motivated and learn further :()
It will pass. Eventually. I promise. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
VEGETA_DTX
Gnoblar
Posts: 11
Joined: Sat Oct 03, 2009 11:37 am

Re: New wiki article: Advanced Ogre Framework

Post by VEGETA_DTX »

jacmoe wrote:
VEGETA_DTX wrote:I am pissed as I NEVER compiled anything in my life at the first 3 times, let alone first try, and then how am I supposed to be motivated and learn further :()
It will pass. Eventually. I promise. :)
Thank you for the encouragement :mrgreen: and don't worry I am not giving up that easily :wink:

UPDATE: When I run the AdvancedOgreFramework\bin\release AdvancedOgreFramework.exe that I COMPILED with all those unsuccessful compiling IT RUNS AND WORKS PERFECTLY!? but when I compile and run inside Visual Studio it does that "don't send" error :S? Is that revealing something for somebody?
Thanks!
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: New wiki article: Advanced Ogre Framework

Post by spacegaier »

The problem is that VS tries to run the generated application out of a temporary location, where the needed Ogre DLLs are not in. Therefore, you have to specify a working directory.

Go to the project settings > Debugging > Working directory. Set it to the directory out of which you were able to make the application run. It's as easy as that :)

EDIT: The warning you mentioned above, can be ignored (at least I do) or google for a solution. Nothing directly related to Ogre, I guess.
I am pissed as I NEVER compiled anything in my life at the first 3 times, let alone first try, and then how am I supposed to be motivated and learn further :()
Eventually you will. Needs some time, so be patient :) Every beginning is hard, but worth the trouble!
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
VEGETA_DTX
Gnoblar
Posts: 11
Joined: Sat Oct 03, 2009 11:37 am

Re: New wiki article: Advanced Ogre Framework

Post by VEGETA_DTX »

spacegaier, thank you so much, you are a life saver!...thanks goodness it works :)
Thank you for encouragement, I definitely know that beginnings are hard but yeah I hope I'll surpass it relatively soon.

Also thanks everybody else for helping and being kind, one of the best things about Ogre is that it has a huge community.
Rhynedahll
Halfling
Posts: 77
Joined: Thu Jan 08, 2009 2:03 am
x 1

Re: New wiki article: Advanced Ogre Framework

Post by Rhynedahll »

Can I ask some total noob questions? :D

If so, where is OgreCEGUIRendere.h generally? I am working with the latest 1.7 svn (was it ever confirmed that AOF works with 1.7?) and I can't find it. I know I need to include the directory in 2008 express, but a search does not turn up this file.

I've compiled the svn Install project, so I have the SDK directories in current state of developement. Has the name been changed or removed in 1.7?

I've looked around a bit and read through this thread but haven't found anything.

Code: Select all

1>h:\advancedogreframework\advancedogreframework\advancedogreframework\AdvancedOgreFramework.hpp(26) : fatal error C1083: Cannot open include file: 'OgreCEGUIRenderer.h': No such file or directory
The Key to Magic -- Book One: ORPHAN
An epic fantasy by H. Jonas Rhynedahll available on Kindle.
The Key to Magic
Ident
Gremlin
Posts: 155
Joined: Thu Sep 17, 2009 8:43 pm
Location: Austria
x 9

Re: New wiki article: Advanced Ogre Framework

Post by Ident »

i myself, too, use 1.7

However i haven't compiled a new version for like 2 weeks, but i think it's unlikely that the name has changed since then..


here is my path copied from Visual Studio for the said file (of course only the last, important part):

OGRE\include\CEGUIRenderer\OgreCEGUIRenderer.h

hope this helps!
Last edited by Ident on Sat Oct 24, 2009 3:34 pm, edited 1 time in total.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: New wiki article: Advanced Ogre Framework

Post by spacegaier »

I never tried it with 1.7, but as far as I remember, there were some changes with the CEGUI stuff. Search for the CEGUI 0.7 announcement thread here, in order to find out if same things need to be changed.

Sorry, that I can't assist you on this any further since I am sticking to 1.6 untill 1.7 gets stable.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Ident
Gremlin
Posts: 155
Joined: Thu Sep 17, 2009 8:43 pm
Location: Austria
x 9

Re: New wiki article: Advanced Ogre Framework

Post by Ident »

Oh and in case these files and even the whole folder might be missing - which is what i expect in your case - you might have forgotten 1 step while creating your 1.7 dependencies - namely as far as i can remember you need to copy an older dependency package into the folder to get some older stuff, first

here is an awesome link explaining the whole procedure http://blog.tidalware.com/2009/08/build ... trunk-1-7/
The step you might be missing is "2"

good luck
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: New wiki article: Advanced Ogre Framework

Post by dave2041 »

just want to add to what space said... i have a post build event that copys the ompiled exe to the ogresdk/bin/release or debug folder and runs it from there. that way it always has the dll's that it needs and the media folder etc~

takes a little fiddling but well worth it imo
Rhynedahll
Halfling
Posts: 77
Joined: Thu Jan 08, 2009 2:03 am
x 1

Re: New wiki article: Advanced Ogre Framework

Post by Rhynedahll »

spacegaier wrote:I never tried it with 1.7, but as far as I remember, there were some changes with the CEGUI stuff. Search for the CEGUI 0.7 announcement thread here, in order to find out if same things need to be changed.

Sorry, that I can't assist you on this any further since I am sticking to 1.6 untill 1.7 gets stable.
Thanks, this led me in the right direction and answered my question.

CEGUI 0.7 makes big changes (such as changing the name of OgreCEGUIRendere.h (CEGUIOgreRenderer) & etc and internal code changes as well) so that the current AOF is not compatable with 1.7.

Also, someone mentioned in that thread (http://www.ogre3d.org/forums/viewtopic. ... 27#p360058) that the samples for 1.7 are not going to use CEGUI at all.

So I'll guess I'll plug away at trying to rewrite AOF to use 0.7. and Ogre 1.7. :(
The Key to Magic -- Book One: ORPHAN
An epic fantasy by H. Jonas Rhynedahll available on Kindle.
The Key to Magic