MeshSerializer doesn't have a method to save a serialized mesh to a stream. There has to be a way to save a mesh to a stream without having to save it to disk and then read it. How do people do that?
And would you guys accept a patch that adds an overload? (Last time I asked this about a patch I got no answer, do ogre developers read this forum?)
Serialize mesh to stream
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Serialize mesh to stream
Patches go into the patch tracker; while it's certainly a good idea to bring it up here, the forums are not the place to post patches.
And yes, the Ogre team does read this forums and others.
And yes, the Ogre team does read this forums and others.
-
- Halfling
- Posts: 40
- Joined: Tue Jan 25, 2011 9:12 pm
Re: Serialize mesh to stream
Yeah, I understand where to submit patches. The thing is, if it's not gonna be included I'm not gonna waste time writing a patch, in that case I prefer just hacking a solution up in my application space because I don't wanna be applying patches every time I build a new version of Ogre.
So I still need to ask in the forum, right? The website says in case of bug to submit a patch first (which is risky cause if it's not gonna be accepted it's a waste of time) *or* discuss it in the forums which is what I'm doing. Then again this is not a bug but a feature request so more of a reason to ask here. Or should I create a issue in mantis to ask about this? I also asked in irc and they told me that there are no developers usually there.
So I still need to ask in the forum, right? The website says in case of bug to submit a patch first (which is risky cause if it's not gonna be accepted it's a waste of time) *or* discuss it in the forums which is what I'm doing. Then again this is not a bug but a feature request so more of a reason to ask here. Or should I create a issue in mantis to ask about this? I also asked in irc and they told me that there are no developers usually there.
- Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
Re: Serialize mesh to stream
I think it's a good idea to discuss things like this in the forum first. I don't really know what question xavier was replying to, probably just saw something about patches and assumed...
A stream overload sounds good though but i'd wait for some other replies on this first i guess. By stream do you mean a std stream or Ogre's?
A stream overload sounds good though but i'd wait for some other replies on this first i guess. By stream do you mean a std stream or Ogre's?
- madmarx
- OGRE Expert User
- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 50
Re: Serialize mesh to stream
I consider that if I were to write some mesh-merging optimisator, or modeler, I would appreciate to be able to write to a stream.
Personnaly, I would prefer std::stream, but this only is very personnal at this point.
I think that if you write it as a good patch (meaning tested, without crazy design), I don't see why it would be refused.
Personnaly, I would prefer std::stream, but this only is very personnal at this point.
I think that if you write it as a good patch (meaning tested, without crazy design), I don't see why it would be refused.
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
-
- Halfling
- Posts: 40
- Joined: Tue Jan 25, 2011 9:12 pm
Re: Serialize mesh to stream
Well I would prefer a std stream, unfortunately Ogre uses its own stream everywhere so I don't think that's desired by the designers, so I was willing to compromise.Chris Jones wrote:I think it's a good idea to discuss things like this in the forum first. I don't really know what question xavier was replying to, probably just saw something about patches and assumed...
A stream overload sounds good though but i'd wait for some other replies on this first i guess. By stream do you mean a std stream or Ogre's?
I don't like how Ogre wants to use its resource manager/datastream type for everything and forces you to center your application around them (even though the authors insist that Ogre is only a graphic engine), it's awful for applications with dynamic content. I used other engine before ogre that had a std::stream overload for everything, it was a pleasure to integrate.
-
- Halfling
- Posts: 40
- Joined: Tue Jan 25, 2011 9:12 pm
Re: Serialize mesh to stream
I did some reading of the code. Turns out the whole serialization infrastructure of ogre" OgreSerializer.cpp" depends on dozens of functions that use fput and fpuc to write contents to a file descriptor . I didn't expect ogre to be so C-ish in its guts. Anyway, I don't mind doing the overhaul but this would be too big a patch to do without confirmation that it would be included and I don't see any developers around to confirm (it's not only this thread, see:
http://www.ogre3d.org/forums/viewtopic.php?f=3&t=64180
and http://www.ogre3d.org/forums/viewtopic.php?f=1&t=64023 Although in the second one I realized I could achieve my purpose through extension so nvm that one, but still I got no answer to a patch offer in both cases. I guess maybe Ogre is like the linux kernel in that they get too many patches?
So I guess I'll have to save to a file in a temporary folder, create a std::stream from it and then delete it That's sad.
http://www.ogre3d.org/forums/viewtopic.php?f=3&t=64180
and http://www.ogre3d.org/forums/viewtopic.php?f=1&t=64023 Although in the second one I realized I could achieve my purpose through extension so nvm that one, but still I got no answer to a patch offer in both cases. I guess maybe Ogre is like the linux kernel in that they get too many patches?
So I guess I'll have to save to a file in a temporary folder, create a std::stream from it and then delete it That's sad.