Commit Graph

1593 Commits

Author SHA1 Message Date
Campbell Barton
6119f3cad1 Cleanup: spelling (initialized) 2020-08-01 13:57:27 +10:00
Campbell Barton
006e850a84 Cleanup: spelling 2020-08-01 12:52:11 +10:00
Christian Rauch
59e48d8fe4 Wayland: draw opaque background when OpenGL alpha is enabled 2020-07-22 10:57:42 +10:00
Campbell Barton
123e29c274 Cleanup: missing CMake headers from source lists 2020-07-16 13:17:31 +10:00
Campbell Barton
e062def3b4 Cleanup: spelling 2020-07-15 13:11:22 +10:00
Campbell Barton
651db1b26f Cleanup: spelling 2020-07-11 15:32:59 +10:00
Campbell Barton
a272a2a6cd Cleanup: spelling 2020-07-03 11:58:13 +10:00
Julian Eisel
b468023aa1 VR: Properly support outputting sRGB swapchain buffers
Latest SteamVR OpenXR updates brought OpenGL support, but only with sRGB
buffers. I think for DirectX it's the same now.
It's not a big issue for us to use sRGB buffers, so that's what I will
do for now. That way we shouldn't need hardcoded exceptions for specific
runtimes that don't transform linear buffers correctly.
2020-06-24 18:42:53 +02:00
Julian Eisel
a809631ff2 VR: Fix too dark rendering on SteamVR
Apply the sRGB transform workaround we already apply for Monado (and used
to apply for Windows Mixed Reality).
2020-06-12 13:12:45 +02:00
Julian Eisel
f12fe3c23e VR: SteamVR is now a supported OpenXR runtime! (Windows only)
Steam just released a SteamVR update with OpenXR Developer Preview
support:
https://steamcommunity.com/games/250820/announcements/detail/2396425843528787270.

Once SteamVR is set up for OpenXR (see link above), it works with
Blender "out of the box", thanks to OpenXR!

We have to apply the sRGB transform workaround for SteamVR though,
otherwise it renders way too dark. Done in the next commit.

Note that AMD users may still only see a pink screen, because the
OpenGL-DirectX compatibility fails. I will check on a fix again.
For SteamVR on Linux we may have to wait for until it supports OpenGL
rendering for OpenXR. Alternatively, we *could* add initial Vulkan
support at Ghost level and use Vulkan<->OpenGL interoperability
extensions, Monado uses these as  well.
2020-06-12 13:12:14 +02:00
Julian Eisel
4b39de677d Fix T74101: File Browser in macOS fullscreen crashes or makes windows unusable
When closing the File Browser window after making it fullscreen, Blender would
either crash or all windows would disappear, with no obvious way to bring them
back.

The "fix" is to not allow fullscreen for File Browsers (or any future "dialog"
windows), but only maximizing. From what I can tell that's how secondary
windows are supposed to work on macOS. What we previously did seemed like
something macOS doesn't handle cleanly, and I didn't find a simple way to do so
on our side.
2020-06-10 18:40:05 +02:00
Sergey Sharybin
1c5479167f Cleanup: Strict compiler warning 2020-06-05 11:59:45 +02:00
Christian Rauch
63bcee81f6 GHOST/wayland: use 'is_dialog' flag to prevent drawing into same window 2020-05-30 12:23:39 +01:00
Campbell Barton
d1f4adab24 Cleanup: spelling, correct reference to 'Mesh.mcol' 2020-05-29 12:58:29 +10:00
Campbell Barton
6c1cf395f2 Cleanup: remove unnecessary copy constructor
Caused deprecated-copy warnings as it wasn't used.
2020-05-27 11:50:54 +10:00
Christian Rauch
b87d81be96 Wayland: support key repeat 2020-05-22 18:09:17 +10:00
Christian Rauch
fe739f8c26 GHOST: fix GHOST_System::getMilliSeconds()
This wasn't returning milliseconds, causing problems with key repeat.
2020-05-22 18:08:13 +10:00
Campbell Barton
ce6fd6b6a2 Fix missing header building with wayland 2020-05-22 16:47:59 +10:00
Christian Rauch
c8060a78fd GHOST/wayland: style fix 2020-05-13 23:51:51 +01:00
Christian Rauch
a53917152e GHOST/wayland: fix cursor buffer deallocation 2020-05-13 23:13:48 +01:00
Christian Rauch
bd3c842c56 GHOST/wayland: remove unused 'registry' 2020-05-13 23:13:48 +01:00
Christian Rauch
75e989dab6 GHOST: fix cursor buffer handling when toggling visibility 2020-05-12 23:05:24 +01:00
Campbell Barton
f7715b3337 Merge branch 'blender-v2.83-release' 2020-05-12 22:10:21 +10:00
Campbell Barton
65381e220e Fix T76507: Reading clipboard blocks keyboard input on X11 2020-05-12 22:09:11 +10:00
Nicolas Fauvet
1c0e22b982 VR: Fix OpenXR state freeze on Oculus after taking off HMD
With the Oculus runtime, the VR session would freeze when taking off the HMD
and putting it back on. This was caused by the deletion of graphics resources
too early in the OpenXR state machine, at least for Oculus.
The resources will now only be freed once the session is actually destroyed.

Also fixes an issue where it wasn't possible to stop the session via the UI
when the HMD was taken off.

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D7635
2020-05-07 14:38:10 +02:00
Nicolas Fauvet
6e0540671c VR: Fix OpenXR state freeze on Oculus after taking off HMD
With the Oculus runtime, the VR session would freeze when taking off the HMD
and putting it back on. This was caused by the deletion of graphics resources
too early in the OpenXR state machine, at least for Oculus.
The resources will now only be freed once the session is actually destroyed.

Also fixes an issue where it wasn't possible to stop the session via the UI
when the HMD was taken off.

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D7635
2020-05-07 14:28:28 +02:00
Julian Eisel
45adcc51b2 macOS: Remove workaround for old quit dialog
Got added in 1a30e52142 (and tweaked in follow-ups) but shouldn't be needed
anymore with the newer popup based quit dialog.

It prevents Blender from quitting properly in case macOS closed all Blender
windows. This may happen in some corner-cases unfortunately (e.g. T74101) which
would be nice to have addressed at some point. Until then, users shouldn't have
to force-kill Blender to shut it down if they run into this.
2020-05-07 13:55:14 +02:00
Campbell Barton
8b74d6673a Fix num-pad access on wayland
Always interpret keypad keys as if numpad is enabled,
this matches other platforms.

Also add missing quote key.
2020-05-06 11:10:29 +10:00
Christian Rauch
4af9578ab7 Fix T76429: GHOST/Wayland event's don't correspond to physical keys 2020-05-06 10:20:32 +10:00
Campbell Barton
39ea222339 Cleanup: warnings 2020-05-06 08:18:00 +10:00
Campbell Barton
6a0cb48149 GHOST: cleanup platform checks, fix Wayland + X11
- Building with Wayland + X11 missed an exception include.
- Move HEADLESS check first, since it's the same on all platforms.
2020-05-03 20:24:24 +10:00
Brecht Van Lommel
83304e4c22 Merge branch 'blender-v2.83-release' 2020-05-01 23:55:13 +02:00
Nikhil Shringarpurey
51aa0ea58f Fx build error with MSBuild on Windows
Differential Revision: https://developer.blender.org/D7587
2020-05-01 22:03:26 +02:00
Campbell Barton
d7d140ec7f CMake: add WITH_GHOST_X11 option
- Support building only with Wayland.
- In this case, show useful error messages
  when Wayland fails to load.
2020-05-01 20:07:01 +10:00
Campbell Barton
e28d2e5184 Cleanup: duplicate include, define from Wayland patch 2020-05-01 19:28:43 +10:00
Campbell Barton
7ded7610ce Cleanup: rename WITH_X11 to WITH_GHOST_X11
Matches WITH_GHOST_{SDL|WAYLAND}
2020-05-01 19:14:50 +10:00
Christian Rauch
47fea20dc8 GHOST: set the window state on wayland startup 2020-05-01 18:43:11 +10:00
Campbell Barton
7f4c4011ce Cleanup: replace unordered_map with switch statement
Was performing 2x look-ups, checking keys doesn't benefit noticeably
from hash look-ups.
2020-04-30 17:56:51 +10:00
Campbell Barton
070bf01d37 GHOST: fix WITH_GHOST_DEBUG option
Changing the order of include changes broke GHOST_DEBUG,
however it was using defines in a fragile way.

Fix by removing 'GHOST_DEBUG' and use 'WITH_GHOST_DEBUG' which
was already defined by CMake.
2020-04-30 17:28:28 +10:00
Campbell Barton
52186a39af Cleanup: printf warning 2020-04-30 17:28:28 +10:00
Campbell Barton
a18ad3c3b6 CMake: use system include for generated headers 2020-04-30 16:01:41 +10:00
Christian Rauch
66e70fe299 GHOST: initial Wayland support
Usable with the CMake option 'WITH_GHOST_WAYLAND'

The following functionality is working:

- Building with X11 and Wayland at the same time,
  wayland is used when available.
- Keyboard, pointer handling.
- Cursor handling.
- Dedicated off-screen windows.
- Drag & drop.
- Copy & paste.
- Pointer grabbing.

See D6567 for further details.
2020-04-30 14:21:50 +10:00
Sergey Sharybin
2c60221080 Cleanup: Missing include directories after recent cleanup 2020-04-28 13:33:18 +02:00
Brecht Van Lommel
2580fa1602 Cleanup: remove STR_String usage from GHOST 2020-04-28 12:57:39 +02:00
Ray Molenkamp
15081cf6df Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-27 13:01:24 -06:00
Ray Molenkamp
7951ec2641 Cleanup: Fix warning about initialization order with MSVC 2020-04-27 13:00:53 -06:00
Christian Rauch
54eb701978 Cleanup: add newline to ghost warning print 2020-04-27 15:27:18 +10:00
Brecht Van Lommel
7fbd9b67af Fix Windows build error introduced in Wintab commit revert 2020-04-14 17:14:56 +02:00
Brecht Van Lommel
e90d8422d0 Revert "Windows: support high resolution tablet pen events for Wintab"
This reverts commit 1a3928f33c and 1a3928f3. This is not working stable
with some Wintab implementations, so reverting for now. This leaves only
the Windows Ink changes for 2.83.
2020-04-14 18:58:37 +02:00
Nicholas Rishel
1a3928f33c Fix T75546: Solve possible endless loop in wintab initialisation
Some Wintab drivers report a zero length queue, this causes an unplanned never ending loop.

Differential Revision: https://developer.blender.org/D7392
Reviewed by: Ray Molenkamp
2020-04-09 16:43:09 -06:00