Commit Graph

166 Commits

Author SHA1 Message Date
rdb 08572f3c38 general: Fix a variety of ABI incompatibility issues with opt4 builds 2019-10-08 19:44:29 +02:00
rdb 9035b4a610 pgraph: don't bother calling xform() on empty BoundingVolume 2018-12-19 20:56:42 +01:00
rdb ebef9f3de8 pgraph: add assertions to prevent invalid TransformState
If this commit is causing crashes in your code, it is probably exposing a bug in some other system that is assigning bad TransformState objects.
2018-12-19 20:45:57 +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
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 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
rdb 3077316782 general: use proper deleted funcs instead of stubs with asserts
This gives better compile-time diagnostics and saves on code, while also better communicating intent.
2018-05-23 23:35:27 +02:00
Sam Edwards f8e321d155 bam: Start more strongly checking pointer types in complete_pointers
This just starts with PandaNode, and uses DCAST_INTO_R instead of DCAST
to catch bad bams. BamWriter should never produce bam output that will
trigger this; I found this with a fuzzer.

I'm unsure about the tradeoff between bam loading performance and
robustness in the face of bad bams. It certainly makes a lot of sense
in debug builds, but we might want to consider a compile flag that
forces bam-related asserts always on even in release builds.
2018-02-22 04:57:29 -07:00
rdb 69b3468b2c interrogate: more improvements to seq/map wrappers
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.

Fixes: #203
2017-11-27 17:29:50 +01:00
rdb 1b1d80cd27 More thoroughly fix issues with pickling Panda objects in Python 3
This also adds DatagramBuffer, a class for writing datagrams to memory and reading them from there again.
2017-11-08 00:02:35 +01:00
rdb 47388b0dbc Separate out CPython calls from core libs; eliminate need for pystub 2016-07-20 14:30:41 +02:00
rdb 8381118a97 Assorted tweaks and compile warning fixes 2016-07-14 12:54:39 +02:00
rdb 18874fa151 Replace PN_int/uint types with stdint.h types, since all compilers we support have them.
Plus, we already had code that relied on them being available anyway.
2016-05-11 00:27:58 +02:00
rdb 2971915618 Bam 6.41: lenses and light changes, add max_distance 2016-03-02 17:54:49 +01:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb ea368dd559 Bam reader robustness; allow threaded bam reading from Python 2016-01-26 11:35:04 +01:00
rdb 0a64bdb33b Fix MouseRecorder & let PandaNode inherit from TypedWritableReferenceCount 2015-01-24 16:12:04 +01:00
rdb 0b2a3f0c95 Fix assertion trigger in PandaNode 2015-01-12 21:52:09 +01:00
rdb 763727fbb1 attempted crash fix 2015-01-12 21:34:47 +01:00
rdb c04cd29246 Cull improvements: don't compute bounds when not necessary 2015-01-08 23:16:38 +01:00
rdb f805098a03 Let's not name members "_object" since it confuses interrogate when parsing initialiser lists. 2014-07-17 13:12:35 +00:00
rdb 566feda34d Commit patch by cfsworks to move pgraph stuff to extensions 2014-04-04 09:23:58 +00:00
rdb 192d10b937 Experimental Python 3 support to the C++ code including interrogate. Also adds support for rich comparison in interrogate. 2013-02-16 19:22:26 +00:00
rdb 8c83ab08f4 Add get_tag_keys / get_python_tag_keys (based on patch by Josh Enes) 2012-12-02 12:21:17 +00:00
David Rose c67fb27206 support subclassing CollisionNode properly 2012-01-31 23:45:55 +00:00
David Rose b8497a0478 fix deadlock with reset_prev_transform() 2011-11-17 19:20:38 +00:00
David Rose 83b87652f8 fix prepare_scene() to prepare vertex buffers as well as textures 2011-11-05 17:58:28 +00:00
David Rose be85a6ada1 fix crash with threaded setPythonTag() 2011-10-26 20:01:16 +00:00
David Rose 501470169f stdfloat_double 2011-10-10 05:25:10 +00:00
David Rose 37bdfa9815 typo 2011-09-06 03:15:49 +00:00
David Rose 87ebb4f32c fix GeomVertexRewriter::set_row() problem with empty data; add GeomVertexReader/Writer::set_row_unsafe(); fix some compiler warnings 2011-06-17 18:57:04 +00:00
David Rose f6f9e269f4 introduce stdpy.pickle module with support for common-node NodePaths within a pickle stream 2010-02-10 19:43:58 +00:00
David Rose 816ddc0387 low-level support for python copy and pickle modules 2009-12-10 01:09:06 +00:00
Zachary Pavlov a2b0168dd5 documenting subtle steal_children issue 2009-08-12 19:14:20 +00:00
David Rose aefe3d35c2 merge dev_bam_2009 to trunk 2009-06-10 17:54:40 +00:00
David Rose 0c90c36fd7 new callback system 2009-03-14 19:31:37 +00:00
David Rose ddbad77851 set_bounds_type() 2009-03-12 21:50:03 +00:00
David Rose 384a2570a8 fix bounds when flattening actors 2009-02-12 20:46:10 +00:00
David Rose e53843ec11 traverse stashed also in prepare_scene 2009-01-22 02:45:36 +00:00
Zachary Pavlov af435acd5c allow cull callback disabling 2008-12-12 01:15:01 +00:00
David Rose 26754b86ca merge dev_slots_2008: slot-based RenderState implementation 2008-11-19 01:21:44 +00:00
David Rose 68c236069f fix hide/show bug 2008-11-14 23:34:32 +00:00
David Rose 05f577df6e further fixes to hide/show optimization 2008-11-13 17:11:44 +00:00
David Rose 22ecb41b4c hide/show optimization 2008-11-13 15:55:07 +00:00
David Rose 075710bced create pgraphnodes directory; move some things there from pgraph 2008-11-06 00:06:39 +00:00
David Rose 53495298b2 minor typo 2008-10-10 05:22:48 +00:00
David Rose d4c2c9858d SIMPLE_THREADS_NO_MUTEX -> LightMutex 2008-10-08 23:23:40 +00:00
David Rose 621b831913 allow-live-flatten 2008-10-02 23:39:51 +00:00
David Rose fab502970f more threading improvements 2008-10-02 17:50:16 +00:00
David Rose 8c2e657f15 Add gsg::update_texture() 2008-08-25 22:58:58 +00:00