21903 Commits

Author SHA1 Message Date
Sam Edwards
bd2a9d709a dtoolbase: Introduce BUILDING_ defines for each component
This mirrors the prior commit.
2018-03-25 13:17:52 -06:00
Sam Edwards
98797d0090 pandabase: Introduce BUILDING_ defines for each component
This reverses the relationship between EXPCL_PANDA_COMPONENT
and BUILDING_PANDA, where BUILDING_PANDA is just shorthand for
BUILDING_PANDA_COMPONENT and BUILDING_PANDA_COMPONENT itself
sets the EXPCL_PANDA_COMPONENT defines.

Also removes EXPCL_PANDA.
2018-03-25 13:17:52 -06:00
Sam Edwards
9739923593 dconfig: Change export macros to EXP*_DTOOL_DCONFIG
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards
775fcb5b0b prc: Change export macros to EXP*_DTOOL_PRC
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards
ad5b45811d dtoolutil: Change export macros to EXP*_DTOOL_DTOOLUTIL
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards
9852ada792 dtoolbase: Change export macros to EXP*_DTOOL_DTOOLBASE
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards
29318992d9 metalibs/panda: EXPCL_PANDA -> EXPCL_LIBPANDA 2018-03-25 13:17:52 -06:00
rdb
69d24993b6 bullet: fix compilation error with Bullet 2.81 2018-03-22 15:30:31 +01:00
deflected
3a88308f45 bullet: Cleanup copying of shapes
- Fixed copy constructors
        - Dropped operator= from shapes

Signed-off-by: deflected <deflected@users.noreply.github.com>

Closes #283
2018-03-22 15:22:44 +01:00
deflected
733085e38e bullet: Write saved _up value for cylinder shapes
- Missed in previous commit.

Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-03-22 15:22:37 +01:00
deflected
5fec62b6fa bullet: Corrected possible false check
- When a bullet world is created it sets the filter
        algorithm callback that will use. Later changes to
        PRC config data should not lead to false assumptions
        that the bullet world is working with the new config.

Signed-off-by: deflected <deflected@users.noreply.github.com>

Closes #289
2018-03-22 15:17:27 +01:00
deflected
09a9a8ff22 multifile: Return vector_uchar from readSubfile
- Return vector_uchar from readSubfile instead of
        string. This will correct problems with Python 3 unicode
        strings and will return bytes instead.

Signed-off-by: deflected <deflected@users.noreply.github.com>

Closes #290
2018-03-22 15:12:30 +01:00
Sam Edwards
cfd70ebead general: Remove '#pragma interface'/'#pragma implementation'
The GCC documentation states that, as of GCC 2.7.2, these aren't
necessary for proper program behavior. The documentation further
discourages their use because they don't suppress unnecessary code
duplication.

The Panda codebase these days uses "extern template class" instead,
which tells the compiler not to perform implicit template expansion
because an explicit template expansion is available for linking
elsewhere in the program. This is a more compiler-neutral way of
achieving the same thing as '#pragma interface', making
'#pragma interface' not only redundant, it could also mask problems
in the "extern template class" machinery.
2018-03-20 14:36:19 -04:00
Sam Edwards
a4c1b44371 dtoolbase: Remove EXPORT_TEMPLATES define
As of f69354d9fa603ac05dfd924af3844f749fd50cdd, this is just always
expected on all platforms. If it's not defined,
TemplateClass<X>::_type_handle won't link correctly with some compilers
(e.g. Clang) and the lack of 'extern template class' will result in
duplicated code in any case. In short, turning it off causes problems.

makepanda also always turns this on, so it doesn't represent any
optional feature or autodetected platform-specific behavior anyway.
2018-03-20 14:36:19 -04:00
Sam Edwards
2031409a6e gobj: Fix missing include 2018-03-18 00:27:05 -06:00
rdb
adbab8deae x11display: reenable confined mode on window reconfigure
Fixes #280
2018-03-16 21:22:23 +01:00
Sam Edwards
477e6b7561 dxml: EXPCL_PANDA -> EXPCL_PANDA_DXML 2018-03-15 12:50:22 -06:00
Sam Edwards
32aceab7b4 grutil: Fix missing EXPCL_PANDA_GRUTIL 2018-03-15 12:48:44 -06:00
Sam Edwards
350f437fbe pandabase: Alphabetically sort pandasymbols.h
[skip ci]
2018-03-12 18:53:58 -06:00
Sam Edwards
de2e35ee9a pandabase: Remove unused defines from pandasymbols 2018-03-12 18:33:16 -06:00
rdb
94ceace5af android: add activity for running Python programs
It can be launched from the termux shell using the provided run_python.sh script, which can communicate with the Panda activity using a socket (which is the only way we can reliably get command-line output back to the program.)

The Python script needs to be readable by the Panda activity (which implies it needs to be in /sdcard).

The standard library is packed into the .apk, and loaded using zipimport.  Extension modules are included using a special naming convention and import hook in order to comply with Android's strict demands on how libraries must be named to be included in an .apk.

[skip ci]
2018-03-11 22:53:08 +01:00
rdb
8e8283cbe1 android: enable writing stdout/stderr to a socket
This can be done by setting the extra string org.panda3d.OUTPUT_URI to tcp://host:port
Writing to a log file can still be done using file:///path/to/log.txt

[skip ci]
2018-03-11 22:36:17 +01:00
rdb
319b331553 ShaderGenerator: fix M_modulate_gloss regression
It was mapping the alpha channel of M_modulate_gloss to the glow channel.
2018-03-11 16:40:21 +01:00
rdb
e0f8d7885a video4linux: don't block on reading camera frames
Add v4l-blocking variable to enable the old behaviour.
2018-03-11 16:39:00 +01:00
rdb
2563b65249 video4linux: support greyscale pixel format (eg. IR cameras) 2018-03-11 16:33:01 +01:00
Sam Edwards
5f14d9c48f char: Move JointVertexTransform::_matrix to CharacterJoint
The rationale is that CharacterJoint should contain all of the joint
state information, and JointVertexTransform should be pretty much devoid
of state so that we don't have to worry about synchronizing it.
JointVertexTransform::_matrix was just a cached/precomputed matrix
that transforms from original vertex positions to animated vertex
positions, so moving it to CharacterJoint doesn't change any engine
functionality.

This also removes the useless lock on recomputing that matrix. It was
useless because it was computing from shared state in CharacterJoint
that wasn't properly synchronized, but this would have to be fixed by
making CharacterJoint pipeline-cycled - a lock won't do.
2018-03-10 20:26:02 -07:00
Sam Edwards
280b13a289 char: Remove references to dead "ComputedVertices" class
This hasn't been a thing for nearly 13 years.
2018-03-10 20:15:39 -07:00
rdb
766b38fb7a dtoolbase: make TypeHandle a constexpr class 2018-03-08 12:58:16 +01:00
rdb
5d2110c644 bullet: add force_update_all_aabbs property to BulletWorld 2018-03-08 12:19:22 +01:00
Michael Wass
b10ee32752 direct: Fix some more NameErrors
Closes #274
2018-03-08 11:44:04 +01:00
rdb
bfff7e1000 tests: don't assert if pipe cannot create physical windows 2018-03-08 11:41:00 +01:00
rdb
15f6ed1ba2 androiddisplay: remove error messages leftover from debugging 2018-03-08 11:39:03 +01:00
rdb
b0b32b9d6a direct: fix Python 3 support in Pmw-based tools
Fixes #276
2018-03-08 11:21:14 +01:00
rdb
9a31478744 task: remove accidentally committed debug message 2018-03-08 11:19:43 +01:00
Sam Edwards
d8b48a3837 openal: ptr != 0 -> ptr != NULL 2018-03-06 19:02:05 -07:00
Sam Edwards
99dc462174 openal: assert -> nassert 2018-03-06 19:02:05 -07:00
Sam Edwards
c89bb3d030 openal: "reattempt" -> "retry" 2018-03-06 19:02:05 -07:00
Sam Edwards
cb85d01de6 openal: Always use INLINE in .I files 2018-03-06 19:02:05 -07:00
Sam Edwards
a10cd7d8bb openal: Always use release_sound_data
This simplifies cleanup() a little bit.
2018-03-06 19:02:05 -07:00
Sam Edwards
9a5d7d8254 openal: Add several asserts
This also includes a few slight style fixes.
2018-03-06 19:02:05 -07:00
Sam Edwards
1a6fb5300b openal: Be explicit about what constructs like _sound != 0 mean 2018-03-06 19:02:05 -07:00
Sam Edwards
fd5ce687b3 openal: Add cleanup guards to buffer functions
Without this, the audio might encounter an error, call cleanup()
on itself, and (if in the middle of update()) try to dereference
its recently cleaned-up _sd pointer.

Fixes #230
2018-03-06 19:02:05 -07:00
Sam Edwards
6ca0a68042 openal: Retry deleting a buffer until success
The rationale for this change is Apple's OpenAL implementation,
which needs a little time after the
`alSourcei(source, AL_BUFFER, 0);`
call before any buffers used by that source are free for deletion.

The defaults in the config variables are such that the OpenAL manager
will attempt to delete a buffer up to 6 times (that is, the original
attempt plus 5 reattempts), with delays of 1ms, 2ms, 4ms, 8ms, and 16ms
before each reattempt - which means it'll wait a grand total of 31ms for
a buffer to be free before assuming that some even greater problem must
be happening and giving up.
2018-03-06 19:02:05 -07:00
Sam Edwards
1862100bac openal: Don't assume alSourceUnqueueBuffers is FIFO 2018-03-06 19:02:05 -07:00
Michael Wass
89799bc024 direct: Fix some NameErrors
Squashed merge of GitHub PR #273
2018-03-05 18:32:27 -07:00
Sam Edwards
1b1c76b2e8 pgraph: Fix "Unknown render mode 5" errors
This happened when a M_dual transparent object is given the
M_filled_wireframe render attrib. M_dual would copy the transparent
parts of the object to the transparent back-to-front bin, before
the M_filled_wireframe handler could deal with the M_filled_wireframe
flag.

The solution is just to switch the order - let M_filled_wireframe be
dealt with before the transparency code gets a chance to make a copy.
2018-03-05 06:10:25 -07:00
Sam Edwards
fd6eebb7fe bam: Fix circular reference with ClipPlaneAttrib
What's being addressed here is the circumstance where an ancestor of
a PlaneNode has a ClipPlaneAttrib that references said PlaneNode.

The code here is just being copied out of LightAttrib, which has the
exact same mode of operation (it nominates a sorted list of on/off
NodePaths) and a compatible structure. LightAttrib has had this problem
in the past, so using the same solution makes sense.
2018-03-05 05:26:54 -07:00
Sam Edwards
74bb2fef2e bam: Fix typo in ClipPlaneAttrib::fillin 2018-03-05 05:26:50 -07:00
Sam Edwards
d088341da1 bam: Log object IDs when spamming read 2018-03-05 05:26:45 -07:00
Sam Edwards
ebe9e75d84 dtoolbase: Delete unused preprocessor macro
[skip ci]
2018-03-04 20:28:51 -07:00