Commit Graph

10823 Commits

Author SHA1 Message Date
rdb 761c54f63d pgui: Workaround for DirectEntry flickering issues w/ pipelining
See #1070.  This is a temporary solution (one which isn't complete- it doesn't properly handle state changes).
2020-12-12 13:57:49 +01:00
Daniel 4f63ef635d panda: Remove PyEval_InitThreads calls when compiling against Python 3.9+
Cherry-pick from #1053
2020-12-12 00:16:58 +01:00
rdb bf59e880c6 bullet: Fix compilation error with Bullet 2.90+ 2020-12-09 16:25:29 +01:00
rdb 8e2c0dff4a pgraph: Hack fix for copying model with LightAttrib on root
When a LightAttrib is set on the root of a model and the light is contained within that model, creating a copy (like the one Loader makes automatically) causes the LightAttrib to still point to the original light, not to the newly copied light.

This works around it only for the case when the LightAttrib is set on the root, and only for the case of NodePath::copy_to() (it turns out there are edge cases when doing it in PandaNode::copy_subgraph() that would be hard to explain).

See Moguri/blend2bam#44
2020-12-09 15:51:36 +01:00
rdb 9525ddbfef pgraph: LightAttrib::get_on_light(n) should call check_sorted() 2020-12-09 15:48:10 +01:00
rdb 61a089ad59 ShaderGenerator: don't output unused attr_ambient input variable 2020-11-22 14:23:46 +01:00
rdb b12fcec099 glgsg: Fix handling of sized rgba formats in OpenGL ES 2020-11-22 14:21:34 +01:00
rdb d1e8554fde glgsg: Fix error message if vtx_normal is declred as float4 in Cg 2020-11-21 14:19:52 +01:00
rdb 93900a203e putil: Backport part of 9d8c523dfa
Fixes #886
2020-11-17 23:36:06 +01:00
rdb 3abd157315 gobj: Fix a bad assertion comparison 2020-11-17 21:05:08 +01:00
rdb 3a2048e44a glgsg: Fix skinning shader being unable to render unskinned models
Panda was adding a column with weights (0, 0, 0, 0), but these weights don't add up to 1 so no useful identity matrix can be produced.  Instead it's better to fall back to the OpenGL default, (0, 0, 0, 1).

I'm also defaulting the transform_index values to (0, 1, 2, 3) to support non-indexed skinning (although that's pretty esoteric, given that that only supports 4 transforms...)
2020-11-17 21:01:56 +01:00
rdb c53f461f3f gobj: Fix typo in MatrixLens API documentation
Fixes #1042
2020-11-17 11:59:36 +01:00
rdb 8c3fd5b406 collide: Release GIL while during CollisionTraverser traversal
This is necessary to prevent deadlocking on the GIL if some Python code is trying to write some geometry while the CollisionTraverser is trying to read it.

Fixes #1033
2020-11-02 12:18:22 +01:00
rdb 4b7e32e9b0 egldisplay: Fix bad use of X11 None symbol instead of nullptr 2020-09-16 23:39:13 +02:00
rdb c7f75fc906 egg2pg: Add egg-force-srgb-textures environment variable
This will cause all textures in .egg files to be loaded with an sRGB format setting (except with an envtype that generally assumes a linear texture).

Fixes #1006
2020-09-13 15:17:02 +02:00
rdb a968caf1d2 windisplay: Fix parented window receiving WS_POPUP style
Fixes #915
2020-09-12 15:38:50 +02:00
rdb d997be50ff glgsg: fix state tracking bug passing view parameters to shader
These parameters are already taken care of by set_state_and_transform().

Also comment out a few lines of code that would prevent the latter from being called for transform changes, but which never triggered anyway.
2020-09-09 18:06:42 +02:00
rdb 3daf1ae1b1 general: Assorted API reference fixes 2020-09-09 18:03:49 +02:00
rdb ad0e634292 egg: Add (discouraged) way to specify sRGB texture format (#924)
This should NOT be used by exporters, but is provided only for the sake of round-trippability of .bam files.
2020-09-06 14:44:44 +02:00
rdb 005d187ac4 egldisplay: Support creating a window with sRGB framebuffer 2020-09-06 10:14:28 +02:00
rdb 24fb2a2c88 egldisplay: Fix invalid software/hardware detection on Mesa 2020-09-06 09:21:21 +02:00
rdb 40842ef217 gles2gsg: fix sRGB texture support 2020-09-06 09:20:34 +02:00
rdb cca84131df gles2gsg: squelch warning about missing #version line in shader 2020-09-06 09:19:51 +02:00
LD 28f49ffd0b cocoadisplay: Use [event charactersIgnoringModifiers] when UCKeyTranslate() can not translate the input key 2020-09-01 20:29:53 +02:00
rdb 1cc82f47b6 fmod: Fallback to opening file via callbacks if direct doesn't work
Fixes #1002
2020-09-01 10:41:34 +02:00
rdb 9deb569441 pgui: Work around Windows bug with tab character in PGEntry
Fixes #994
2020-08-21 14:29:27 +02:00
rdb 4484aca8e1 Revert "pgui: Ignore PGEntry tab keypress"
This reverts commit 1f05d37b20.

See #994
2020-08-21 14:06:22 +02:00
rdb 7b9b65693a mathutil: Gracefully deal with "tails" in Triangulator
Fixes #985
2020-08-18 17:58:28 +02:00
rdb 5ef1db3fd3 Revert "mathutil: error instead of infinite loop if triangulation failed"
This reverts commit 9c4cb28805.

The "fix" wasn't very satisfying, I'm going to try another approach.
2020-08-18 17:25:58 +02:00
rdb 43507dd118 mathutil: Fix Triangulator bug cleaning up hole indices 2020-08-18 16:38:12 +02:00
rdb 73b5316c6c gobj: add margin to float comparison in lens.project()
Fixes unit tests in double-precision build.

Cherry-picked from fa53e013cb
2020-08-17 12:42:34 +02:00
Mitchell Stokes dd77bd4cdf
shadergen: Make use of material alpha if present (#925)
The material alpha overrides alpha values from flat color or vertex colors. This follows what the fixed-function pipeline does.

Fixes #912
2020-08-17 12:27:03 +02:00
Daniel 1f05d37b20 pgui: Ignore PGEntry tab keypress
Closes #885
2020-08-17 10:02:06 +02:00
rdb 9c4cb28805 mathutil: error instead of infinite loop if triangulation failed
Fixes #985
2020-08-11 09:38:41 +02:00
rdb 72b96f1afa putil: define pbitops in terms of fundamental types
This ensures there's always an overload matching a particular definition of size_t / uint64_t, etc.
2020-07-25 09:53:15 -04:00
Mitchell Stokes 2893d8cef8 device: Fix erroneous dpad_*-up events when emulating a dpad on Linux
The first time axis are processed while a dpad axis is engaged will
result in the opposite dpad "button" getting set to a state of S_up from
S_unknown, which results in an '-up' event getting fired. Instead,
assume the emulated dpad buttons start in a state of S_up.

This fix is for the Joystick API and for the evdev API, but only the
evdev changes were tested.

Closes #973
2020-07-25 14:07:33 +02:00
rdb 3fe1d286d0 collide: Add docstring for CollisionTraverser::traverse() 2020-07-25 12:50:09 +02:00
rdb 9d91274739 gobj: Don't use Texture::up_to_power_2 for memory alignment
That method uses plain int, and will therefore fail for larger allocations.
2020-07-25 10:43:21 +02:00
Donny Lawrence 5d6ff0ecc8 cocoadisplay: Fix handling of shift modifier
Closes #967
Fixes #959
2020-07-25 10:27:18 +02:00
rdb 40962e1eb5 gsg: Don't error for sampler/light type mismatch for non-casting lights
Closes #942
2020-06-29 12:17:36 +02:00
rdb d1ab940e93 pgraph: Fix texture replacement creating unique TextureAttrib
This needs a more thorough fix (probably on master), but the implicit sort is incrementing every time, and it is being included in the hash/compare, so every time the same texture is replaced on the same TextureAttrib, it will be a unique TextureAttrib, causing garbage to accumulate and the state system to be generally less effective.
2020-06-29 11:30:07 +02:00
rdb a9b158192f putil: fix crash in BitArray::has_any_of() 2020-06-14 12:55:52 +02:00
rdb 446c01c796 nativenet: change some error messages to debug messages 2020-06-14 12:52:01 +02:00
Nathan S ffef5968fe docs: some grammar fixes for meshDrawer2D
Fixes #941
2020-06-02 20:36:56 +02:00
rdb 55951c3025 pgraph: fix has_tags() after clearing Python tags
Fixes #936
2020-06-02 20:31:18 +02:00
rdb d64944c108 pgraph: minor optimizations to GeomNode::add_for_draw() 2020-05-11 09:38:17 +02:00
rdb 26ba2b15cd collide: unexpose verify_points overload taking LPoint3 array
Similar as in #908
2020-05-11 09:09:00 +02:00
rdb dd9ed1109a downloader: Fix dead link in API documentation 2020-05-11 09:08:11 +02:00
rdb ed73394275 collide: fix erroneous collision if sphere is under edge of polygon
Reproducible by the code in #907, occurs if the sphere is close to the edge, but its center is off and under the polygon.
2020-05-05 16:33:20 +02:00
rdb 2ed4516cb2 collide: Unexpose CollisionPolygon constructor taking point array
This could never work in Python, and does indeed cause a crash, so I don't consider this compat-breaking.

Fixes #908
2020-05-05 14:51:31 +02:00