Commit Graph

696 Commits

Author SHA1 Message Date
rdb 5b30fa7adf putil: Fix reading/writing BitArray from/to bam file on 64-bit
Fixes #1181
2021-08-03 20:13:56 +02:00
rdb 064e0383be event: Allow AsyncFuture to store arbitrary PyObject result 2021-03-01 19:16:22 +01:00
rdb ac021e94d6 putil: Ensure SimpleHashMap::_deleted_chain/_table are always initialized
Good to be on the safe side.
2020-12-20 00:59:55 +01:00
rdb f7ab42da56 putil: Fix memory leak in SimpleHashMap
Fixes #1077
2020-12-20 00:23:04 +01:00
Daniel 4f63ef635d panda: Remove PyEval_InitThreads calls when compiling against Python 3.9+
Cherry-pick from #1053
2020-12-12 00:16:58 +01:00
rdb 93900a203e putil: Backport part of 9d8c523dfa
Fixes #886
2020-11-17 23:36:06 +01:00
rdb 72b96f1afa putil: define pbitops in terms of fundamental types
This ensures there's always an overload matching a particular definition of size_t / uint64_t, etc.
2020-07-25 09:53:15 -04:00
rdb a9b158192f putil: fix crash in BitArray::has_any_of() 2020-06-14 12:55:52 +02:00
rdb e138096578 gobj: support writing Texture clear colors to .bam files (bam 6.45)
This fix requires setting "bam-version 6 45" in Config.prc.

Part of the fix for #844
2020-03-18 17:51:05 +01:00
rdb f1da4d4666 putil: set max supported bam version independently from default version
This will allow us to support reading and writing higher-versioned .bam file than we are writing by default.  This allows us to make changes bumping the bam version to the release branch, since we currently guarantee that bam files written by Panda3D 1.x.y can be read by Panda3D 1.x.0 (using the default settings).
2020-03-18 17:47:04 +01:00
rdb 1c357f32ca putil: fix asserts when model-cache-dir cannot be created
Fixes #790
2020-02-29 15:08:05 +01:00
rdb 3bfd994cf8 general: Fix a couple of misformatted docstrings. 2019-11-02 19:54:25 +01:00
rdb ec6638314c general: remove some oddly-placed audio_error macros 2019-10-06 11:51:15 +02:00
rdb 98227daaa5 putil: fix SparseArray::clear_range et al
Fixes #588
2019-04-14 17:11:42 +02:00
rdb 3ccfbfaba7 putil: fix hang reading bam due to macOS libc++ bug in istream::eof()
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.
2019-01-09 22:56:40 +01:00
rdb f3ba1d317c device: support for Steam Controller on Linux
Adds lgrip and rgrip button handles, which are present on Steam Controller but also on the Oculus Touch
2018-12-31 16:10:56 +01:00
rdb 30446952cb putil: remove no-longer-used WeakKeyHashMap for now 2018-12-28 21:26:46 +01:00
rdb bd6ef2b0ea Rename CollisionTube to CollisionCapsule (bam 6.44)
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
2018-12-23 22:28:06 +01:00
rdb 89236ac136 pgraph: fixed-depth billboards, bam additions (6.43)
This makes it possible to use BillboardEffect to specify a fixed distance to the camera, in order to keep them at a fixed apparent size.

This also enables serialization to .bam of the reference NodePaths of BillboardEffect and CompassEffect.
2018-12-06 23:52:58 +01:00
rdb 7ed8b01a84 Merge branch 'input-overhaul' 2018-11-30 22:04:13 +01:00
rdb 585ba2d647 Prepare input API for multipointer support 2018-11-30 20:54:37 +01:00
rdb 97d4e32a06 general: use nassert_raise instead of nassertv(false) et al
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.
2018-11-28 17:35:20 +01:00
rdb 37d2ff64de putil: add id and pressure fields to PointerData 2018-11-25 23:38:07 +01:00
rdb 70bfe21a63 Merge branch 'master' into input-overhaul 2018-11-06 22:10:39 +01:00
rdb 5ac3cf3fc6 Eliminate C++ DConfig; replace it with a Python compatibility shim 2018-11-02 23:27:07 +01:00
rdb 9b85a28861 putil: rename MouseData to PointerData to be more inclusive 2018-09-28 17:18:38 +02:00
rdb 8d8c5a546d input: rename "action_x" button handles to "face_x" 2018-09-16 14:50:00 +02:00
rdb e30b597926 Merge branch 'master' into input-overhaul 2018-09-16 12:28:22 +02:00
rdb 11ecd3af87 putil: make ButtonHandle::none() constexpr 2018-09-04 12:58:48 +02:00
Sam Edwards 4695557a5d general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
rdb aae2b1e5ad putil: fix a compiler warning 2018-08-26 21:18:11 +02:00
rdb 1d6c3f6486 Merge branch 'master' into input-overhaul 2018-08-26 19:03:21 +02:00
rdb 115f8df4d5 putil: work around GCC bug causing undefined reference in debug build 2018-08-26 14:03:44 +02:00
rdb f5a78d599d putil: make LinkedListNode moveable 2018-06-30 21:38:45 +02:00
rdb 234fd675b1 Merge branch 'master' into input-overhaul 2018-06-23 23:24:09 +02:00
rdb 886e1c2f16 general: fix many compilation warnings in GCC 8 2018-06-19 00:37:28 +02:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
Sam Edwards 7e61891c09 general: Fix more DLL linkage and EXPCL_PANDA_ macros 2018-06-12 16:14:33 -06:00
rdb ba2de46beb Merge branch 'master' into input-overhaul 2018-06-08 15:23:47 +02:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards 5e82671084 general: Do away with TYPENAME macro 2018-06-03 16:36:34 -06:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
Sam Edwards d422d74abb general: Clean up asserts which were abusing NULL 2018-06-03 16:26:44 -06:00
rdb e0245d2777 First step towards eliminating `using namespace std;` (#335) 2018-06-03 20:32:23 +02:00
rdb 298147bb39 Give several additional classes constexpr constructors
This is useful because these types are created at static init time, and giving them a constexpr constructor and trivial destructor lets them be created during constant initialization, which helps to prevent static init ordering issues.
2018-06-03 10:45:58 -04:00
rdb 283d43f988 putil: workaround macOS 10.6 compile error until #300 is fixed
[skip ci]
2018-05-30 23:29:59 +02:00
rdb aa1b06f132 putil: make BitMask et al literal types 2018-05-30 23:04:43 +02:00
Sam Edwards 32e1ca2252 general: Fix several miscategorized EXPCL_PANDA_* macros 2018-05-29 22:49:35 -06:00
rdb 323ddc7d67 putil: fix UpdateSeq::fresh().is_special() return value 2018-05-24 21:37:58 +02:00
rdb 5e0ce969fe Work around clang 3.1 compile error with static constexpr
There is a bug in clang versions before 3.2 (including the one shipped with Xcode) that makes it give a "conflicting types" compile error when there is a static constexpr function defined outside the class.  The way to work around this is either to remove one of the "static" or "constexpr" keywords, or to simply put the definition inline.

See: https://stackoverflow.com/a/17494592/2135754

I would try and upgrade Xcode to version 5 to see if the problem is fixed, but the buildbot still runs OS X Lion (10.7) and the last version of Xcode that works on Lion is 4.6.3, so it seems easier to just apply these workarounds for now.
2018-05-24 14:34:03 +02:00