[Accepted] Ogre Material Editor

Threads related to Google Summer of Code
User avatar
Evak
Orc Shaman
Posts: 707
Joined: Sun Apr 02, 2006 7:51 pm
Location: Sacramento, CA
Contact:

Post by Evak » Fri Oct 05, 2007 4:37 pm

Would be nice to have a compiled version, otherwise how are artists supposed to make use of it?
0 x

User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
Contact:

Post by KungFooMasta » Fri Oct 05, 2007 5:17 pm

I just read the wiki, and maybe I missed this somewhere.. is this application in any sort of useable state? :shock:
0 x
Creator of QuickGUI!

User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!

Post by Brocan » Fri Oct 05, 2007 7:33 pm

I'll join the request of a compiled version :D
0 x

User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
Contact:

Post by KungFooMasta » Thu Oct 11, 2007 4:58 pm

Maybe next summer we can have a project that focuses on finishing this one up. . . or at least gets it to a useable state. . . :lol:
0 x
Creator of QuickGUI!

User avatar
steven
Gnoll
Posts: 657
Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:

Post by steven » Sun Oct 28, 2007 9:45 am

@Hudson

I really like some parts of your editor.

Btw before people ask: No... I didn't compile the editor I am using it for inspiration for my own editor (in the OGE project).

I liked especially your EventContainer that I hope to reuse/modify for my needs. However I was obliged to make some modifications that you could find useful.

It seems you can't (at least I couldn't) unsubscribe directly a boost::function from the boost::signal. You need first to store the boost::signals::connection and use it to unsubscribe.

Here is the code - not in code format because I don't know how to
bold the useful modifications :)

Hope it will help you

---------- EventContainer.h -------------

typedef boost::signals::connection DelegateConnection;
typedef boost::function<void (EventArgs&)> EventHandler;
typedef boost::signal<void (EventArgs&)> Delegate;
typedef std::map<int, Delegate*> DelegateMap;

/** Container of events to which an instance can un/subscribe
* to receive firings.
*/
class EventContainer
{
public:
EventContainer();
virtual ~EventContainer();

DelegateConnection subscribe(int eventId, EventHandler handler);
void unsubscribe(int eventId, DelegateConnection connection);

protected:
void registerEvent(int eventId);
void fireEvent(int eventId, EventArgs& args);

private:
DelegateMap mDelegates;
};

--------------- EventContainer.cpp -------------

DelegateConnection EventContainer::subscribe(int eventId, EventHandler handler)
{
DelegateMap::iterator it = mDelegates.find(eventId);
return it->second->connect(handler);
}
//-----------------------------------------------------------------------------
void EventContainer::unsubscribe(int eventId, DelegateConnection connection)
{
DelegateMap::iterator it = mDelegates.find(eventId);
if (it != mDelegates.end())
{
it->second->disconnect(connection);
}

}
//-----------------------------------------------------------------------------
// TODO Should we throw an exception on duplicate event IDs?
void EventContainer::registerEvent(int eventId)
{
mDelegates[eventId] = new Delegate();
}
//-----------------------------------------------------------------------------
void EventContainer::fireEvent(int eventId, EventArgs& args)
{
DelegateMap::iterator it = mDelegates.find(eventId);
if (it != mDelegates.end())
(*(it->second))(args);
}

Of course the instances that subscribe will need to keep the connection to be able to unsubscribe.
0 x

Krieger
Gnoblar
Posts: 6
Joined: Wed Nov 28, 2007 4:38 pm

Post by Krieger » Mon Dec 03, 2007 11:39 am

I have the Material Successfully compiled under Windows, and it runs without any Error Message, but this thing is unstable as hell, so there is no way to work with it, if i add a material and try to edit it, it crashes, also there is no Compile option or Preview Material option at all, that i have expected :/

Sad ... could be such a nice and handy tool
0 x

User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 1
Contact:

Post by Wolfmanfx » Mon Dec 03, 2007 4:11 pm

Could u upload ur binaries cause iam to lazy atm :)
0 x

User avatar
BRAINLESS
Goblin
Posts: 282
Joined: Tue Jan 04, 2005 6:56 pm
Location: The Netherlands

Post by BRAINLESS » Mon Dec 03, 2007 4:19 pm

I've also got it compiled, the only thing I was able to do so far:

- open a .material file
- open a material editor (allows editing the script code) with color coding
- change a bunch of settings for materials (quite a lot really)
- probably save the material back to a file, although I'm not sure

I would argue it's not in a usable state as it is, but I must add, the design is pretty nice and definitely deserves more credit then a simple "it doesn't work". It's just not finished yet... I can only hope Hudson is ever going to continue it, but has hasn't been here for a while?

In the meantime I've copied the color coding editor for my own material editor (which will be announced when it's in a useful state). The reason I didn't continue this one is that I'm incorporating it into a different editor allowing much more then just material editing.
0 x
Proud member of the OpenFRAG Game Development community

User avatar
©LitoByte!
Gnoblar
Posts: 22
Joined: Thu Feb 01, 2007 7:13 pm
Contact:

Re: [Accepted] Ogre Material Editor

Post by ©LitoByte! » Sat Apr 18, 2009 4:07 am

discontinued ?
I see last post is from 2007

Has the project went up ?

I ask this because after 5 days coding the same thing! wxwidget Ogre material editor and I came up pretty much to your results, and well, I felt dumb!?

Here a screenshot, its name would be...Simple Ogre Material Editor,
it will parse/accept .cg,.hlsl,.glsl, .frag, .vert, .material files and try to be nicer than that ! (only few days of coding...sorry)
0 x
Litobyte Softworks di Tommaso Lintrami
Sviluppo software e sistemi interattivi.
Software and Interaction Systems Development
http://www.litobyte.com

User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!

Re: [Accepted] Ogre Material Editor

Post by Brocan » Sat Apr 18, 2009 8:52 pm

0 x

User avatar
©LitoByte!
Gnoblar
Posts: 22
Joined: Thu Feb 01, 2007 7:13 pm
Contact:

Re: [Accepted] Ogre Material Editor

Post by ©LitoByte! » Sun Apr 19, 2009 12:40 pm

thank you to point me in the right direction!
0 x
Litobyte Softworks di Tommaso Lintrami
Sviluppo software e sistemi interattivi.
Software and Interaction Systems Development
http://www.litobyte.com

makiolo
Kobold
Posts: 25
Joined: Tue Feb 19, 2008 1:55 pm

Re: [Accepted] Ogre Material Editor

Post by makiolo » Sun Dec 20, 2009 9:56 am

Need CMakeLists.txt for compile in linux! :P
0 x

Post Reply