21643 Commits

Author SHA1 Message Date
rdb
fa231664bd interrogate: don't mark base types as global 2018-02-27 18:47:51 +01:00
rdb
2450f31ef5 interrogate: remove deprecated and unneeded downcastTo*() functions
They have not been needed for a very long time, and they create an awkward reverse dependency of base classes on derived classes.
2018-02-27 15:06:12 +01:00
rdb
b62435a373 general: remove all uses of deprecated upcastTo*() methods
These methods have not been needed for a very long time, so we should not encourage their use.
2018-02-27 15:02:49 +01:00
rdb
5523af09ce makepanda: rebuild modules when interrogate_module is modified 2018-02-27 12:05:23 +01:00
Sam Edwards
01b0835797 pandabase: Remove reference to DIRECTORY_DLLS
Nothing defines this under any circumstances.

Also this moves the various component EXPCLs and EXPTPs
within the include guard of the entire header.
2018-02-26 00:25:03 -07:00
Sam Edwards
705fd445f3 dtool: Fix an inconsistent EXPCL/EXPTP 2018-02-26 00:03:09 -07:00
Sam Edwards
c3106411f5 dtool: Remove 'attach'
See #244 for discussion. It's really old, hasn't been used in almost
a decade, and doesn't support the current Git workflow either.
2018-02-25 18:27:10 -07:00
rdb
a5beccc99e chan: fix crash when AnimControl is destroyed in threaded pipeline
See #254 for related discussion.
2018-02-24 12:15:56 +01:00
Sam Edwards
b72d1c198f distributed: Fix the import test (and syntax on Python 3) 2018-02-23 19:52:48 -07:00
Sam Edwards
f76b8a6ad8 distributed: Replace the OTP protocol format with Astron's
Again, all this does is affect the 4-years-disused OTP system, leaving
the CMU system entirely untouched.

This changes the packet formatting in several of distributed's helper
classes.
2018-02-23 16:45:50 -07:00
Sam Edwards
167c6dcafa distributed: Change the message numbers to match Astron's
I imagine very few Panda3D users depend on the message numbers having
particular values. The ones removed belonged to Disney's OTP system,
which hasn't been used by anybody in over 4 years.

At any rate, old code should continue to work, just at the cost of
compatibility between clients and servers running different P3D versions.
2018-02-23 16:35:50 -07:00
Sam Edwards
97368ec321 distributed: Make a few slight cleanliness changes
I brought all of these over from the Astron fork
2018-02-23 15:55:30 -07:00
Sam Edwards
aaeb925e84 directtools: Fix typo in DirectSelection 2018-02-23 15:50:50 -07:00
rdb
aa90b7b0c0 showbase: disable track-gui-items by default, remove want-e3-hacks 2018-02-23 22:26:27 +01:00
rdb
e6c2d3b609 showbase: allow DirectGui elements to be created before ShowBase
This is done by precreating aspect2d inside ShowBaseGlobal.
2018-02-23 22:15:34 +01:00
rdb
0cf605ce7d showbase: move run() and __dev__ to ShowBaseGlobal
Also remove ShowBaseGlobal notify category, it doesn't really add anything
2018-02-23 21:26:49 +01:00
Sam Edwards
89be2c19af tests: Add tests for Datagram{,Iterator,InputFile,OutputFile}
This also includes a test for my previous commit which changes
DatagramInputFile::get_datagram().
2018-02-23 03:08:01 -07:00
Sam Edwards
e3cc3eff82 putil: Optimize DatagramInputFile::get_datagram
This new loop is better in two ways:
1) It reads straight into the Datagram's internal buffer,
   saving the trouble of allocating an intermediate buffer
   and wasting CPU time to copy out of it.
2) It's more cautious in the face of large (>4MB) lengths,
   which are more likely to be due to corruption than the
   datagram *actually* being that large.
2018-02-23 01:38:27 -07:00
Sam Edwards
10f1ffa9a7 express: Fix Datagram::modify_array()
This just copies the array initialization out of append_data, so a
COW/uninitialized Datagram can be initialized with modify_array()
2018-02-23 01:38:26 -07:00
Sam Edwards
04cb128140 cftalk: Remove this
It was an incomplete experiment for distributing rendering pipelines over
a LAN of computers all working in concert.

Who knows, it may return someday. Until then, it's best not to keep it
around.
2018-02-22 15:18:34 -07: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
Sam Edwards
293465a516 bam: Add sanity-check against object IDs appearing twice
Found this by fuzzing; not concerned about updating the writer as
the writer itself should never do this. This is just to protect
against segfaults in the face of corrupt or malicious bams.
2018-02-22 03:13:33 -07:00
Sam Edwards
47a9aa4a80 bam: Simplify the resolve_*_pointers loops in BamReader
This should also be a slight performance boost since breaking out
of the loop upon discovering an incomplete child object means we don't
bother resolving everything else just to discard it all.
2018-02-22 02:03:33 -07:00
rdb
e0569815b5 tests: add test for prc page and one for light color temperature 2018-02-21 15:56:45 +01:00
deflected
6c7894f68d terrain: set ShaderTerrainMesh heightfield wrap mode to clamp 2018-02-21 15:27:15 +01:00
deflected
9afdb78d94 bullet: make thread-safe by adding global lock mechanism
Also addresses some memory leaks.
2018-02-21 15:04:47 +01:00
Sam Edwards
7aedc21510 tests: Update audio test to recognize missing sounds as NullAudioSound 2018-02-20 00:55:49 -07:00
Sam Edwards
50b3b87ad5 openal: Explicitly signal a needed cleanup from require_sound_data 2018-02-20 00:55:49 -07:00
Sam Edwards
f970bc3229 openal: Don't return OpenALAudioSounds that fail to initialize
Also don't register them in _all_sounds, where they won't remove themselves
due to having already called cleanup() on themselves.

Additionally stops a sound in a cleaned-up state from being passed to the
app and played.
2018-02-20 00:55:49 -07:00
Sam Edwards
bc88566906 tests: Add xfail test for loading a missing audio file 2018-02-19 19:15:08 -07:00
Sam Edwards
68b1ecfd32 parser-inc: Add stub for FFTW3 header 2018-02-17 23:31:08 -07:00
Sam Edwards
ad7669e12a mathutil: Update FFTCompressor for FFTW3
This has been due for a while. The last FFTW 2.x release was in 1999.

Note that this does change some of the loops; this has two benefits:
1) The halfcomplex storage order is now explained with a comment.
2) It fixed the special case "don't break a run of bytes for a zero" which
   was never triggering due to the value not being *exactly* 0.0.

I have tested these changes against older FFT-compressed animation .bams
and no noticeable decompression changes are present, so a .bam version
bump is not necessary.
2018-02-17 22:32:38 -07:00
rdb
5c90f64182 text: fix is_whitespace() assertion when invalid chars are included 2018-02-17 20:50:18 +01:00
rdb
95eee0cab2 android: load prc files from assets. Move assets to /android_asset 2018-02-17 20:09:24 +01:00
rdb
8dea93bf38 android: fix touch/stylus taps triggering mouse1 for compatibility 2018-02-17 18:42:39 +01:00
rdb
6bd1976892 android: support writing png/jpg/webp via android.graphics.Bitmap 2018-02-17 18:40:08 +01:00
rdb
854d736882 pgraph: fix alignment error in 32-bit Windows with Eigen
Fixes #251
2018-02-17 18:30:58 +01:00
Sam Edwards
ab7dbebf3f general: Remove lingering references to Helix
Support for Helix has been dropped long ago; it's very unlikely to return.
See also de4280ea209d567eedfa08084da0dea761ad5917.
2018-02-14 17:26:35 -07:00
rdb
c41b694eb3 makepanda: detect public system libraries when building on Android 2018-02-11 00:56:25 +01:00
rdb
b4ad0a69a0 makepanda: automatic dependency scanning for Java sources 2018-02-11 00:55:04 +01:00
rdb
730279531a makepanda: build on Intel Android machines 2018-02-10 12:13:05 +01:00
rdb
bdb74b1e30 makepanda: add code to build an Android package with --installer 2018-02-10 12:01:34 +01:00
Sam Edwards
e15cea4331 general: Remove more unnecessary +x UNIX modes 2018-02-07 11:29:48 -07:00
rdb
c15c05f642 android: enable resume key events 2018-02-06 22:44:53 +01:00
rdb
d269f7c6c3 android: allow stdout/stderr capture using extra field on intent
This allows launching the Panda apk from termux and getting command-line output back to termux.
2018-02-06 22:42:40 +01:00
rdb
ae0f82911b android: allow launching pview by opening models (using Intents)
Also add code to show notification toasts.
Also enable model cache by default (pointing to app cache dir)
2018-02-06 22:36:21 +01:00
rdb
10789f6936 android: fix issue loading some image files 2018-02-06 22:33:57 +01:00
rdb
c1fccd311b android: properly support multiple Java threads 2018-02-06 22:32:22 +01:00
rdb
2dba9357bb makepanda: update Android cross-compile for clang and NDK r16
Tested on Windows.
2018-02-06 19:24:50 +01:00
Sam Edwards
8a7b47d501 audio: Fix memory leak in OpenAL 2018-02-04 23:06:34 -07:00