60 Commits

Author SHA1 Message Date
f5974a7448 Merge remote-tracking branch 'origin/1.10' into sdl_platform_1.10 2025-03-13 18:43:06 +02:00
72ef6f92ae Update SDL3 to 3.2.6 2025-03-09 22:47:17 +02:00
45c388c92d Merge remote-tracking branch 'origin/1.10' into sdl_platform
# Conflicts:
#	Source/Editor/GUI/ContextMenu/ContextMenuBase.cs
#	Source/Engine/Platform/Linux/LinuxPlatform.cpp
2025-03-09 22:47:12 +02:00
83d6f9fcf3 Avoid showing tooltips in inactive windows 2025-03-09 13:05:03 +02:00
4d3588d09e Update SDL3 to 3.2.4 2025-03-09 13:05:02 +02:00
d72f8a61cb Fix window dragging when not supported by Wayland compositor
(cherry picked from commit 3554747a67)
2025-03-09 13:05:02 +02:00
0e173de542 Show current display server in Editor window tooltip
(cherry picked from commit 62968dd437)
2025-03-09 13:05:01 +02:00
8aa0aa4292 Properly mark floating windows with transparency support
(cherry picked from commit c660fac524)
2025-03-09 13:05:01 +02:00
26f8aa9985 Enable transparency support in Vulkan swapchains
(cherry picked from commit 431a69e357)
2025-03-09 13:05:00 +02:00
24c62e2a8d Fix compilation for game builds
(cherry picked from commit f4fcc07288)
2025-03-09 13:05:00 +02:00
91c1d3ce0a Fix cloning SDL repository 2025-03-09 13:04:59 +02:00
93aba7b959 Fix text input not working on X11 2025-03-09 13:04:59 +02:00
fbe61eee9e Fix button latching on Windows after drag and drop operation 2025-03-09 13:04:58 +02:00
12bb3f3a22 Implement new window dragging system 2025-03-09 13:04:58 +02:00
713c4f5d1d Fix mouse resetting issues after ending relative mode 2025-03-09 13:04:57 +02:00
2fe286eed0 Fix frame stutter when window is focused 2025-03-09 13:04:56 +02:00
4539ec4dcf Fix error when docking to sides of tabbed panel 2025-03-09 13:04:56 +02:00
17714c52e0 Cleanup Linux SDL implementation 2025-03-09 13:04:55 +02:00
8810a98c28 Support compiling third party library C files as C code 2025-03-09 13:04:55 +02:00
1da6ffe920 Implement Wayland protocols module and file generation 2025-03-09 13:04:54 +02:00
f966f92583 Fix mouse warping after ending relative mode 2025-03-09 13:04:54 +02:00
ca17bc501f Add git fetch method for dependencies 2025-03-09 13:04:53 +02:00
2e866aa156 Fix window ShowInTaskbar setting 2025-03-09 13:04:53 +02:00
696be807bd Fix various issues with child window positioning 2025-03-09 13:04:52 +02:00
ed63f47620 Add Window.IsAlwaysOnTop property 2025-03-09 13:04:52 +02:00
0d546a82c7 Use SDL locale 2025-03-09 13:04:51 +02:00
9a6c0dd5f4 Allow window with single tab to be dragged from tab area 2025-03-09 13:04:50 +02:00
a00342b1c3 Fix ValueBox mouse position resetting after releasing the button 2025-03-09 13:04:50 +02:00
a798965d9a Fix SDL build process on Linux 2025-03-09 13:04:49 +02:00
d0925b82df Update SDL to 3.2.0 2025-03-09 13:04:49 +02:00
0c535d5a33 Force cursor to center of Game Window when tab handle is clicked 2025-03-09 13:04:48 +02:00
Chandler Cox
05cf5a4d7a Fix rotation using SDL 2025-03-09 13:04:48 +02:00
da59713152 Fix Linux compilation without SDL 2025-03-09 13:04:47 +02:00
8510fd237f Fix compilation 2025-03-09 13:04:46 +02:00
3dc2fe0558 Update SDL3 2025-03-09 13:04:46 +02:00
716f76dca4 Fix compilation issues 2025-03-09 13:04:45 +02:00
29e732c783 Fix windows not being hidden initially 2025-03-09 13:04:45 +02:00
53862298b6 Fix parent window position handling with popup/tooltip windows 2025-03-09 13:04:44 +02:00
4464555dcc Fix compilation errors in other platforms 2025-03-09 13:04:44 +02:00
ec383ffb1d Fix CI for Linux 2025-03-09 13:04:43 +02:00
909ba336b0 Prevent building with SDL in unsupported platforms 2025-03-09 13:04:43 +02:00
ecaa03365f Fallback to X11 message box implementation when SDL fails 2025-03-09 13:04:42 +02:00
fb88460903 Fix popup and context menus not working on Wayland 2025-03-09 13:04:42 +02:00
db840ebef9 Hide warnings for unsupported SDL operations on Wayland 2025-03-09 13:04:41 +02:00
3f303a7a77 Log a warning for not implemented Wayland functionality 2025-03-09 13:04:40 +02:00
848d8e35e5 Fix compilation in Linux 2025-03-09 13:04:40 +02:00
2f3b45ae82 Enable warning sound in question dialogs 2025-03-09 13:04:39 +02:00
48600c6ac5 Enable modern Windows dialog boxes 2025-03-09 13:04:39 +02:00
bb132305e3 Implement relative mouse mode (raw input) for SDL platform 2025-03-09 13:04:38 +02:00
769823ddf5 Add flag for Window types 2025-03-09 13:04:38 +02:00
8a0ce55fec Enable native windowing system settings with SDL platform 2025-03-09 13:04:37 +02:00
832d902699 Add command-line switches to force X11 and Wayland SDL drivers 2025-03-09 13:04:37 +02:00
6843205ec9 Implement SDL platform, windowing and input handling 2025-03-09 13:04:36 +02:00
74fb1a74a6 Refactor application window class name 2025-03-09 13:04:35 +02:00
29c3a9e4bf Move Window related enums to separate header file 2025-03-09 13:04:35 +02:00
6f55b5452f Refactor Windows drag and drop implementation 2025-03-09 13:04:34 +02:00
716ae95630 Refactor ScreenUtilities 2025-03-09 13:04:34 +02:00
02e9d60c5b Add more helper methods for managing Git repos 2025-03-09 13:04:33 +02:00
a1b7666c1c Fix centered window location on X11 2025-03-09 13:04:33 +02:00
1b9663a390 Fix initial position of Tooltips 2025-03-09 13:04:32 +02:00
2949 changed files with 9708 additions and 28690 deletions

View File

@@ -34,7 +34,7 @@ jobs:
dotnet workload --info
- name: Build
run: |
.\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8
.\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output
- name: Upload
uses: actions/upload-artifact@v4
with:
@@ -67,7 +67,7 @@ jobs:
dotnet workload --info
- name: Build
run: |
.\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8
.\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output
- name: Upload
uses: actions/upload-artifact@v4
with:
@@ -100,7 +100,7 @@ jobs:
dotnet workload --info
- name: Build
run: |
./PackageEditor.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=8
./PackageEditor.sh -arch=x64 -platform=Linux -deployOutput=Output
- name: Upload
uses: actions/upload-artifact@v4
with:
@@ -131,7 +131,7 @@ jobs:
dotnet workload --info
- name: Build
run: |
./PackagePlatforms.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=8
./PackagePlatforms.sh -arch=x64 -platform=Linux -deployOutput=Output
- name: Upload
uses: actions/upload-artifact@v4
with:
@@ -161,7 +161,7 @@ jobs:
dotnet workload --info
- name: Build
run: |
./PackageEditor.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=8
./PackageEditor.command -arch=ARM64 -platform=Mac -deployOutput=Output
- name: Upload
uses: actions/upload-artifact@v4
with:
@@ -189,7 +189,7 @@ jobs:
dotnet workload --info
- name: Build
run: |
./PackagePlatforms.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=8
./PackagePlatforms.command -arch=ARM64 -platform=Mac -deployOutput=Output
- name: Upload
uses: actions/upload-artifact@v4
with:

View File

@@ -337,7 +337,6 @@ VertexOutput VS_SplineModel(ModelInput input)
// Apply world position offset per-vertex
#if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset;
output.Geometry.PrevWorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
@0// Deferred Shading: Defines
@1// Deferred Shading: Includes

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
@0// Distortion: Defines
@1// Distortion: Includes

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
@0// Forward Shading: Defines
#define MAX_LOCAL_LIGHTS 4
@@ -28,13 +28,6 @@ TextureCube SkyLightTexture : register(t__SRV__);
Buffer<float4> ShadowsBuffer : register(t__SRV__);
Texture2D<float> ShadowMap : register(t__SRV__);
@4// Forward Shading: Utilities
// Public accessors for lighting data, use them as data binding might change but those methods will remain.
LightData GetDirectionalLight() { return DirectionalLight; }
LightData GetSkyLight() { return SkyLight; }
ProbeData GetEnvironmentProbe() { return EnvironmentProbe; }
ExponentialHeightFogData GetExponentialHeightFog() { return ExponentialHeightFog; }
uint GetLocalLightsCount() { return LocalLightsCount; }
LightData GetLocalLight(uint i) { return LocalLights[i]; }
@5// Forward Shading: Shaders
// Pixel Shader function for Forward Pass
@@ -83,8 +76,9 @@ void PS_Forward(
gBuffer.ShadingModel = MATERIAL_SHADING_MODEL;
// Calculate lighting from a single directional light
float4 shadowMask = 1.0f;
ShadowSample shadow = SampleDirectionalLightShadow(DirectionalLight, ShadowsBuffer, ShadowMap, gBuffer);
float4 shadowMask = GetShadowMask(shadow);
shadowMask = GetShadowMask(shadow);
float4 light = GetLighting(ViewPos, DirectionalLight, gBuffer, shadowMask, false, false);
// Calculate lighting from sky light
@@ -149,9 +143,9 @@ void PS_Forward(
#endif
#if USE_FOG && MATERIAL_SHADING_MODEL != SHADING_MODEL_UNLIT
#if USE_FOG
// Calculate exponential height fog
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0, gBuffer.ViewPos.z);
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0);
// Apply fog to the output color
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
@0// Global Illumination: Defines
#define USE_GI 1

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
@0// Lightmap: Defines
#define CAN_USE_LIGHTMAP 1

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
@0// Motion Vectors: Defines
@1// Motion Vectors: Includes

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
@0// SDF Reflections: Defines
#define USE_GLOBAL_SURFACE_ATLAS 1

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
@0// Tessellation: Defines
#define TessalationProjectOntoPlane(planeNormal, planePosition, pointToProject) pointToProject - dot(pointToProject - planePosition, planeNormal) * planeNormal

View File

@@ -377,7 +377,6 @@ VertexOutput VS(ModelInput input)
// Apply world position offset per-vertex
#if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset;
output.Geometry.PrevWorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif
@@ -548,7 +547,6 @@ VertexOutput VS_Skinned(ModelInput_Skinned input)
// Apply world position offset per-vertex
#if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset;
output.Geometry.PrevWorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif

View File

@@ -15,7 +15,6 @@
#include "./Flax/Common.hlsl"
#include "./Flax/MaterialCommon.hlsl"
#include "./Flax/GBufferCommon.hlsl"
#include "./Flax/TerrainCommon.hlsl"
@7
// Primary constant buffer (with additional material parameters)
META_CB_BEGIN(0, Data)
@@ -335,7 +334,7 @@ VertexOutput VS(TerrainVertexInput input)
float lodValue = CurrentLOD;
float morphAlpha = lodCalculated - CurrentLOD;
// Sample heightmap and splatmaps
// Sample heightmap
float2 heightmapUVs = input.TexCoord * HeightmapUVScaleBias.xy + HeightmapUVScaleBias.zw;
#if USE_SMOOTH_LOD_TRANSITION
float4 heightmapValueThisLOD = Heightmap.SampleLevel(SamplerPointClamp, heightmapUVs, lodValue);
@@ -343,6 +342,7 @@ VertexOutput VS(TerrainVertexInput input)
float2 heightmapUVsNextLOD = nextLODPos * HeightmapUVScaleBias.xy + HeightmapUVScaleBias.zw;
float4 heightmapValueNextLOD = Heightmap.SampleLevel(SamplerPointClamp, heightmapUVsNextLOD, lodValue + 1);
float4 heightmapValue = lerp(heightmapValueThisLOD, heightmapValueNextLOD, morphAlpha);
bool isHole = max(heightmapValueThisLOD.b + heightmapValueThisLOD.a, heightmapValueNextLOD.b + heightmapValueNextLOD.a) >= 1.9f;
#if USE_TERRAIN_LAYERS
float4 splatmapValueThisLOD = Splatmap0.SampleLevel(SamplerPointClamp, heightmapUVs, lodValue);
float4 splatmapValueNextLOD = Splatmap0.SampleLevel(SamplerPointClamp, heightmapUVsNextLOD, lodValue + 1);
@@ -355,6 +355,7 @@ VertexOutput VS(TerrainVertexInput input)
#endif
#else
float4 heightmapValue = Heightmap.SampleLevel(SamplerPointClamp, heightmapUVs, lodValue);
bool isHole = (heightmapValue.b + heightmapValue.a) >= 1.9f;
#if USE_TERRAIN_LAYERS
float4 splatmap0Value = Splatmap0.SampleLevel(SamplerPointClamp, heightmapUVs, lodValue);
#if TERRAIN_LAYERS_DATA_SIZE > 1
@@ -362,11 +363,12 @@ VertexOutput VS(TerrainVertexInput input)
#endif
#endif
#endif
float height = DecodeHeightmapHeight(heightmapValue);
float height = (float)((int)(heightmapValue.x * 255.0) + ((int)(heightmapValue.y * 255) << 8)) / 65535.0;
// Extract normal and the holes mask
bool isHole;
float3 normal = DecodeHeightmapNormal(heightmapValue, isHole);
float2 normalTemp = float2(heightmapValue.b, heightmapValue.a) * 2.0f - 1.0f;
float3 normal = float3(normalTemp.x, sqrt(1.0 - saturate(dot(normalTemp, normalTemp))), normalTemp.y);
normal = normalize(normal);
output.Geometry.HolesMask = isHole ? 0 : 1;
if (isHole)
{

Binary file not shown.

BIN
Content/Shaders/AtmospherePreCompute.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/BakeLightmap.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/BitonicSort.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/CAS.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/ColorGrading.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/DebugDraw.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/DepthOfField.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Editor/Grid.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Shaders/Editor/QuadOverdraw.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Editor/VertexColors.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/EyeAdaptation.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/FXAA.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Fog.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Forward.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/GBuffer.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/GI/DDGI.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/GI/GlobalSurfaceAtlas.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/GPUParticlesSorting.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/GUI.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Shaders/Histogram.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Lights.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/MotionBlur.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/MultiScaler.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/PostProcessing.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/ProbesFilter.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Quad.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Reflections.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/SDF.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/SMAA.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/SSAO.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/SSR.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Shadows.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Sky.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/TAA.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/VolumetricFog.flax (Stored with Git LFS)

Binary file not shown.

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) Wojciech Figat. All rights reserved.
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
set -e

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) Wojciech Figat. All rights reserved
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved
set -e

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (c) Wojciech Figat. All rights reserved
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved
# Fix mono bin to be in a path
#export PATH=/Library/Frameworks/Mono.framework/Versions/Current/Commands:$PATH

View File

@@ -1,6 +1,6 @@
@echo off
rem Copyright (c) Wojciech Figat. All rights reserved.
rem Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
if not exist "Development\Scripts\Windows\GetMSBuildPath.bat" goto Error_InvalidLocation

View File

@@ -1,6 +1,6 @@
@echo off
rem Copyright (c) Wojciech Figat. All rights reserved.
rem Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
set MSBUILD_PATH=

View File

@@ -2,12 +2,12 @@
"Name": "Flax",
"Version": {
"Major": 1,
"Minor": 11,
"Minor": 10,
"Revision": 0,
"Build": 6800
"Build": 6702
},
"Company": "Flax",
"Copyright": "Copyright (c) 2012-2025 Wojciech Figat. All rights reserved.",
"Copyright": "Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.",
"GameTarget": "FlaxGame",
"EditorTarget": "FlaxEditor",
"Configuration": {

View File

@@ -267,7 +267,6 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=comperand/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=coord/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=cubemap/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=DDGI/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Deformer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=deformers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=defragmentation/@EntryIndexedValue">True</s:Boolean>

View File

@@ -1,5 +1,5 @@
@echo off
:: Copyright (c) Wojciech Figat. All rights reserved.
:: Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
setlocal
pushd

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (c) Wojciech Figat. All rights reserved.
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
set -e

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (c) Wojciech Figat. All rights reserved.
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
set -e
@@ -14,4 +14,4 @@ bash ./Development/Scripts/Linux/CallBuildTool.sh --genproject "$@"
# Build bindings for all editor configurations
echo Building C# bindings...
# TODO: Detect the correct architecture here
#Binaries/Tools/Flax.Build -build -BuildBindingsOnly -arch=x64 -platform=Linux --buildTargets=FlaxEditor
Binaries/Tools/Flax.Build -build -BuildBindingsOnly -arch=x64 -platform=Linux --buildTargets=FlaxEditor

View File

@@ -1,13 +1,13 @@
@echo off
rem Copyright (c) Wojciech Figat. All rights reserved.
rem Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
setlocal
pushd
echo Performing the full package...
rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -deployPlatforms -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -deployPlatforms -dotnet=8 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed
popd

View File

@@ -1,13 +1,13 @@
@echo off
rem Copyright (c) Wojciech Figat. All rights reserved.
rem Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
setlocal
pushd
echo Building and packaging Flax Editor...
rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -dotnet=8 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed
popd

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (c) Wojciech Figat. All rights reserved.
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
set -e
@@ -9,4 +9,4 @@ echo Building and packaging Flax Editor...
cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployEditor --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployEditor --dotnet=8 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (c) Wojciech Figat. All rights reserved.
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
set -e
@@ -9,4 +9,4 @@ echo Building and packaging Flax Editor...
cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployEditor --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployEditor --dotnet=8 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"

View File

@@ -1,13 +1,13 @@
@echo off
rem Copyright (c) Wojciech Figat. All rights reserved.
rem Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
setlocal
pushd
echo Building and packaging platforms data...
rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployPlatforms -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployPlatforms -dotnet=8 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed
popd

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (c) Wojciech Figat. All rights reserved.
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
set -e
@@ -9,4 +9,4 @@ echo Building and packaging platforms data...
cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployPlatforms --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployPlatforms --dotnet=8 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (c) Wojciech Figat. All rights reserved.
# Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
set -e
@@ -9,4 +9,4 @@ echo Building and packaging platforms data...
cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployPlatforms --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployPlatforms --dotnet=8 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"

View File

@@ -6,7 +6,7 @@
Flax Engine is a high quality modern 3D game engine written in C++ and C#.
From stunning graphics to powerful scripts, it's designed for fast workflow with many ready-to-use features waiting for you right now. To learn more see the website ([www.flaxengine.com](https://flaxengine.com)).
This repository contains full source code of the Flax Engine (excluding NDA-protected platforms support). Documentation source is also available in a separate repository. Anyone is welcome to contribute or use the modified source in Flax-based games.
This repository contains full source code of the Flax Engine (excluding NDA-protected platforms support). Anyone is welcome to contribute or use the modified source in Flax-based games.
# Development
@@ -46,26 +46,21 @@ Follow the instructions below to compile and run the engine from source.
* Install Visual Studio Code
* Install .NET 8 or 9 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
* Ubuntu: `sudo apt install dotnet-sdk-8.0`
* Fedora: `sudo dnf install dotnet-sdk-8.0`
* Arch: `sudo pacman -S dotnet-sdk-8.0 dotnet-runtime-8.0 dotnet-targeting-pack-8.0 dotnet-host`
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
* Ubuntu: `sudo apt install vulkan-sdk`
* Fedora: `sudo dnf install vulkan-headers vulkan-tools vulkan-validation-layers`
* Arch: `sudo pacman -S vulkan-headers vulkan-tools vulkan-validation-layers`
* Arch: `sudo pacman -S spirv-tools vulkan-headers vulkan-tools vulkan-validation-layers`
* Install Git with LFS
* Ubuntu: `sudo apt-get install git git-lfs`
* Arch: `sudo pacman -S git git-lfs`
* `git-lfs install`
* Install the required packages:
* Ubuntu: `sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev zenity wayland-protocols libportal-dev`
* Fedora: `sudo dnf install libX11-devel libXcursor-devel libXinerama-devel ghc-zlib-devel zenity wayland-protocols-devel libportal`
* Arch: `sudo pacman -S base-devel libx11 libxcursor libxinerama zlib zenity wayland-protocols libportal`
* Ubuntu: `sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev`
* Arch: `sudo pacman -S base-devel libx11 libxcursor libxinerama zlib`
* Install Clang compiler (version 6 or later):
* Ubuntu: `sudo apt-get install clang lldb lld`
* Fedora: `sudo dnf install clang llvm lldb lld`
* Arch: `sudo pacman -S clang lldb lld`
* Clone the repository (with LFS)
* git-lfs clone https://github.com/FlaxEngine/FlaxEngine.git
* Run `./GenerateProjectFiles.sh`
* Open workspace with Visual Code
* Build and run (configuration and task named `Flax|Editor.Linux.Development|x64`)

View File

@@ -1,6 +1,6 @@
@echo off
rem Copyright (c) Wojciech Figat. All rights reserved.
rem Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
setlocal
pushd %~dp0

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "EditorAnalytics.h"
#include "Editor/Editor.h"
@@ -174,9 +174,7 @@ void EditorAnalytics::StartSession()
// Bind events
GameCooker::OnEvent.Bind<RegisterGameCookingStart>();
ShadowsOfMordor::Builder::Instance()->OnBuildStarted.Bind<RegisterLightmapsBuildingStart>();
#if LOG_ENABLE
Log::Logger::OnError.Bind<RegisterError>();
#endif
}
void EditorAnalytics::EndSession()
@@ -189,9 +187,7 @@ void EditorAnalytics::EndSession()
// Unbind events
GameCooker::OnEvent.Unbind<RegisterGameCookingStart>();
ShadowsOfMordor::Builder::Instance()->OnBuildStarted.Unbind<RegisterLightmapsBuildingStart>();
#if LOG_ENABLE
Log::Logger::OnError.Unbind<RegisterError>();
#endif
// End session
{

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using Newtonsoft.Json;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Scripting;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
namespace FlaxEditor.Content.Create
{
@@ -13,11 +13,6 @@ namespace FlaxEditor.Content.Create
/// <inheritdoc />
public string ResultUrl { get; }
/// <summary>
/// Gets a value indicating wether a file can be created based on the current settings.
/// </summary>
public abstract bool CanBeCreated { get; }
/// <summary>
/// Gets a value indicating whether this entry has settings to modify.
/// </summary>

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
@@ -60,8 +60,7 @@ namespace FlaxEditor.Content.Create
Text = "Create",
AnchorPreset = AnchorPresets.BottomRight,
Offsets = new Margin(-ButtonsWidth - ButtonsMargin, ButtonsWidth, -ButtonsHeight - ButtonsMargin, ButtonsHeight),
Parent = this,
Enabled = entry.CanBeCreated,
Parent = this
};
createButton.Clicked += OnSubmit;
var cancelButton = new Button
@@ -69,7 +68,7 @@ namespace FlaxEditor.Content.Create
Text = "Cancel",
AnchorPreset = AnchorPresets.BottomRight,
Offsets = new Margin(-ButtonsWidth - ButtonsMargin - ButtonsWidth - ButtonsMargin, ButtonsWidth, -ButtonsHeight - ButtonsMargin, ButtonsHeight),
Parent = this,
Parent = this
};
cancelButton.Clicked += OnCancel;
@@ -78,7 +77,7 @@ namespace FlaxEditor.Content.Create
{
AnchorPreset = AnchorPresets.HorizontalStretchTop,
Offsets = new Margin(2, 2, infoLabel.Bottom + 2, EditorHeight),
Parent = this,
Parent = this
};
// Settings editor
@@ -88,7 +87,6 @@ namespace FlaxEditor.Content.Create
_dialogSize = new Float2(TotalWidth, panel.Bottom);
_settingsEditor.Select(_entry.Settings);
_settingsEditor.Modified += () => createButton.Enabled = _entry.CanBeCreated;
}
/// <inheritdoc />

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.IO;
@@ -12,41 +12,38 @@ namespace FlaxEditor.Content.Create
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
public class ParticleEmitterCreateEntry : CreateFileEntry
{
/// <inheritdoc/>
public override bool CanBeCreated => true;
/// <summary>
/// Types of the emitter templates that can be created.
/// </summary>
public enum Templates
{
/// <summary>
/// An empty emitter.
/// The empty asset.
/// </summary>
Empty,
/// <summary>
/// An emitter that emits particles at a constant emission rate.
/// The simple particle system that uses constant emission rate.
/// </summary>
ConstantBurst,
/// <summary>
/// An emitter that produces simple, periodic bursts of particles.
/// The simple periodic burst particle system.
/// </summary>
PeriodicBurst,
/// <summary>
/// An emitter that uses a blended spritesheet to produce a smooth, thick cloud of smoke.
/// The layers and tags settings.
/// </summary>
Smoke,
/// <summary>
/// A GPU emitter that produces sparks that can collide, thanks to depth-buffer based collisions.
/// The GPU sparks with depth-buffer collisions.
/// </summary>
Sparks,
/// <summary>
/// An emitter that produces a spiral shaped ribbon.
/// The ribbon spiral particles.
/// </summary>
RibbonSpiral,
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Scripting;
@@ -14,9 +14,6 @@ namespace FlaxEditor.Content.Create
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
public class PrefabCreateEntry : CreateFileEntry
{
/// <inheritdoc />
public override bool CanBeCreated => _options.RootActorType != null;
/// <summary>
/// The create options.
/// </summary>
@@ -76,9 +73,6 @@ namespace FlaxEditor.Content.Create
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
public class WidgetCreateEntry : CreateFileEntry
{
/// <inheritdoc/>
public override bool CanBeCreated => _options.RootControlType != null;
/// <summary>
/// The create options.
/// </summary>

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
@@ -17,8 +17,6 @@ namespace FlaxEditor.Content.Create
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
internal class SettingsCreateEntry : CreateFileEntry
{
public override bool CanBeCreated => _options.Type != null;
internal class Options
{
[Tooltip("The settings type.")]

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;
@@ -11,9 +11,6 @@ namespace FlaxEditor.Content.Create
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
public class VisualScriptCreateEntry : CreateFileEntry
{
/// <inheritdoc/>
public override bool CanBeCreated => _options.BaseClass != null;
/// <summary>
/// The create options.
/// </summary>

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
@@ -145,7 +145,7 @@ namespace FlaxEditor.Content.GUI
set
{
value = Mathf.Clamp(value, 0.3f, 3.0f);
if (value != _viewScale)
if (!Mathf.NearEqual(value, _viewScale))
{
_viewScale = value;
ViewScaleChanged?.Invoke();

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
namespace FlaxEditor.Content.Import
{

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using FlaxEditor.CustomEditors.Editors;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using FlaxEditor.CustomEditors.Editors;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using System.ComponentModel;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.Text;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
@@ -282,7 +282,7 @@ namespace FlaxEditor.Content
if (data is DragDataFiles)
return DragDropEffect.Copy;
return _dragOverItems?.Effect ?? DragDropEffect.None;
return _dragOverItems.Effect;
}
/// <inheritdoc />

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.Text;
using FlaxEngine;

Some files were not shown because too many files have changed in this diff Show More