kyle-emmerich / blueshift-engine

High performance C++ game engine in early development
https://noxastra.com/engine
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Loading BBM format #9

Closed kyle-emmerich closed 8 years ago

kyle-emmerich commented 8 years ago

The Blueshift Binary Model format is a simple 3D model format that is designed for minimal runtime processing in order to maximize performance. As such, it may be sent to the GPU almost straight from storage.

The format will begin with a "magic" combination of four bytes:

'B', 'B', 'M', 0x0

The last byte denotes the revision number; the format is not expected to be compatible across revisions as it is compiled from other formats.

After the magic header, the info header will follow. It will be a simple structure, defined as follows:

struct BBMHeader {
    uint64_t SizeInBytes;
    uint16_t NumGroups;
    uint8_t Flags;
};

One may infer that there are more information structures following this one. However, for the sake of brevity, please see the code to see their definitions.

kyle-emmerich commented 8 years ago

Changing to a more general approach. Stay tuned.