Commit Graph

9967 Commits

Author SHA1 Message Date
rdb 7ea16fd772 putil: fix copy constructor of SimpleHashMap 2018-01-02 19:07:43 +01:00
rdb 92787264de putil: fix assertion when global clock is created on non-main thread 2018-01-02 17:11:27 +01:00
Younguk Kim 84bdce01f2 Fix crash by end iterator while closing a window 2018-01-01 18:14:48 +09:00
rdb a96b171095 glgsg: only consider texture/texgen in munger if !gl_parallel_arrays
This could possibly be used to workaround issue #218
2017-12-31 09:51:25 +01:00
rdb a6f737d4eb linmath: make raising quaternion to power more meaningful
Fixes #160
2017-12-31 09:30:32 +01:00
rdb 7ee9467f8d shadows: fix shadow buffer creation deadlock in multithreaded pipeline
Fixes #162
2017-12-30 17:47:15 +01:00
rdb 39abc66025 gobj: reduce unnecessary use of threading primitives in constructors 2017-12-28 00:20:59 +01:00
rdb e04ddbef9a pipeline: fix multithreaded render pipeline deadlock
This deadlock happens when another thread holds a cycler lock and then attempts to call Pipeline::remove_cycler() while Pipeline::cycle() is running on the main thread.

The fix for this problem is threefold:
* Allow remove_cycler (and add_cycler) to be called while a cycle is in progress, by introducing a second lock
* Let cycle() not block if a dirty cycler can't be locked, instead trying other cyclers first
* Adding a way to let remove_cycler() check whether a cycler is currently in use by the main thread, and yielding if so

More information is on https://github.com/panda3d/panda3d/issues/217

Fixes #217 (also see LP 1186880)
2017-12-27 22:59:38 +01:00
rdb 8a94a0d439 loader: fix crash getting result from async load 2017-12-27 22:56:21 +01:00
rdb 588d41ed7e Fix assorted compiler warnings 2017-12-24 15:12:58 +01:00
rdb 0281f306e1 express: add PointerToArray.count() 2017-12-24 15:09:21 +01:00
rdb 540122e703 gobj: fix crash with ShaderBuffer 2017-12-24 12:41:52 +01:00
rdb ed5e5386b9 AsyncFuture improvements, incl. support for gathering futures 2017-12-21 14:07:01 +01:00
rdb ef7f856c46 cocoa: support windowless offscreen rendering on macOS
Fixes: #183
2017-12-20 14:27:08 +01:00
rdb f82a940878 glgsg: fix shader version in macOS 3.2+ context 2017-12-20 14:16:05 +01:00
rdb f0b21ee969 Support old Python 2 buffer protocol in PTA and Texture ram_image
This enables passing eg. str and array.array objects in Python 2
2017-12-20 01:23:26 +01:00
rdb 096d54de00 Add double-precision versions of encode_sRGB_uchar 2017-12-19 23:44:15 +01:00
rdb 061e0c4862 cocoa: allow getting a GL 3.2+ context on macOS 10.7+ using gl-version 2017-12-19 23:38:45 +01:00
rdb 9dcfcbf5fa texture: support store() on more component types (incl. sRGB)
This changes behaviour for sRGB textures, which weren't previously converting to the correct color space.

Also add unit tests for storing to PNMImage.

Closes: #212
2017-12-19 20:02:49 +01:00
rdb e9a50c8898 texture: fix get_clear_data() return type, make it work with sRGB 2017-12-19 19:27:36 +01:00
rdb e4e24eee56 glgsg: use T_float when downloading 24-bit depth textures
This is to match behavior with previous Panda3D versions.  See #212
2017-12-19 18:44:44 +01:00
rdb 348b1c344d texture: support uint/float/half/sRGB textures in TexturePeeker 2017-12-19 18:44:18 +01:00
rdb 29f50be15e Fix bug: copy-to-ram depth texture binding gets format set to RGB
This was a regression introduced by be8f4de337

Fixes: #212
2017-12-16 21:03:08 +01:00
rdb 9bfc425b75 Fix assertion when rendering bounding volumes (broken since 6f8b379) 2017-12-12 23:27:51 +01:00
rdb 193e4b5f59 interrogate: clean py_panda.h; use macros to access Dtool_PyInstDef 2017-12-12 23:03:38 +01:00
rdb 3e83f8c65e Fix priority argument ignored in NodePath::set_shader_input 2017-12-12 15:25:21 +01:00
rdb 46189dc1bf Compile fix for macOS build
[skip ci]
2017-12-04 22:52:23 +01:00
rdb 2e20a0f16e Implement awaitable thread-safe future for async operations
This introduces AsyncFuture as a new base class of AsyncTask.  It's modelled after asyncio's Future class, except that it is thread-safe and you can use result() to block the current thread waiting for the future to finish (of course this is not necessary for use with coroutines).

AsyncFuture should be used for any operation that finishes in the future, to get the benefit of awaitability within coroutines as well as a standard interface for querying status and results of the operation as well as cancelling it.  As such, it's been implemented in various places, including texture.prepare() and win.trigger_copy().

Note that AsyncFuture is intended to be used *once*; it cannot be used more than once.  As an example of how this works, tex.prepare() will return the same future as long as the prepare isn't complete, but when it is done, subsequent calls to tex.prepare() will return a new future.
2017-12-04 22:25:28 +01: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 3be22679a4 display: also avoid getting more than 24 color bits if 0 were requested
See issue #197
2017-11-26 00:06:03 +01:00
rdb 749b23a190 Fix support for pickling NodePaths (broken in 1b1d80c)
Fixes: #199
2017-11-25 23:12:47 +01:00
rdb 46c8852eed text: fix for certain versions of HarfBuzz 2017-11-20 20:40:51 +01:00
rdb 0edac2e94a Work around gamma issue with 64-bit color depths on NVIDIA hardware 2017-11-16 23:52:12 +01:00
rdb 001804113a ShaderGenerator: make colorscale/texture blending match FFP better
A notable change is that the color scale is now applied *before* texture blending, matching the FFP.  If this breaks anything, we might want to add a configuration option for this.
This also implements the remaining combine modes, CM_dot3_rgb and CM_dot3_rgba, and fixes the broken CM_subtract mode (which currently worked the same way as CM_add).

Fixes: #189
2017-11-16 15:58:13 +01:00
consultit e13d14fe3d bullet: add bam serializability of remaining shapes
From #123 with significant changes from rdb.

Closes: #123
2017-11-08 01:53:53 +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 08629ef1a0 Fix a few compiler warnings 2017-11-07 15:38:40 +01:00
rdb 483a491ed7 interrogate: simplify coercion code
This remove support for coercing non-ReferenceCounted types that are neither default-constructible nor move-assignable, but it turns out none of the classes we really need it for matches that.
It further cuts down on the amount of code that is being generated to support coercion in cases where it makes absolutely no sense.
2017-11-06 19:53:38 +01:00
rdb dd2806c8bd Mark constructors 'explicit' for which coercion makes no sense 2017-11-06 19:47:38 +01:00
Younguk Kim a26662ce46 Fix compile error by missing header file 2017-11-02 18:04:36 +09:00
rdb 075cb14cbb bullet: implement debug draw via cull callback for efficiency
Now the debug drawing will no longer happen if the debug node is not being visited by the cull pass, ie. in another scene graph.  Furthermore, the generation code has been optimized a bit more.

This change means it no longer inherits from GeomNode.  Future improvements could include better culling (which is currently disabled entirely).

Closes: #130
2017-11-01 21:55:54 +01:00
rdb 745b51f10f ShaderGenerator: fix M_blend to match fixed-function pipeline
See panda3d/panda3d#178
2017-11-01 20:20:38 +01:00
rdb c17db98aec Merge branch 'pr-pview-adjust-camera-clip' of git://github.com/eswartz/panda3d 2017-10-31 20:15:38 +01:00
rdb 4cd826e63a Merge branch 'fix-audio-distance-factor' of github.com:nikolmiv/panda3d
Closes: #13
2017-10-31 19:31:27 +01:00
frainfreeze f22c0cdd83 Add README.md files for various directories
Closes: #10
2017-10-31 19:20:24 +01:00
rdb 0c0f9adab9 Support coroutines and async/await in the task manager and loader 2017-10-31 18:56:41 +01:00
rdb 51090ccf12 pgraph: fix LightLensNode assert due to bad refcount in LightAttrib::compose 2017-10-20 20:12:25 +02:00
rdb 407c8e8712 bullet: add interface to access BulletTriangleMesh vertices/triangles 2017-10-20 19:53:02 +02:00
rdb 8a35f360bd Fix build error 2017-10-18 12:29:44 +02:00
rdb 7d721a33a6 Restore setShaderInput overload taking 4 numbers, but deprecate it 2017-10-18 11:26:20 +02:00