Appendix B. The SBM File Format
The SBM model file format is a simple geometry data file format devised specifically for this book. The format is chunk-based and extensible, with several chunk types defined for use in the book’s examples. This appendix documents the file format. SBM files begin with a file header, followed by a number of chunks, each started with a header, followed by raw data that may be referenced by chunks. Multi-byte fields in structures are defined to follow little-endian byte ordering. All structures are tightly packed.
File Header
All SBM files start with a header of the following form:
typedef struct SB6M_HEADER_t{ union { unsigned int magic; char magic_name[4]; ...
Get OpenGL SuperBible: Comprehensive Tutorial and Reference, Seventh Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.