This prevents a common error of trying to load non-Panda3D assets without specifying $MAIN_DIR. We aren't currently making any guarantees about the cwd (which may in fact be / when launching from Finder), so I think this is safe.
Apparently eof() in older versions of libc++ returns true if the last character has just been read, whereas the proper behavior is only to return true when attempting to read past the end of the stream. Since failbit is reliably set in all cases when reading past the length of the stream, we should only trust the result of eof() if fail() also returns true.
Adds ability to register "obsolete" names for certain types under older .bam versions, so that we are still able to write out old .bam files.
Fixes#347
Even a brief error message in the assertion is infinitely more useful to a user who is not at home in the source code, especially for assertions that may reasonably be triggered by honest user mistakes.
This changes includes so that local includes are consistently
#include "localFile.h"
while system and third-party includes are consistently
#include <systemFile.h>
This commit mostly converts the former to the latter; the two
exceptions are in android_main.cxx and fmodAudioSound.h, where
the reverse was necessary.
This changes the Assimp include path to point to the
directory containing assimp/ instead of inside assimp/
directly. This is for consistency with how the Assimp
project defines their "include path" and keeps the actual
inclusions themselves unambiguous (since Assimp's headers
have fairly generic filenames).
This is inefficient because it induces an unnecessary ref()/unref() pair when we just need to move the pointer out of the function. Thanks to 23128e4695, we can now move between related pointer types, making the .p() hack unnecessary.