Skip to content

BlobType Registry

AnastaZIuk edited this page Oct 26, 2020 · 1 revision

BlobHeaderVN (where N is version number) always has a member BlobType which is an enum E_BLOB_TYPE.

We made the format extensible so you can add more blob IDs than E_BLOB_TYPE.

First off, whatever the current version of the Engine, EBT_COUNT is the number of currently defined used and supported blob types.

Secondly, we've reserved the first 64k type IDs with EBT_LAST_RESERVED_BLOB_TYPE_ID=0xffffu.

When you write your extensions to the BAWFile system, like asset loaders/savers, archive loaders, etc. you need to pick unique blob IDs for your custom blobs which are past the 16k mark .

Now lets say you want to make your extension to the engine public and integrate with the data streaming system, we want to make sure these blob IDs do not collide with other public extensions so that people can use your extension and other author's extension.

This is why in a spirit similar to Khronos and the OpenGL Extension Registy, you just need drop us a pull request with just modifications to E_BLOB_TYPE enum and with your requested IDs you want to request and their EBT_EXT_*=ID enum names (enum names for extensions must begin with EBT_EXT_ ).

Example

    // Bob's Lightmapping System Extension 
    EBT_EXT_SPHERICAL_HARMONIC_PROBE_GRID=0x15555u,
    // End of Bob's Lightmapping System Extension

Ideally we want to keep the whole registry contiguous and ascending in order.

We will rubber-stamp any request of under 16 blob types for any extension project.

We have over 4 million Blob type IDs to register, so no fear of running out of IDs.

P.S. For private custom blobs, just use IDs past 0xffffffu and you shouldn't collide with public extensions.