Commit Graph

12047 Commits

Author SHA1 Message Date
rdb dee48cc201 CMake: Fix error linking OpenAL as framework 2023-05-08 20:01:22 +02:00
LD 53f32e440e cocoadisplay: Fix compilation errors due to missing includes 2023-03-24 17:24:05 +01:00
rdb 52dc6dbd28 cocoadisplay: Remove accidentally checked-in file
[skip ci]
2023-03-23 08:57:02 +01:00
rdb a5fe1fa4bd tinydisplay: Add Cocoa-based backend
Adds support for tinydisplay rendering on macOS

Fixes #1285
2023-03-22 13:15:06 +01:00
rdb 545ede9d94 cocoa: Split out GL-specific code into new cocoagldisplay module
This makes it possible to create subclasses for tinydisplay and vulkandisplay without having to duplicate code
2023-03-21 23:16:36 +01:00
rdb 05436a749f Merge branch 'release/1.10.x' 2023-03-09 11:23:19 +01:00
rdb c5d6bae1c3 glgsg: Work around Panfrost driver bug with wireframe mode 2023-03-09 10:58:10 +01:00
rdb 316b8e96eb pgraphnodes: Fix compile warning on 32-bit in SceneGraphAnalyzer 2023-02-24 23:11:55 +01:00
rdb eee10c9feb pnmimagetypes: Recognize .bw as extension for SGI images 2023-02-24 22:41:59 +01:00
rdb 32c73763e2 Merge branch 'release/1.10.x' into incoming 2023-02-24 22:40:53 +01:00
rdb b3730bf707 downloader: Use built-in MD5 implemention for HTTPDigestAuthorization
This code is only compiled when OpenSSL is enabled at the moment, but this will change when webgl-port is merged
2023-02-24 22:35:21 +01:00
rdb a5be6fa5ff pnmimagetypes: Fix compile error with some versions of png.h
Some define these as macros, which interferes with these definitions
2023-02-24 22:21:27 +01:00
rdb 126cd374e9 pipeline: Fix compile warning with pipelining disabled 2023-02-24 09:48:12 +01:00
rdb eefb51f510 dtoolutil: Add small_vector implementation and use it
This vector implementation does is optimized for the case of having only a small number of elements, which are stored directly on the vector object rather than being allocated from the heap.  If the capacity exceeds this small number, then a heap allocation is done.

This should improve performance in a couple of cases where vectors typically store 1 element and rarely more than that.
2023-02-22 16:48:11 +01:00
rdb 35348fd74a express: Do not rely on OpenSSL for MD5 hash support
These hashes are used in various places in the Panda codebase (for integrity checks, not for crypto), so using an internal implementation allows retaining this functionality when building Panda without OpenSSL.

Based on the following public domain implementation:
https://github.com/B-Con/crypto-algorithms
2023-02-22 16:47:14 +01:00
rdb 17242e9a0a gobj: Fix compiler warnings in TexturePool 2023-02-20 20:54:16 +01:00
rdb 9c4d08f589 gsgbase: Switch gsg list to use patomic instead of AtomicAdjust 2023-02-20 19:46:20 +01:00
rdb 818ed819f9 pgraph: Fix compiler warning for uninitialized variable 2023-02-20 19:05:05 +01:00
rdb 92bdaed4d4 linmath: Fix regression with LVecBase4 in #1453 / 87b5aa9
LVecBase4 was no longer trivially copyable as of that change
2023-02-20 19:02:54 +01:00
Brian Lach 52d59b2df7 add sRGB support to egg-palettize, sluminance to egg 2023-02-14 11:34:24 +01:00
git2323 518d4777fa
do not prefer framebuffer configs with excessive multisamples (#1456)
Co-authored-by: user1 <user1@user1.org>
2023-02-12 23:04:46 +00:00
rdb d2444132b2 opencv: Use correct headers for videoio C interface 2023-02-12 18:18:20 +01:00
rdb 5e26aae1ff cleanup: Fix assorted issues uncovered by clang-tidy 2023-02-12 18:17:03 +01:00
John C. Allwein 81f7a21845 openal: fix potential iterator invalidation in OpenALAudioManager::update
OpenALAudioManager::update iterates through all currently playing sounds
via a std::set / phash_set object, _sounds_playing.

If a stream queue corruption was detected during OpenALAudioSound::pull_used_buffers,
the logic added in a895890 would call cleanup() on
the sound if we could not successfully locate the target buffer and log an error.

However, the act of calling OpenALAudioSound::cleanup would lead to calling
stop() (since the sound was actively playing). In OpenALAudioSound::stop(),
we would then proceed to call _manager->stopping_sound which would erase
the current sound from _sounds_playing (while we still held an iterator
to it). Per STL standard and real-world observation, std::set::erase
will invalidate the current iterator held in update (https://en.cppreference.com/w/cpp/container/set/erase).
This leads to a segmentation fault when we attempt the next iteration on the loop.

To resolve this, let's ensure we don't hold onto invalid iterators during the updating of playing sounds.

Fixes #1452
2023-02-12 14:13:02 +01:00
rdb 1c37522026 Merge branch 'release/1.10.x' into master 2023-02-12 14:07:49 +01:00
rdb aaabb6a652 Fix assorted issues uncovered by clang-tidy 2023-02-12 13:55:59 +01:00
rdb 914993f31b putil: Fix SimpleHashMap error reporting at static init time 2023-02-12 13:49:44 +01:00
rdb 173dd67b52 glgsg: Fix p3d_LightModel.ambient not updating properly 2023-02-12 13:07:14 +01:00
Disyer af4a1bc7a9 python: Use public PyErr_Occurred API instead of private macro
The _PyErr_OCCURRED macro was removed in Python 3.10, so we shouldn't keep any compat code left around for it
2023-02-12 02:36:57 +02:00
rdb 3d7c2505e9 pnmimagetypes: Fix memory leaks writing TIFF files 2023-02-11 15:21:16 +01:00
David Staer fc2ef74148 Extend BulletBodyNode::add_shapes_from_collision_solids() to accept a TransformState
Code is much the same as original, so adapt original function to use the expanded one. This is useful for example when the collision node is rotated, is not centered to origin, or has several parent transforms applied on it.
2023-02-07 18:05:51 +01:00
git2323 e28697f670 audiotraits: Add directional sound support to OpenAL (#1451) 2023-02-07 13:14:59 +01:00
Timothy Paustian 4fa90bd754 gobj: Fix TexturePool sharing texture objects when loaded with different properties
Fixes #1047
Closes #1105

Co-authored-by: rdb <git@rdb.name>
2023-02-07 12:23:30 +01:00
WMOkiishi 3f3c65917b Ensure classes using aligned types inherit from `MemoryBase` 2023-02-06 18:35:18 +01:00
WMOkiishi 87b5aa9d1f Replace "unaligned" linear algebra classes with simple typedefs 2023-02-06 18:35:18 +01:00
rdb eacbc4f89a pgraph: Fix regression: assertion in `get_off_clip_planes()`
Occurs when using clip plane culling
2023-02-03 15:26:50 +01:00
rdb 6075307e66 glgsg: Set maximum vertex attrib stride for WebGL 2023-02-03 15:17:55 +01:00
rdb 805fa5a36a glgsg: Guess max vertex attrib stride if not queryable
Or should we just assume the most restrictive possibility?
2023-02-03 15:09:32 +01:00
rdb b09a8a84ec Merge branch 'release/1.10.x' 2023-02-03 14:52:39 +01:00
rdb 718bac1c69 audiotraits: Fix crash when encountering corruption in OpenAL stream
Partial backport of #1452
2023-02-03 14:44:14 +01:00
rdb a20996d2aa pgraphnodes: Support missing texture types in shader generator:
- Cube arrays
- 1D texture arrays
- Buffer textures

Not to say that they are displayed meaningfully, but better than a cryptic error message.
2023-01-31 17:40:55 +01:00
rdb d69d393e4c glgsg: Set ultimate Cg profiles to gp5vp/gp5fp/gp5gp
These support the most features, including cube map arrays (which aren't even supported in glslv/glslf)

This improves the quality of error messages, eg. using cube map arrays will no longer display a cryptic error about no overload of texCUBEARRAY() being available
2023-01-31 17:38:54 +01:00
rdb 52c7d6bddb shader: Add missing handling for 1D array textures in Cg shaders 2023-01-31 17:37:18 +01:00
rdb 51d0a55264 general: Fix silly new clang warning about unprefixed `std::move()` 2023-01-31 15:38:02 +01:00
rdb 614502d183 gobj: Add note to API doc about maximum stride value 2023-01-31 15:36:43 +01:00
rdb c5ccd6232d glgsg: Prevent exceeding max supported vertex attrib stride
See also Moguri/panda3d-gltf#117
2023-01-31 15:30:52 +01:00
rdb 8bc1743d75 Merge branch 'release/1.10.x' 2023-01-27 16:17:41 +01:00
rdb ef58255abd vision: Fix another use of wrong delete operator in ARToolKit code 2023-01-27 10:40:47 +01:00
LD 518ee0fb8e cocoadisplay: Capture display before switching to fullscreen mode 2023-01-20 18:16:43 +01:00
rdb 4b992105e1 ShaderGenerator: Fix support for hardware point sprites
In gp5fp and glslf profiles, we can rely on per-fragment point coordinates to be available, otherwise we have to emulate support by calculating it from the fragment pixel coordinates
2023-01-16 19:33:09 +01:00