[WIP] Ogre Toolbox

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

MadLion wrote:If i get the toolbox running on my linux box i could implement some code.
Yesterday evening i tried to compile within kdevelop, but it faild with strange errors. The simple demos from wxWidgets are fine.

What version of wxWidgets did you use?
Mr. Turner
Halfling
Posts: 88
Joined: Sun Sep 05, 2004 7:01 pm
Location: Belgium

Post by Mr. Turner »

I use the stable version (2.4.2).

If you manage to compile it on linux, let me know.

Mr. Turner
Mr. Turner
Halfling
Posts: 88
Joined: Sun Sep 05, 2004 7:01 pm
Location: Belgium

Post by Mr. Turner »

I got the terrain working now by checking if it->movable is Null. It isn't in the precompiled dir for now.

Thanks MadLion for pointing me in the right direction.

I'll update this probably tomorrow and I will also set up http://sourceforge.net/projects/ogretoolbox

Mr. Turner
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

After some code changes i manage to compile it now on linux, but i get a segmentation fault while starting...
After checking the backtrace, the problem must to do with the global new in OgreMemoryManager.h.

Code: Select all

//-----------------------------------------------------------------------------
// Overridden global new([])/delete([]) functions
//
inline void *operator new( size_t count )
{
    return Ogre::MemoryManager::sMemManager.allocMem( "", 0, count );
}
But currently i don't know why.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7

Post by haffax »

MadLion, a strategically clever placed #include <OgreNoMemoryManager.h> might help here. Can you provide a stack trace?
team-pantheon programmer
creators of Rastullahs Lockenpracht
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

Oh i missed that there is somethink like this, thanks. I will try it.

If i'm back home i will provide a stacktrace.
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

Here is the backtrace.

Code: Select all

(gdb) bt
#0  0x00000000 in ?? ()
#1  0x00e282fe in wxWindow::DoAddChild () from /usr/lib/libwx_gtk2-2.4.so.0
#2  0x00e195c5 in wxStaticText::Create () from /usr/lib/libwx_gtk2-2.4.so.0
#3  0x00e197db in wxStaticText::wxStaticText () from /usr/lib/libwx_gtk2-2.4.so.0
#4  0x08094445 in PanelEnvironment (this=0x93459f8, parent=0x92fe698, pos=@0xbff18ef8, size=@0xbff18ef0) at OgreMemoryManager.h:409
#5  0x0808e2fb in FrameOgreToolbox (this=0x92bb6e8, title=@0xbff18ff0, pos=@0xbff18fe8, size=@0xbff18fe0) at OgreMemoryManager.h:409
#6  0x08060af6 in ApplicationOgreToolbox::OnInit (this=0x92bb320) at OgreMemoryManager.h:409
#7  0x00dd5d80 in wxEntry () from /usr/lib/libwx_gtk2-2.4.so.0
#8  0x08060a83 in main (argc=1, argv=0xbff19144) at ApplicationOgreToolbox.cpp:26
I tried to place #include <OgreNoMemoryMacros.h> after ogre header includes, but it doesn't seem to work. Maybe i'm wrong.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7

Post by haffax »

I do not know wxwindows, but it seems to me, that embracing the wxwindows includes with #include <OgreNoMemoryMacros.h> ... #include <OgreMemoryMacros.h>. No guarantee though. Such memory allocation bugs are annoying. :?
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Try :

Code: Select all

#include <OgreStuff>
 #include <OgreNoMemoryMacros.h>
 #include <WXWindowsStuff>
 #include <OgreMemoryMacros.h>
 
:?:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

I found the error. ^^
It seems to be not a memory macro problem.
Its a wxwidgets problem. See documentation http://www.wxwindows.org/manuals/2.4.2/ ... xstaticbox

Code: Select all

Please note that a static box should not be used as the parent for the controls it contains, instead they should be siblings of each other. Although using a static box as a parent might work in some versions of wxWindows, it results in a crash under, for example, wxGTK.
So this

Code: Select all

wxStaticBox *sbSkyBoxSettings = new wxStaticBox(this,-1,"Skybox settings",wxPoint(5,60),wxSize(240,130));
new wxStaticText(sbSkyBoxSettings,-1,"Skybox:",wxPoint(10,20));
is not right.
I replaced it with

Code: Select all

new wxStaticText(this,-1,"Skybox:",wxPoint(10,20));
and now it compiles and runs so far.
But the layout is not right.

Another problem i is that the ogre renderwindow is not embedded, it's an extra window.
Mr. Turner
Halfling
Posts: 88
Joined: Sun Sep 05, 2004 7:01 pm
Location: Belgium

Post by Mr. Turner »

Hi MadLion

Thanks for the tip. I'll change that.

Changes:
* 0.1 RC1 is progressing and I'm updating the Grid with properties to a PropertiesGrid (like the one in .Net and in Chronos).
* I switched to wxWidgets 2.5.4.
* Site has been launched http://ogretoolbox.sf.net

These changes are not in the zip here on the forum, but will be in the 1.0 RC release. All that's left to do is to convert the object properties to the new propertygrid.

Can I change the SceneManager at Runtime as the Exterior scene manager is complaining on Ray Queries in scenes with no terrain?

Mr. Turner
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

Hi Mr. Turner,

maybe i could provide the changes and makefiles i have made to compile it on linux.
Mr. Turner wrote:* Site has been launched http://ogretoolbox.sf.net
I have problems to register there. I didn't get the registration email.

When will you submit files to CVS? Will you?
Mr. Turner
Halfling
Posts: 88
Joined: Sun Sep 05, 2004 7:01 pm
Location: Belgium

Post by Mr. Turner »

Hmm

I activated you manually.

You can login now.

For the makefiles, that would be great.

Thanks for your support

[EDIT] Yes 0.1 RC1 will be in the cvs [/EDIT]

Mr. Turner
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

Mr. Turner wrote:I activated you manually.

You can login now.
Thanks i can login now.
Mr. Turner wrote:For the makefiles, that would be great.
Could you give me the current source?
I would like to do my changes on the current source.
Or should i use the last source you provided?
Mr. Turner
Halfling
Posts: 88
Joined: Sun Sep 05, 2004 7:01 pm
Location: Belgium

Post by Mr. Turner »

Please wait till the next release as I changed quite a lot (see PropertiesGrid)
If all goes well, it should go up tomorrow.

[EDIT] I just got the entities done. Lights are for tomorrow.[/EDIT]
Last edited by Mr. Turner on Tue Mar 08, 2005 10:54 pm, edited 2 times in total.
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

Fine i will waiting. ^^
Mr. Turner
Halfling
Posts: 88
Joined: Sun Sep 05, 2004 7:01 pm
Location: Belgium

Post by Mr. Turner »

0.1 RC1 has been released. Check the website for download info