@@ -9,8 +9,6 @@
|
||||
// Support more backbuffers in case driver decides to use more
|
||||
#define VULKAN_BACK_BUFFERS_COUNT_MAX 8
|
||||
|
||||
class GPUDeviceVulkan;
|
||||
|
||||
/// <summary>
|
||||
/// The implementation for the Vulkan API support for Android platform.
|
||||
/// </summary>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "LinuxVulkanPlatform.h"
|
||||
#include "../RenderToolsVulkan.h"
|
||||
#include "Engine/Platform/Window.h"
|
||||
|
||||
#include "Engine/Platform/Linux/IncludeX11.h"
|
||||
#define Display X11::Display
|
||||
#define Window X11::Window
|
||||
@@ -14,7 +13,6 @@
|
||||
#undef Display
|
||||
#undef Window
|
||||
#undef VisualID
|
||||
|
||||
#include "vulkan/vulkan_wayland.h"
|
||||
|
||||
// Export extension from volk
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
// Prevent wierd error 'Invalid VkValidationCacheEXT Object'
|
||||
#define VULKAN_USE_VALIDATION_CACHE 0
|
||||
|
||||
class GPUDeviceVulkan;
|
||||
|
||||
/// <summary>
|
||||
/// The implementation for the Vulkan API support for Linux platform.
|
||||
/// </summary>
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
// General/Validation Error:0 VK_ERROR_INITIALIZATION_FAILED: Could not create MTLCounterSampleBuffer for query pool of type VK_QUERY_TYPE_TIMESTAMP. Reverting to emulated behavior. (Error code 0): Cannot allocate sample buffer
|
||||
#define VULKAN_USE_TIMER_QUERIES 0
|
||||
|
||||
class GPUDeviceVulkan;
|
||||
|
||||
/// <summary>
|
||||
/// The implementation for the Vulkan API support for Mac platform.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,6 +17,8 @@ enum class VulkanValidationLevel
|
||||
All = 5,
|
||||
};
|
||||
|
||||
class GPUDeviceVulkan;
|
||||
|
||||
/// <summary>
|
||||
/// The base implementation for the Vulkan API platform support.
|
||||
/// </summary>
|
||||
|
||||
@@ -16,11 +16,10 @@ void Win32VulkanPlatform::GetInstanceExtensions(Array<const char*>& extensions,
|
||||
|
||||
void Win32VulkanPlatform::CreateSurface(Window* window, GPUDeviceVulkan* device, VkInstance instance, VkSurfaceKHR* surface)
|
||||
{
|
||||
void* windowHandle = window->GetNativePtr();
|
||||
VkWin32SurfaceCreateInfoKHR surfaceCreateInfo;
|
||||
RenderToolsVulkan::ZeroStruct(surfaceCreateInfo, VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR);
|
||||
surfaceCreateInfo.hinstance = GetModuleHandle(nullptr);
|
||||
surfaceCreateInfo.hwnd = static_cast<HWND>(windowHandle);
|
||||
surfaceCreateInfo.hwnd = static_cast<HWND>(window->GetNativePtr());
|
||||
VALIDATE_VULKAN_RESULT(vkCreateWin32SurfaceKHR(instance, &surfaceCreateInfo, nullptr, surface));
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#define VULKAN_USE_PLATFORM_WIN32_KHX 1
|
||||
#define VULKAN_USE_CREATE_WIN32_SURFACE 1
|
||||
|
||||
class GPUDeviceVulkan;
|
||||
|
||||
/// <summary>
|
||||
/// The implementation for the Vulkan API support for Win32 platform.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,6 +17,7 @@ void iOSVulkanPlatform::GetInstanceExtensions(Array<const char*>& extensions, Ar
|
||||
void iOSVulkanPlatform::CreateSurface(Window* window, GPUDeviceVulkan* device, VkInstance instance, VkSurfaceKHR* surface)
|
||||
{
|
||||
void* windowHandle = window->GetNativePtr();
|
||||
|
||||
// Create surface on a main UI Thread
|
||||
Function<void()> func = [&windowHandle, &instance, &surface]()
|
||||
{
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
// General/Validation Error:0 VK_ERROR_INITIALIZATION_FAILED: Could not create MTLCounterSampleBuffer for query pool of type VK_QUERY_TYPE_TIMESTAMP. Reverting to emulated behavior. (Error code 0): Cannot allocate sample buffer
|
||||
#define VULKAN_USE_TIMER_QUERIES 0
|
||||
|
||||
class GPUDeviceVulkan;
|
||||
|
||||
/// <summary>
|
||||
/// The implementation for the Vulkan API support for iOS platform.
|
||||
/// </summary>
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current state of mouse relative mode.
|
||||
/// Gets the current state of mouse relative mode.
|
||||
/// </summary>
|
||||
/// <param name="window">The window to check against, or null to check for any window.</param>
|
||||
/// <returns>True if mouse is in relative mode, otherwise false.</returns>
|
||||
|
||||
@@ -599,6 +599,11 @@ void WindowBase::Close(ClosingReason reason)
|
||||
OnClosed();
|
||||
}
|
||||
|
||||
bool WindowBase::IsClosed() const
|
||||
{
|
||||
return _isClosing || EnumHasAnyFlags(Flags, ObjectFlags::WasMarkedToDelete);
|
||||
}
|
||||
|
||||
bool WindowBase::IsForegroundWindow() const
|
||||
{
|
||||
return _focused;
|
||||
|
||||
@@ -242,10 +242,7 @@ public:
|
||||
/// <summary>
|
||||
/// Checks if window is closed.
|
||||
/// </summary>
|
||||
API_PROPERTY() virtual bool IsClosed() const
|
||||
{
|
||||
return _isClosing;
|
||||
}
|
||||
API_PROPERTY() virtual bool IsClosed() const;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if window is foreground (the window with which the user is currently working).
|
||||
|
||||
@@ -146,6 +146,7 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(CreateWindowSettings);
|
||||
|
||||
/// <summary>
|
||||
/// True if it's a regular window, false for tooltips, context menu and other utility windows.
|
||||
/// [Deprecated in v1.12]
|
||||
/// </summary>
|
||||
API_FIELD() DEPRECATED("Use Type instead") bool IsRegularWindow = true;
|
||||
|
||||
|
||||
@@ -374,11 +374,6 @@ void LinuxWindow::BringToFront(bool force)
|
||||
X11::XFlush(display);
|
||||
}
|
||||
|
||||
bool LinuxWindow::IsClosed() const
|
||||
{
|
||||
return _isClosing;
|
||||
}
|
||||
|
||||
bool LinuxWindow::IsForegroundWindow() const
|
||||
{
|
||||
return _focused || _focusOnMapped;
|
||||
|
||||
@@ -72,7 +72,6 @@ public:
|
||||
void Minimize() override;
|
||||
void Maximize() override;
|
||||
void Restore() override;
|
||||
bool IsClosed() const override;
|
||||
bool IsForegroundWindow() const override;
|
||||
void BringToFront(bool force = false) override;
|
||||
void SetClientBounds(const Rectangle& clientArea) override;
|
||||
|
||||
@@ -364,11 +364,6 @@ void UWPWindow::Restore()
|
||||
// Not supported
|
||||
}
|
||||
|
||||
bool UWPWindow::IsClosed() const
|
||||
{
|
||||
return _isClosing;
|
||||
}
|
||||
|
||||
void UWPWindow::BringToFront(bool force)
|
||||
{
|
||||
Focus();
|
||||
|
||||
@@ -160,7 +160,6 @@ public:
|
||||
void Minimize() override;
|
||||
void Maximize() override;
|
||||
void Restore() override;
|
||||
bool IsClosed() const override;
|
||||
void BringToFront(bool force = false) override;
|
||||
void SetClientBounds(const Rectangle& clientArea) override;
|
||||
void SetPosition(const Float2& position) override;
|
||||
|
||||
@@ -34,12 +34,12 @@ namespace FlaxEngine
|
||||
/// </summary>
|
||||
/// <param name="mousePosition">The mouse position.</param>
|
||||
public delegate void MouseMoveDelegate(ref Float2 mousePosition);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Perform mouse move action in relative mode.
|
||||
/// </summary>
|
||||
/// <param name="mouseMotion">The relative mouse motion.</param>
|
||||
public delegate void MouseMoveRelativeDelegate(ref Float2 mouseMotion);
|
||||
/// <param name="motion">The relative mouse motion.</param>
|
||||
public delegate void MouseMoveRelativeDelegate(ref Float2 motion);
|
||||
|
||||
/// <summary>
|
||||
/// Perform mouse wheel action.
|
||||
@@ -285,10 +285,10 @@ namespace FlaxEngine
|
||||
GUI.OnMouseMove(pos);
|
||||
}
|
||||
|
||||
internal void Internal_OnMouseMoveRelative(ref Float2 mouseMotion)
|
||||
internal void Internal_OnMouseMoveRelative(ref Float2 motion)
|
||||
{
|
||||
MouseMoveRelative?.Invoke(ref mouseMotion);
|
||||
GUI.OnMouseMoveRelative(mouseMotion);
|
||||
MouseMoveRelative?.Invoke(ref motion);
|
||||
GUI.OnMouseMoveRelative(motion);
|
||||
}
|
||||
|
||||
internal void Internal_OnMouseLeave()
|
||||
|
||||
@@ -352,7 +352,7 @@ void WindowsWindow::Restore()
|
||||
|
||||
bool WindowsWindow::IsClosed() const
|
||||
{
|
||||
return !HasHWND();
|
||||
return !HasHWND() || EnumHasAnyFlags(Flags, ObjectFlags::WasMarkedToDelete);
|
||||
}
|
||||
|
||||
bool WindowsWindow::IsForegroundWindow() const
|
||||
|
||||
@@ -773,13 +773,13 @@ namespace FlaxEngine.GUI
|
||||
Tooltip?.OnMouseLeaveControl(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// When mouse moves over control's area while mouse is in relative mode
|
||||
/// </summary>
|
||||
/// <param name="mouseMotion">Mouse relative motion</param>
|
||||
/// <param name="motion">Mouse relative motion</param>
|
||||
[NoAnimate]
|
||||
public virtual void OnMouseMoveRelative(Float2 mouseMotion)
|
||||
public virtual void OnMouseMoveRelative(Float2 motion)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace FlaxEngine.GUI
|
||||
var rightBottomLocationSS = locationSS + dpiSize;
|
||||
|
||||
// Prioritize tooltip placement within parent window, fall back to virtual desktop
|
||||
/*if (rightBottomMonitorBounds.Y < rightBottomLocationSS.Y)
|
||||
if (rightBottomMonitorBounds.Y < rightBottomLocationSS.Y)
|
||||
{
|
||||
// Direction: up
|
||||
locationSS.Y -= dpiSize.Y + flipOffset;
|
||||
@@ -222,7 +222,7 @@ namespace FlaxEngine.GUI
|
||||
{
|
||||
// Direction: left
|
||||
locationSS.X -= dpiSize.X + flipOffset * 2;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -340,15 +340,15 @@ namespace FlaxEngine.GUI
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnMouseMoveRelative(Float2 mouseMotion)
|
||||
public override void OnMouseMoveRelative(Float2 motion)
|
||||
{
|
||||
if (_trackingControl != null)
|
||||
{
|
||||
_trackingControl.OnMouseMoveRelative(mouseMotion);
|
||||
_trackingControl.OnMouseMoveRelative(motion);
|
||||
return;
|
||||
}
|
||||
|
||||
base.OnMouseMoveRelative(mouseMotion);
|
||||
base.OnMouseMoveRelative(motion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user