diff --git a/makepanda/config.in b/makepanda/config.in index 1317517339..e262da5bf0 100644 --- a/makepanda/config.in +++ b/makepanda/config.in @@ -31,7 +31,7 @@ fullscreen #f # The framebuffer-hardware flag forces it to use an accelerated driver. # The framebuffer-software flag forces it to use a software renderer. -# If you don't set either, it will use whatever's available. +# If you set both to false, it will use whatever's available. framebuffer-hardware #t framebuffer-software #f diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 2f21e96cf7..1ff8a1df8b 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -863,13 +863,14 @@ if (COMPILER=="GCC"): fcollada_libs = ("FColladaD", "FColladaSD", "FColladaS") # WARNING! The order of the ffmpeg libraries matters! ffmpeg_libs = ("libavformat", "libavcodec", "libavutil") + assimp_libs = ("libassimp", "libassimpd") # Name pkg-config libs, include(dir)s if (not RUNTIME): SmartPkgEnable("EIGEN", "eigen3", (), ("Eigen/Dense",), target_pkg = 'ALWAYS') SmartPkgEnable("ARTOOLKIT", "", ("AR"), "AR/ar.h") SmartPkgEnable("FCOLLADA", "", ChooseLib(fcollada_libs, "FCOLLADA"), ("FCollada", "FCollada/FCollada.h")) - SmartPkgEnable("ASSIMP", "assimp", ("assimp"), "assimp/Importer.hpp") + SmartPkgEnable("ASSIMP", "assimp", ChooseLib(assimp_libs, "ASSIMP"), "assimp/Importer.hpp") SmartPkgEnable("FFMPEG", ffmpeg_libs, ffmpeg_libs, ("libavformat/avformat.h", "libavcodec/avcodec.h", "libavutil/avutil.h")) SmartPkgEnable("SWSCALE", "libswscale", "libswscale", ("libswscale/swscale.h"), target_pkg = "FFMPEG", thirdparty_dir = "ffmpeg") SmartPkgEnable("SWRESAMPLE","libswresample", "libswresample", ("libswresample/swresample.h"), target_pkg = "FFMPEG", thirdparty_dir = "ffmpeg") diff --git a/panda/src/collide/collisionNode.cxx b/panda/src/collide/collisionNode.cxx index ce037f917f..1196ba20c7 100644 --- a/panda/src/collide/collisionNode.cxx +++ b/panda/src/collide/collisionNode.cxx @@ -58,6 +58,7 @@ CollisionNode:: CollisionNode(const CollisionNode ©) : PandaNode(copy), _from_collide_mask(copy._from_collide_mask), + _collider_sort(copy._collider_sort), _solids(copy._solids) { } diff --git a/panda/src/gobj/geomVertexColumn.cxx b/panda/src/gobj/geomVertexColumn.cxx index d04b69a307..9e6c7bd188 100644 --- a/panda/src/gobj/geomVertexColumn.cxx +++ b/panda/src/gobj/geomVertexColumn.cxx @@ -258,7 +258,12 @@ make_packer() const { case 3: return new Packer_point_nativefloat_3; case 4: - return new Packer_point_nativefloat_4; + // Reader may assume 16-byte alignment. + if ((get_start() & 0xf) == 0) { + return new Packer_point_nativefloat_4; + } else { + return new Packer_point_float32_4; + } } } else { switch (get_num_components()) { @@ -309,7 +314,8 @@ make_packer() const { return new Packer_argb_packed; case NT_float32: - if (sizeof(float) == sizeof(PN_float32)) { + if (sizeof(float) == sizeof(PN_float32) && + (get_start() & 0xf) == 0) { // Use the native float type implementation for a tiny bit more // optimization. return new Packer_rgba_nativefloat_4; diff --git a/panda/src/pgraphnodes/sequenceNode.h b/panda/src/pgraphnodes/sequenceNode.h index db511dd4ae..96b7698131 100644 --- a/panda/src/pgraphnodes/sequenceNode.h +++ b/panda/src/pgraphnodes/sequenceNode.h @@ -35,6 +35,8 @@ PUBLISHED: virtual int get_num_frames() const; INLINE void set_frame_rate(double frame_rate); + MAKE_PROPERTY(frame_rate, get_frame_rate, set_frame_rate); + public: virtual PandaNode *make_copy() const; virtual bool safe_to_combine() const; diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index df038a6dad..0aa4e0bf64 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -1976,6 +1976,8 @@ get_keyboard_map() const { // XkbGetMap(_display, XkbAllMapComponentsMask, XkbUseCoreKbd); ButtonMap *map = new ButtonMap; + LightReMutexHolder holder(x11GraphicsPipe::_x_mutex); + for (int k = 9; k <= 135; ++k) { ButtonHandle raw_button = map_raw_button(k); if (raw_button == ButtonHandle::none()) { diff --git a/pandatool/src/assimp/loaderFileTypeAssimp.cxx b/pandatool/src/assimp/loaderFileTypeAssimp.cxx index 73c27ee7d4..bd2eb19d53 100644 --- a/pandatool/src/assimp/loaderFileTypeAssimp.cxx +++ b/pandatool/src/assimp/loaderFileTypeAssimp.cxx @@ -15,6 +15,8 @@ #include "config_assimp.h" #include "assimpLoader.h" +#include + using std::string; TypeHandle LoaderFileTypeAssimp::_type_handle; @@ -23,7 +25,7 @@ TypeHandle LoaderFileTypeAssimp::_type_handle; * */ LoaderFileTypeAssimp:: -LoaderFileTypeAssimp() : _loader(new AssimpLoader) { +LoaderFileTypeAssimp() : _loader(nullptr) { } /** @@ -31,9 +33,6 @@ LoaderFileTypeAssimp() : _loader(new AssimpLoader) { */ LoaderFileTypeAssimp:: ~LoaderFileTypeAssimp() { - if (_loader != nullptr) { - delete _loader; - } } /** @@ -58,9 +57,22 @@ get_extension() const { */ string LoaderFileTypeAssimp:: get_additional_extensions() const { - string exts; - _loader->get_extensions(exts); - return exts; + aiString aexts; + aiGetExtensionList(&aexts); + + // The format is like: *.mdc;*.mdl;*.mesh.xml;*.mot + std::string ext; + char *sub = strtok(aexts.data, ";"); + while (sub != nullptr) { + ext += sub + 2; + sub = strtok(nullptr, ";"); + + if (sub != nullptr) { + ext += ' '; + } + } + + return ext; } /** @@ -82,10 +94,13 @@ load_file(const Filename &path, const LoaderOptions &options, assimp_cat.info() << "Reading " << path << "\n"; - if (!_loader->read(path)) { + AssimpLoader loader; + loader.local_object(); + + if (!loader.read(path)) { return nullptr; } - _loader->build_graph(); - return DCAST(PandaNode, _loader->_root); + loader.build_graph(); + return DCAST(PandaNode, loader._root); }