Couldn't get the code from the book to compile with gcc without some changes (and once I did it wouldn't render). For instance:
// gcc chokes on these pragmas
#pragma pack(push, packing)
// some structs that I want aligned on 1 byte boundaries
// so I can properly read in from a .3ds binary file
#pragma pack(pop, packing)
// but works with
#pragma pack(push, 1)
There were also issues with scoping. Here's some code from the book:
for (int i = 0; i < someVarible; i++)
// Error: i is no longer in scope
for (i = 0; i < someOtherVarible; i++)
The book also used C style file functions, so I decided to write mine with a C++ ifstream. Hadn't really used streams to read from files, and since .3ds is a binary file I thought it'd be educational. If nothing else i've found a use for reinterpret_cast
Only other complaint is that the book glosses over a bit of info, one section describes a chunk and neglects to mention a 2 byte piece of info in the chunk - which resulted in a little bug in my code. After digging around I found a few really dated 3ds specs at wotsit, which helped me track down the problem.
Oh well, i've got my code far enough along that I can display a model in wireframe. Should be able to do materials and texturing pretty soon. It's been awhile since I've posted a screen shot of anything, so maybe i'll do so when I get it done.