MeshSerializer

Problems building or running the engine, queries about how to use features etc.
Spanky
Halfling
Posts: 80
Joined: Mon Oct 07, 2002 2:45 am
Location: Ontario Canada

MeshSerializer

Post by Spanky »

Hey,

I am currently checking out the MeshSerializer because I am working on my own serializer for a custom level format. Anyways. I was checking out the writeMesh method and noticed that when calculating the size of the M_MESH header chunk, it starts with adding an unsigned long (in calcMeshSize) but then back in writeMesh, it writes a bool instead.

The bool is used for the skeleton but in calcMeshSize, it says that the unsigned long is for the number of shared vertices.

Am I dumb and am missing something here (which I could definatly use an explanation of to help me out) or should it be sizeof(bool) instead?

Thanks
Shawn
Spanky
Halfling
Posts: 80
Joined: Mon Oct 07, 2002 2:45 am
Location: Ontario Canada

Post by Spanky »

Actually, now that I'm looking at it. I think there are a few other things that are missing.

The writeBoundsInfo is never taken into account either although it is still written.

I wanted to clarify something as well. All headers take into account the size of their children right? Like the root header should have the size of the header + the size of all it's children right?

Thanks
Shawn
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

Yes, you are correct. There may be some undetected bugs in the chunk sizes since they're not used very much. If you find issues, please submit a patch.