O'Reilly logo

OpenGL® SuperBible: Comprehensive Tutorial and Reference, Sixth Edition by Richard S Wright, Graham Sellers, Nicholas Haemel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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]; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required