New wiki article: Basic Ogre Framework

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: New wiki article: Basic Ogre Framework

Post by drwbns »

On line 132 of OgreVector3.h, I don't see anything wrong in the logfile (attached).


EDIT - Ok, I cleaned the solution and ran the Basic Framework and it seems like its running ok - just a windowed black screen with ogre overlay, but it's completely taking the mouse over, I have to ALT+TAB to get the mouse back.
Attachments
Ogre.log
(15.76 KiB) Downloaded 188 times
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

Just to keep track of everything: drwbns's bug has been solved...more correctly: There was none :D .

http://www.ogre3d.org/forums/viewtopic.php?f=2&t=64058
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...
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: New wiki article: Basic Ogre Framework

Post by drwbns »

Yeah, my fault for starting with the beta OGRE version instead of the stable release. What a headache trying to go back! Somehow visual studio was keeping track of OGRE beta includes even after I had removed them/ changed them to stable version paths. Weird! It took a few program restarts and system restarts for vstudio to forget about the paths. START WITH THE STABLE VERSION OF OGRE! Spacegaier : anyway you can help me with a compile error of the zzz (whatever) (Basic AI Demo) open source game project?

http://www.ogre3d.org/forums/viewtopic.php?f=11&t=60487
Last edited by drwbns on Tue Apr 05, 2011 9:45 pm, edited 3 times in total.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

What exactly are you talking about?
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: Basic Ogre Framework

Post by dave2041 »

Hey Space, I'm back!

Can i just check if you get a blank menu label when starting the advancedOgreFramework?
I commented this out as i wondered why you would leave it in if it is just blank, but without it the buttons wont display text! I'm mystified lol.

EDIT: Also if i go into the game state and then back to the menu the captions are being displayed correctly, bizarre.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

I can confirm, but not explain that :shock: . I either did not realize it before, or it was just introduced by one of my latest updates (which I can hardly believe though...).
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: Basic Ogre Framework

Post by dave2041 »

It's so strange, i can't find any reason for this behaviour >< Sorry to bring you another bug lol.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

Wait wrong thread! You are talking about the AdvancedOgreFramework (the basic one does not even have these states). So, we should move the discussion there ;) .
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
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

You should probably ask Omniter, since I think he is the one who did the SdkTrays framework...there is a support thread for it somewhere here as well IIRC.
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
Night Elf
Halfling
Posts: 96
Joined: Sun Jun 26, 2005 5:25 pm
Location: Argentina
Contact:

Re: New wiki article: Basic Ogre Framework

Post by Night Elf »

harry_ftw wrote:
wom wrote:On OSX I am not receiving any mouse or keyboard events. Based on debugging all those xxxx->capture() get called and main loop is running. Just no events are received. I don't even see mouse cursor there, should I?

Also seems that app is running somehow weirdly since when I alt-tab to another app and move mouse over DemoApp I see beach ball rotating. OSX guys any experience on this?

I got Ogre 1.7 from SVN and compiled and ran those samples successfully. They work.
I was in a similar situation, and found that by calling Ogre::WindowEventUtilities::messagePump(), where previously it would only be called for Win32, the program runs as it probably should.

As something of a disclaimer: I only successfully compiled Ogre yesterday, currently know very little about how it all works, and discovered the messagePump solution basically by trial and error... so if any more experienced Ogre users find my proposed solution horrendous, I hope they shall correct me. D:
I'm having this same problem on OSX... I'm calling Ogre::WindowEventUtilities::messagePump(), but it still behaves as wom described. Any suggestions?

UPDATE: Solved (somewhat...)

The problem appears to be I was including the framework in a Cocoa app and driving the main loop with a while just doesn't work. You have to use NSTimer (easier) or CVDisplayLink (recommended). I changed it to use NSTimer and it works now.

The problem I have is that when you launch the app, the mouse pointer locks outside the window and so the app doesn't get any mouse updates. I have to Cmd + Tab to another app and then click on the app window to return to the app. When I do that, the mouse is inside the window frame so now the mouse works as expected... Any ideas?

Also, when I tried to run in full screen I just got a black screen and no way to quit the app. I had to restart my mac :(

UPDATE 2:

I tested a bit more and it appears I was correct about the input not working when the mouse is outside. If you set your window to be bigger than 800x600 so it covers the config dialog, mouse input works from the start.

I don't know what may be causing the full screen problem. I tested with another minimal example without using Basic Ogre Framework and it goes full screen just fine...

UPDATE 3:

I figured out a workaround for the input problem. See here: http://www.ogre3d.org/forums/viewtopic. ... 01#p432401
Mariano Ruggiero // Follow me on Twitter (@ArtCoder) // Check out our games:
NEW! Elemental Rage - metroidvania-style adventure platformer
Silent Swords // Silent Swords ZERO // Crunchy Planets
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

New update, see first post.
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...
singmelody
Gnoblar
Posts: 11
Joined: Sun Dec 19, 2010 11:03 pm

Re: New wiki article: Basic Ogre Framework

Post by singmelody »

when I use m_pRoot = new Ogre::Root(); in OgreFramework.cpp . I can compile it successful , but when I run the execute. I found that the config window show nothing. The problem is that the code in the Basic Ogre Framework hasn't load plugins.cfg.
I think we should add the following code:

Code: Select all

#ifdef _DEBUG
	m_pRoot = new Ogre::Root("plugins_d.cfg");
#else
	m_pRoot = new Ogre::Root("plugins.cfg");
#endif
I am just a beginner in Ogre. If I am wrong at this problem , please forgive me. :D
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

Well, the naming of the config files is up to the developer and I personally do not use any plugins_d.cfg, but always call them plugins.cfg to not have to use those pre-processor commands = kepp it clean and simple. As it is a decision of taste, I will not change that in my framework. Hope you understand why.

Thanks for the comment though. Might help others having the same troubles...
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...
singmelody
Gnoblar
Posts: 11
Joined: Sun Dec 19, 2010 11:03 pm

Re: New wiki article: Basic Ogre Framework

Post by singmelody »

Thanks for your reply. :)
Liquinaut
Gnoblar
Posts: 3
Joined: Fri May 13, 2011 1:33 pm

Re: New wiki article: Basic Ogre Framework

Post by Liquinaut »

Hello,

first of all: thanx for this framework, it makes a lot more sense to me then the other ones I stumbled upon. I got it all up and running and I am now on my way to integrate the next pieces of code into it. Since I want to keep the Framework and the App Part seperated from each other, I want to integrate a mouse listener into the App Part, too (just like the key events that are already there).

I am quite new to OGRE and have some difficulties with that. As far as I understand it's not enough to just register the App Class as a public OIS::Mouselistener (as for the Key events) and declare the Mouse Events functions, right? Because that just won't do. But what is it I need to do then? Create a new instance of the SdkTrayManager and work with that? And how would I integrate the Event functions then?

Could someone point me to the right direction?

Thanx in advance for your help! :wink:

Paul
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

Liquinaut wrote:As far as I understand it's not enough to just register the App Class as a public OIS::Mouselistener (as for the Key events) and declare the Mouse Events functions, right?
Sure, that sounds about right. Make the app class a MouseListener and tell the framework that your class now is the listener and implement the callbacks methods. Then you can handle the input there and/or pass it along to the mouse listener functions of the framework. So basically the same system as with the keys.
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
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

New update:

Update 2011/12/30:
  • ported to Ogre 1.8
  • hWnd now uses size_t to prevent issues with x64 builds
  • framework now hosted on BitBucket
Mercurial Repostiroy URL: BitBucket BasicOgreFramework Repository
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
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: New wiki article: Basic Ogre Framework

Post by mkultra333 »

I'm on Ogre 1.7.4. Tried to use the BasicOgreFramework but the current one doesn't work with 1.7.4 anymore. Only needs a couple of changes to get it running again though, posted them here: http://www.ogre3d.org/forums/viewtopic.php?f=5&t=70127
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

Well the framework was updated to work with Ogre 1.8. The other parts are mostly habits stuff (e.g. using different plugins.cfg files).

Perhaps I should create a legacy branch on BitBucket for Ogre 1.7.4.
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
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: New wiki article: Basic Ogre Framework

Post by mkultra333 »

1.7.4 isn't really legacy code yet, it's still the official current version. All you cool kids who've been using 1.8 for the last year or so probably forget that. :)
But since 1.8 is coming out in the near future, it doesn't seem worth the effort to support both 1.8 and 1.7.4. I've pointed out the couple of changes needed to get it running with 1.7.4, and after 1.8 becomes official there probably won't be much call for the old version.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

Update 2013/02/10:
  • ported to Ogre 1.9 (v1.8 remains as an own branch)
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
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: New wiki article: Basic Ogre Framework

Post by spacegaier »

Update 2014/03/01:
  • ported to Ogre 1.10
  • added VS2012 solution (VS2008 still remains, but no guarantees that it works)
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...
Post Reply