[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 » Fri Mar 04, 2005 10:01 am

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?
0 x

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

Post by Mr. Turner » Fri Mar 04, 2005 4:35 pm

I use the stable version (2.4.2).

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

Mr. Turner
0 x

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

Post by Mr. Turner » Fri Mar 04, 2005 6:16 pm

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
0 x

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

Post by MadLion » Mon Mar 07, 2005 1:43 pm

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.
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Mon Mar 07, 2005 2:35 pm

MadLion, a strategically clever placed #include <OgreNoMemoryManager.h> might help here. Can you provide a stack trace?
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

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

Post by MadLion » Mon Mar 07, 2005 2:38 pm

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

If i'm back home i will provide a stacktrace.
0 x

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

Post by MadLion » Mon Mar 07, 2005 7:00 pm

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.
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Mon Mar 07, 2005 8:12 pm

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. :?
0 x
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
Contact:

Post by jacmoe » Mon Mar 07, 2005 8:13 pm

Try :

Code: Select all

#include <OgreStuff>
 #include <OgreNoMemoryMacros.h>
 #include <WXWindowsStuff>
 #include <OgreMemoryMacros.h>
 
:?:
0 x
/* 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 » Mon Mar 07, 2005 10:32 pm

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.
0 x

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

Post by Mr. Turner » Tue Mar 08, 2005 5:27 pm

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
0 x

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

Post by MadLion » Tue Mar 08, 2005 6:06 pm

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?
0 x

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

Post by Mr. Turner » Tue Mar 08, 2005 6:31 pm

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
0 x

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

Post by MadLion » Tue Mar 08, 2005 6:36 pm

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?
0 x

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

Post by Mr. Turner » Tue Mar 08, 2005 7:27 pm

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.
0 x

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

Post by MadLion » Tue Mar 08, 2005 7:30 pm

Fine i will waiting. ^^
0 x

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

Post by Mr. Turner » Wed Mar 09, 2005 5:55 pm

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

Post Reply