10061 Commits

Author SHA1 Message Date
rdb
77f33f3642 device: never use inotify_init1(), it is not in older kernels 2018-04-04 21:32:44 +02:00
rdb
09bd662919 Merge branch 'master' of github.com:panda3d/panda3d into input-overhaul 2018-02-04 11:37:09 +01:00
rdb
c1fd2e46de input: more device support on macOS (incl. SpaceNavigator) 2018-02-04 11:32:59 +01:00
rdb
6ada306184 input: split out macOS implementation of device manager 2018-02-04 11:00:43 +01:00
rdb
9e6d0d91ad input: fixes for older Android API levels (thanks to pmp-p) 2018-02-04 10:58:36 +01:00
deflected
50dafd087d bullet: Fixed calculating of Box dimensions
- Fixed wrong claculation of box dimensions, when
        creating BoxShape from solids

Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-02-02 23:19:47 +01:00
deflected
ce79656141 bullet: Fixed crash when rendering bulletDebugNode
- Fixed crash when rendering bulletDebugNode without calls
        to doPhysics. This is caused by _debug_world pointing to
        invalid memory, while _debug_stale is true when bulletDebugNode
        is initialized.

Signed-off-by: deflected <deflected@users.noreply.github.com>
2018-02-02 23:19:39 +01:00
nosyliam
b562aba4e0 Support static linking with FMOD
Closes #241
2018-02-02 23:19:23 +01:00
rdb
18afcdbd0a android: handle right mouse button, more external keyboard keys 2018-01-29 20:09:58 +01:00
rdb
0fa8980be2 android: fix activity lifecycle issues (froze upon quit or resume)
It seems Android doesn't want an application to just quit on its own accord; after main() returns we need to kindly request Android to finish the activity and keep handling events until Android destroys the app.
2018-01-29 20:08:29 +01:00
rdb
7c1dd4050b android: change assets mount dir, point binary path to .apk
The binary path we get from /proc/self/exe isn't very useful; the path to the .apk is barely more useful but it still doesn't make a whole lot of sense.  It might make more sense to set it to the path of the native .so that is being loaded by NativeActivity.
2018-01-29 19:44:39 +01:00
rdb
e301e5fe5e android: fix various compilation errors 2018-01-29 19:36:51 +01:00
rdb
94385e865f Merge remote-tracking branch 'origin/master' into input-overhaul 2018-01-28 14:31:45 +01:00
rdb
d35e6c5113 android: include android_native_app_glue in repository
These files are from the NDK, but don't seem to be included in termux.  Since they are two small files that change very rarely, it's easier to just include them in the Panda repo.

[skip ci]
2018-01-28 14:27:35 +01:00
rdb
6e476e77a3 input: support imitation SNES USB gamepad on Windows 2018-01-28 13:47:11 +01:00
rdb
04352e152d ShaderGenerator: fix TextureStage mixup when stages are disabled
This fixes a regression that caused the wrong textures/stage settings to be applied when a texture stage was being optimized out (eg. when a normal map is present while lighting is disabled).
2018-01-26 15:39:30 +01:00
rdb
6a1d717e90 dxgsg9: support texture clear, gracefully handle 0x0 textures 2018-01-26 14:33:13 +01:00
rdb
f3aaa12adc tinydisplay: support texture clear, gracefully handle 0x0 textures 2018-01-26 14:31:40 +01:00
rdb
d6cf575225 pgraph: fix LightAttrib.compose resulting in wrong on_light values 2018-01-26 14:30:21 +01:00
rdb
3da32b7b7c input: split out LinuxInputDeviceManager from InputDeviceManager 2018-01-25 20:15:16 +01:00
rdb
2347587077 x11: respect cursor updates when in confined/relative mouse mode 2018-01-24 19:11:48 +01:00
rdb
f189b817c6 input: fix name/manufacturer/serial fetching for some evdev devices 2018-01-23 12:59:14 +01:00
rdb
712b246dd6 input: reverse rudder direction to match yaw, reverse 3D mouse roll
Although having the rudder reversed is less intuitive, this makes it match the Panda convention for "heading".
2018-01-23 12:58:40 +01:00
rdb
8bd617c4ee input: new windows input manager based on raw input
The new implementation uses a message-only window to register raw input events.

XInput is still used when possible, but raw input is being used to handle device detection.  (XInput is only enabled when an XInput device is plugged in, which also prevents us from having to load and poll the XInput library unnecessarily.)

For raw devices, the Windows HID parser library is used to parse the raw data.  Unfortunately, the Windows 7.1 SDK does not ship hid.lib (which is in the WDK 7.1.0), so I am dynamically loading hid.dll to prevent pulling in a dependency on the WDK.  (But perhaps we can ship hid.lib in the thirdparty libraries?)

Input devices other than XInput gamepads and the 3D mouse have not been tested very well yet.  Adding keyboard and mouse support is still a TODO.

This also splits out the Windows implementation of InputDeviceManager into a separate subclass; it is intended that the other implementations will follow suit.
2018-01-22 22:05:14 +01:00
rdb
3977b9c57c collide: fix multithreaded pipeline crash with CollisionVisualizer 2018-01-18 21:23:54 +01:00
rdb
fe0c182830 cocoa: fix app launching regression on macOS
The regression was introduced by ef7f856c46299f4d14711130269f11afad49e4c3

Fixes #227
2018-01-17 19:46:30 +01:00
rdb
4c4288f491 display: lock GraphicsEngine mutex in remove_all_windows() 2018-01-17 19:46:11 +01:00
rdb
fe3dab192f gobj: slightly more efficient string handling in Shader::make() 2018-01-15 23:27:46 +01:00
rdb
1cada85e6b ShaderGenerator: fixes for combine alpha blending 2018-01-15 12:20:27 +01:00
rdb
6a323081c0 pipeline: fix regression with Thread.getCurrentTask() disappearing
This method was accidentally un-exposed by 2e20a0f16ed4c08030f978e46950ba635fca8a32

Fixes #226
2018-01-10 20:17:43 +01:00
rdb
dee4cd6201 bam2egg: support exposed joints properly
Also, don't use structured tag unless it seems necessary to preserve the structure
2018-01-10 20:14:25 +01:00
rdb
ba9ea065e4 gobj: performance improvement for CPU animation
In particular it seems that decomposition is slow, so the code to handle the transformation of the normal column now tries harder to avoid it, especially in the case of a scale of 1.

Also see #222
2018-01-08 21:33:32 +01:00
rdb
73b4217cad input: fix joystick button and axis mapping on macOS 2018-01-07 19:34:49 +01:00
rdb
96f6bd7fa5 input: fixes for joysticks in Linux compatibility mode 2018-01-07 17:39:44 +01:00
rdb
2523bb0326 input: fixes for 3D mouse axes on Linux 2018-01-07 17:36:52 +01:00
rdb
9fbdefe120 input: add analog trigger emulation on Linux 2018-01-07 17:26:48 +01:00
rdb
4f739e88cf input: joystick buttons, use yaw/pitch/roll for axes, more devices
Also adds format_* functions to get string from enum value.
2018-01-07 14:50:54 +01:00
rdb
27bd7ae4ac Merge branch 'master' into input-overhaul 2018-01-07 12:08:59 +01:00
rdb
b5e9f23e3b glesgsg: fix compile error on Arch Linux
[skip ci]
2018-01-07 12:07:49 +01:00
rdb
36636aad81 Merge remote-tracking branch 'origin/release/1.9.x' 2018-01-05 19:48:32 +01:00
rdb
eaf3983c06 ode: fix trimeshes in double-precision ODE builds
Fixes #174
2018-01-05 15:40:59 +01:00
rdb
42f8978236 pgraph: sort "off" texture stages when loading from .bam
This fixes an issue where states loaded from .bam file containing more than one "off" texture stage would not compose properly.

Fixes #179
2018-01-05 15:16:42 +01:00
rdb
428c5cbbf3 gles2gsg: fix compilation error with OpenGL ES 2 2018-01-05 14:34:15 +01:00
rdb
5980b0b9ab openal: fix warning spam every frame in newer AL implementations
This fixes error messages being generated of the form:
AL lib: (WW) alSetError: Error generated on context 0x801cf8800, code 0xa003

This is caused by alSourceUnqueueBuffers being called without first checking whether processed buffers are available using alGetSourcei.

Fixes #180
2018-01-05 13:37:00 +01:00
rdb
58623b09bd input: add missing has_vibration() method to InputDevice 2018-01-03 14:48:47 +01:00
rdb
962e6e31e4 Merge branch 'master' into input-overhaul 2018-01-03 14:46:13 +01:00
rdb
1073f5abde pgraph: sort "off" texture stages when loading from .bam
This fixes an issue where states loaded from .bam file containing more than one "off" texture stage would not compose properly.

Fixes #179
2018-01-03 14:29:03 +01:00
rdb
4bac9efffe display: fix dispatch_compute and extract_texture_data in MT pipeline
This is required to make the test suite run with pipelining enabled.

It's necessary to let the draw thread do these tasks because that's where the OpenGL context is bound to.  However, we need to let it access the data from the calling thread, so we have to temporarily change the pipeline stage of the draw thread.

I'm not really happy about this solution; it would be better to temporarily make the context current to the app thread, but we need a window for that, which we don't currently require to be passed into that method.
2018-01-03 00:13:48 +01:00
rdb
512f305c12 display: fix assertions when removing window that isn't open yet 2018-01-03 00:09:30 +01:00
rdb
7ea16fd772 putil: fix copy constructor of SimpleHashMap 2018-01-02 19:07:43 +01:00