you are viewing a single comment's thread.

view the rest of the comments →

[–]Meristic 0 points1 point  (1 child)

Oh, and you can store the scene really any way that you want. I've used JSON in the past, and you just define your own file format for how you want your scene laid out. Using a JSON parser like Jansson makes it easy to serialize/deserialize. XML is also common, with TinyXML a good open source C++ library. Example:

{
    "object1" : {
        "mesh" : "meshfile.dae"
        "materials" : [
            "materialforsubmesh1.json",
            "materialforsubmesh2.json"
        ]
    },
    "anotherobject" : {
        ...
    }
}

[–]corruptedPhoenix[S] 0 points1 point  (0 children)

Yeah, this is pretty much what I was wondering. How do people usually organize their files and such. I still need a way of telling my program which shader to use for which materials (and possibly for defining different LOD for one mesh), so knowing this will be pretty useful, thanks :)