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.
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 »

All CFG (ogre.cfg, plugins.cfg, resources.cfg, ...) files are by default expected to be in the same folder as the EXE is. If you want it to be located somewhere else, you have to tell the application in the code where to find it.
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...
Deepfreeze32
Gnoblar
Posts: 4
Joined: Tue Nov 15, 2011 6:32 am

Re: New wiki article: Advanced Ogre Framework

Post by Deepfreeze32 »

Ahah! That was the problem. Thank you very much!

Now I'll attempt to sort out the SDKTrays errors. I think I can handle that on my own, but I'll ask if I run into any further trouble.

Thanks again!
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 »

Why are there SDKTray errors? Are you trying to compile the solution file I provided? Is SDKTrays causing trouble on Mac in general? Can hardly believe that...
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...
Deepfreeze32
Gnoblar
Posts: 4
Joined: Tue Nov 15, 2011 6:32 am

Re: New wiki article: Advanced Ogre Framework

Post by Deepfreeze32 »

Well, it was an issue with the way Xcode linked to the file. Xcode tends to be a little funky when linking, so I had to move files around to get it to link properly. Thankfully, I got it sorted out. Now to strip it out and use CEGUI...
LinuxInside
Kobold
Posts: 30
Joined: Sun Dec 11, 2011 6:00 pm

Re: New wiki article: Advanced Ogre Framework

Post by LinuxInside »

Sorry, where can I find the files? :oops:
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 »

LinuxInside wrote:Sorry, where can I find the files? :oops:
What do you mean by "the files"?
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...
LinuxInside
Kobold
Posts: 30
Joined: Sun Dec 11, 2011 6:00 pm

Re: New wiki article: Advanced Ogre Framework

Post by LinuxInside »

spacegaier wrote:
LinuxInside wrote:Sorry, where can I find the files? :oops:
What do you mean by "the files"?
I mean the framework files, but I have found them on the wiki! :)
Shtuka
Greenskin
Posts: 146
Joined: Mon Jan 10, 2011 7:39 pm
x 9

Re: New wiki article: Advanced Ogre Framework

Post by Shtuka »

I'm getting the error
Run-Time Check Failure #2 - Stack around the variable 'hWnd' was corrupted.
in AdvancedOgreFramework.cpp line 110, end of

Code: Select all

bool OgreFramework::initOgre(Ogre::String wndTitle, OIS::KeyListener *pKeyListener, OIS::MouseListener *pMouseListener)
in 64 bit debug mode VC++ 10.

How can I fix this?
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 »

Since I neither work with x64 builds nor VS2010 I cannot really assist here. Did you try googling for that error message? That might give you some general pointers.
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...
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 100

Re: New wiki article: Advanced Ogre Framework

Post by Wolfmanfx »

Looks like a wrong datatype cast (check hwnd under 64bit the handles have a different size)
Shtuka
Greenskin
Posts: 146
Joined: Mon Jan 10, 2011 7:39 pm
x 9

Re: New wiki article: Advanced Ogre Framework

Post by Shtuka »

Change

Code: Select all

unsigned longhWnd = 0;
to

Code: Select all

unsigned long long hWnd = 0;
and it works! :)
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 100

Re: New wiki article: Advanced Ogre Framework

Post by Wolfmanfx »

Use size_t which 32 bit on 32 bit machine and 64 bit on 64 bit machine.
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 »

Wolfmanfx wrote:Use size_t which 32 bit on 32 bit machine and 64 bit on 64 bit machine.
Good hint. Will update both of my frameworks with that change soon. Thanks!

I will also do one minor change to get them running with Ogre 1.8 and possibly add a note on how to "downport" them to 1.7.
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...
Shtuka
Greenskin
Posts: 146
Joined: Mon Jan 10, 2011 7:39 pm
x 9

Re: New wiki article: Advanced Ogre Framework

Post by Shtuka »

How do I add a Progress/LoadingBar to Advanced Ogre Framework?
User avatar
shadowfeign
Goblin
Posts: 213
Joined: Mon Jan 26, 2009 11:51 pm
x 15

Re: New wiki article: Advanced Ogre Framework

Post by shadowfeign »

gioramies wrote:Hello. Grettings to all. I compiled and executed the Advanced Ogre Framework (release) but I noted that the text of the "Menu mode" label doesn't appear (image below).

Image
https://picasaweb.google.com/lh/photo/1 ... directlink

I'm using CodeBlocks 10.05; TDM-GCC Compiler Suite for Windows, GCC 4.4/4.5 Series, Standard MinGW 32-bit Edition; and Windows Vista Home Premium Service Pack 2

I checked the code of the GameState.cpp file but I think everything is good:

Code: Select all

OgreFramework::getSingletonPtr()->m_pTrayMgr->createButton(OgreBites::TL_CENTER, "EnterBtn", "Enter GameState", 250);
OgreFramework::getSingletonPtr()->m_pTrayMgr->createButton(OgreBites::TL_CENTER, "ExitBtn", "Exit AdvancedOgreFramework", 250);
OgreFramework::getSingletonPtr()->m_pTrayMgr->createLabel(OgreBites::TL_TOP, "MenuLbl", "Menu mode", 250);
If you run the application and enter to the GameState, and then return to the MenuState, the text of the "Menu mode" appears, but when you execute the application it doesn't appear at the begining (first screen). I need some help, plis.
It didn't look like any solution to this was found, unless I missed it. I'm having the same problem with visual studio express 2010. I don't think the problem has anything to do with sdktrays. In the menu state, I removed sdktrays and swapped it to use gorilla instead. I'm getting a similar result using gorilla, gorilla is showing 0 for batch count the first time the state is loaded, then shows the correct result when I return to the state. When I was in the process of switching things over to gorilla, commenting out parts of the sdktray code resulted in having different parts show up blank, at one point both buttons showed up blank, though they still worked. When I compile a version straight from the wiki, it is the sdktray label that is blank.
Rhynedahll
Halfling
Posts: 77
Joined: Thu Jan 08, 2009 2:03 am
x 1

Re: New wiki article: Advanced Ogre Framework

Post by Rhynedahll »

I'm trying to build AOF with 1.7.4 in Express 2008.

The debug version builds ok but when it runs it crashes with

Code: Select all

The procedure entry point ?getINvertVertexWinding@RenderSystem@Ogre@@UBE_NXZ could not be loacated in the dynamic link library OgreMain.dll
I know this should be OgreMain_d.dll, but don't know why it's looking in the wrong place.

Any ideas as to what I am doing wrong?
The Key to Magic -- Book One: ORPHAN
An epic fantasy by H. Jonas Rhynedahll available on Kindle.
The Key to Magic
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 »

Well it apparently uses the wrong DLL as you already said. I assume you double checked the linker 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...
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:Well it apparently uses the wrong DLL as you already said. I assume you double checked the linker settings?
Well,, aside from setting Additiional Library Directories to the location of the Ogre debug versions, I don't actually know what else to check.
The Key to Magic -- Book One: ORPHAN
An epic fantasy by H. Jonas Rhynedahll available on Kindle.
The Key to Magic
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 »

Okay, so what exactly did you do? Did you check out/clone the repository over at BitBucket and then just tried to build the VS solution that is part of it?
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...
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:Okay, so what exactly did you do? Did you check out/clone the repository over at BitBucket and then just tried to build the VS solution that is part of it?
Actually, no. I downloaded the .rar from your website using the link on the Wiki page.

Is that version out of date?
The Key to Magic -- Book One: ORPHAN
An epic fantasy by H. Jonas Rhynedahll available on Kindle.
The Key to Magic
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 out of date, although I am not sure if that is the cause for your troubles. But it can't hurt to switch to the updated version on BitBucket. Link is in the wiki article (where previously the link to my private webspace used to be).
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...
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:Yes, it is out of date, although I am not sure if that is the cause for your troubles. But it can't hurt to switch to the updated version on BitBucket. Link is in the wiki article (where previously the link to my private webspace used to be).
This link?

Code: Select all

An example that runs out-of-the-box (without any compiling) can be downloaded here
This link still points to http://www.spacegaier.de/Ogre/AdvancedOgreFramework.rar for me.
The Key to Magic -- Book One: ORPHAN
An epic fantasy by H. Jonas Rhynedahll available on Kindle.
The Key to Magic
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 »

Ah, sorry. Back then I seem to have forgotten to switch the link for the AOF. I just did it for BOF. I will update the wiki page shortly.

In the meantime, here we go: https://bitbucket.org/spacegaier/advancedogreframework
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...
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:Ah, sorry. Back then I seem to have forgotten to switch the link for the AOF. I just did it for BOF. I will update the wiki page shortly.

In the meantime, here we go: https://bitbucket.org/spacegaier/advancedogreframework
Thanks, got it.

In my clone there is a typo in AdvanceOgreFramework.cpp (missing underscore):

Code: Select all

template<> OgreFramework* Ogre::Singleton<OgreFramework>::msSingleton = 0;
Might just be me though.
The Key to Magic -- Book One: ORPHAN
An epic fantasy by H. Jonas Rhynedahll available on Kindle.
The Key to Magic
Rhynedahll
Halfling
Posts: 77
Joined: Thu Jan 08, 2009 2:03 am
x 1

Re: New wiki article: Advanced Ogre Framework

Post by Rhynedahll »

Okay, that worked.

It builds and runs in Release fine.

Quesiton about Debug mode. What would cause the Render Subsystems not to show up in the Ogre config dialog?

I have all the Ogre debug versions in the same directory as the debug .exe and have set that to the working directory in Express.
The Key to Magic -- Book One: ORPHAN
An epic fantasy by H. Jonas Rhynedahll available on Kindle.
The Key to Magic