Commit Graph

3576 Commits

Author SHA1 Message Date
Lynix cc1246dcac VulkanRenderer: Fix 32bits compilation 2023-01-02 22:11:00 +01:00
SirLynix a8b6d9cb42 Renderer/RenderFrame: Use FunctionRef instead of std::function to avoid allocations 2023-01-01 19:48:51 +01:00
Jérôme Leclercq dd421a6385
Replace float/UInt64 durations by a more precise Time class (#388)
Improve Clock class with atomic RestartIfOver method and allows to choose required precision
2022-12-29 21:31:46 +01:00
SirLynix 1de5f65536 xmake check-files -f 2022-12-29 12:21:39 +01:00
SirLynix 5fc02c0295 Utility/Image: Fix LoadFaceFrom* 2022-12-29 12:21:15 +01:00
SirLynix 2243d0b1a7 Move free operator overloads inside Nz namespace 2022-12-29 12:15:22 +01:00
SirLynix 763bef3fdd Core: Make Uuid constexpr 2022-12-29 12:13:18 +01:00
SirLynix 9a553e5e9d Core: Make Color constexpr 2022-12-29 12:13:00 +01:00
SirLynix fe8715f1fb Renderer: Working compute implementation 2022-12-25 19:19:16 +01:00
SirLynix 4605eed0da Add compute demo (WIP) + fixes creation of compute pipelines 2022-12-25 19:19:16 +01:00
SirLynix 9578ba3ef5 Add initial support for compute pipelines 2022-12-25 19:19:16 +01:00
SirLynix e4064997d8 Renderer: Split OpenGL and OpenGL ES in two RenderAPI enums 2022-12-25 16:11:28 +01:00
SirLynix 22ae68fdca Audio/Sound: Fix crash when destroying moved Sound 2022-12-24 11:55:27 +01:00
SirLynix 46fe1c550c Fixes unit tests 2022-12-18 17:08:03 +01:00
SirLynix 3c86b84e13 Graphics: Rework tilemap class (and fix its AABB) 2022-12-18 14:57:40 +01:00
SirLynix 830eee78a8 Math: Rework Box and Rect classes 2022-12-18 14:57:14 +01:00
SirLynix e6bf11c48e Minor fixes 2022-12-17 14:49:22 +01:00
SirLynix d4422c4102 Graphics: Add origin to all sprite-based renderables (and made it a factor) 2022-12-17 14:48:50 +01:00
SirLynix 780359eb8b Graphics: Fix point light shadowmaps 2022-12-08 18:28:17 +01:00
SirLynix f8238a6e6c Graphics: Implement point-light shadow-mapping 2022-12-08 18:17:13 +01:00
SirLynix 6731e07b54 VulkanRenderer: Fix 2DArray texture type 2022-12-08 18:17:13 +01:00
SirLynix 5a57976b4b Graphics/FrameGraph: Add support for cubemap and slice rendering 2022-12-08 18:17:13 +01:00
SirLynix 4ae3f51174 VulkanRenderer: Fix views and arrays support 2022-12-08 18:17:13 +01:00
SirLynix 56acbb2694 Renderer: Improve texture view support (and support emulation for OGL) 2022-12-08 18:17:13 +01:00
SirLynix 08ea4c87a7 Improve texture view support 2022-12-08 18:17:13 +01:00
SirLynix 42f8cdb151 Add initial support for texture views 2022-12-08 18:17:13 +01:00
SirLynix 902dee6121 Renderer/TextureInfo: Separate layerCount from size 2022-12-08 18:17:13 +01:00
SirLynix 1768f20365 Graphics: Move shadow-mapping related code to LightShadow classes 2022-12-08 18:17:13 +01:00
SirLynix d7eab778fb Graphics/FrameGraph: Add FramePassAttachmentSize enum instead of boolean 2022-12-08 18:17:13 +01:00
SirLynix 34348b2dde Minor fixes 2022-12-08 18:17:13 +01:00
SirLynix f580ba523d Graphics: Send shadow map res to shader 2022-12-08 18:17:13 +01:00
SirLynix 3623f4ccc4 Add support for moving shadow-casting lights 2022-12-08 18:17:13 +01:00
SirLynix 1727ae8631 Graphics/TextSprite: Fix front facing 2022-12-08 18:17:13 +01:00
SirLynix 11e098f8b2 Fix warning 2022-12-08 18:17:13 +01:00
SirLynix 6ef4c14772 Renderer: Change binding members order 2022-12-08 18:17:13 +01:00
SirLynix e990a320cc WIP 2022-12-08 18:17:13 +01:00
SirLynix 4a10c1f8fe Add shadow mapping (wip) 2022-12-08 18:17:13 +01:00
SirLynix be9fba3190 Graphics/Material: Fix uniform buffer size 2022-12-08 13:06:50 +01:00
SirLynix b79718404c Fix OpenAL extensions functions 2022-12-06 12:54:22 +01:00
Jérôme Leclercq 3d05b1fb44
Fix missing include 2022-12-06 12:00:59 +01:00
SirLynix 75bbc5df09 Minor fixes 2022-12-06 09:07:18 +01:00
SirLynix f2c83df8ff OpenGLRenderer: Print GL call and parameters on failure 2022-12-06 07:53:32 +01:00
SirLynix 6af0904849 OpenGLRenderer: Don't call glDrawBuffer(GL_BACK) on OpenGL ES
even if glDrawBuffer exists
2022-12-06 07:50:26 +01:00
SirLynix ccf77ac459 OpenGLRenderer: Setup draw buffers only once 2022-12-06 07:49:41 +01:00
SirLynix 2dd0e7d9c8 Audio: Add an option to directly link OpenAL 2022-12-06 07:48:03 +01:00
SirLynix 77642cf431 Renderer: Implement and use debug names 2022-12-02 22:46:43 +01:00
SirLynix 54aafe05a1 Fix warning 2022-11-30 18:45:22 +01:00
Jérôme Leclercq f42df21660
Fix unity build 2022-11-28 11:14:40 +01:00
Lynix 02387b8fe3 Graphics: Add Tilemap 2022-11-25 19:28:22 +01:00
Jérôme Leclercq 082015a0c5
Fix macOS compilation (#384)
Disable X11 on macOS, I don't know why it's enabled
2022-11-19 13:37:42 +01:00
SirLynix 2946fc7f0d Fix compilation after NZSL update 2022-11-18 21:31:06 +01:00
SirLynix 2fd2e190b9 FrameGraph: Fix texture pool 2022-11-15 18:01:51 +01:00
SirLynix 842e797cc4 Fix a bunch of warnings 2022-11-13 16:12:49 +01:00
SirLynix ad1f3bc321 Graphics/Graphics: Add preferred depth format 2022-11-06 23:45:37 +01:00
SirLynix ea3c363b58 Graphics/ShaderReflection: Add support for texture arrays 2022-11-06 23:15:22 +01:00
Lynix 0133a91c4d OpenGLRenderer: Fix FBO clearing when scissor is enabled 2022-11-06 15:31:55 +01:00
SirLynix 04a8b03cf3 Graphics/TextureLoader: Add support for alpha-test and alpha-blending 2022-11-05 00:29:25 +01:00
SirLynix fe0d70d9e1 Graphics/MaterialInstance: Add LoadFrom* 2022-11-05 00:28:33 +01:00
SirLynix 5502e51d71 Graphics: Move skinning to a separate module 2022-11-05 00:26:56 +01:00
SirLynix 1205155466 Graphics/Material: Rename CreateInstance to Instantiate 2022-11-05 00:14:16 +01:00
SirLynix 4e631da7dc Renderer/Texture: Preserve filepath when loading image 2022-11-05 00:12:01 +01:00
SirLynix ab154819a7 Graphics: Make use of new auto_binding 2022-10-31 22:44:19 +01:00
SirLynix 6b8be23fa0 Switch index/vertex count to UInt32 2022-10-31 19:54:25 +01:00
Jérôme Leclercq dc6ce8427c
Refactor material system (#382) 2022-10-31 19:53:41 +01:00
SirLynix 6d0b53b39e Core: Rework HardwareInfo 2022-09-24 15:52:29 +02:00
SirLynix 9cd7976a91 Remove "MemoryManager" and very old code 2022-09-24 14:25:52 +02:00
SirLynix 6bf4ccaae1 Core/ParameterList: Rework Parameter getter using Result 2022-09-09 13:47:06 +02:00
SirLynix e063c7b45e Network/ENet: Add DisconnectTimeout event 2022-09-09 12:56:50 +02:00
SirLynix 3f38c52455 xmake check-files -f 2022-09-08 08:58:22 +02:00
SirLynix a8c54abdd0 Graphics: Add skinning support to DepthMaterial 2022-09-08 08:57:37 +02:00
SirLynix 99c9df5731 Graphics: Add default materials 2022-09-08 08:57:11 +02:00
SirLynix 7f7ddb415b Graphics: Fix TextureLoader 2022-09-08 08:56:57 +02:00
SirLynix 72d908817d Fix compilation with unity build 2022-09-07 19:28:41 +02:00
Jérôme Leclercq 5cb50928f7
Utility: Fix STBLoader 2022-09-07 15:40:14 +02:00
SirLynix fbdc1faf8c Graphics: Add TextureLoader 2022-09-07 13:31:21 +02:00
SirLynix 47cb878f9d Major ResourceLoader rework (using Nz::Result) 2022-09-07 13:31:04 +02:00
SirLynix 131faa4fbd OpenGLRenderer: Take advantage of glClipControl if available 2022-09-06 13:01:44 +02:00
SirLynix 359c176b03 Network/ENetHost: Expose AllocatePacket 2022-09-01 20:21:27 +02:00
SirLynix 04d2f4a6c2 Graphics/MaterialPipeline: Rework GetRenderPipeline
Decrease the need for memory allocations in most cases (especially for sprites)
2022-08-30 19:29:23 +02:00
SirLynix 017a6c7af3 Graphics: Use memory pools for render elements 2022-08-30 19:27:52 +02:00
SirLynix 7949c57f16 Utility: Add a better way to attach objects to joints 2022-08-30 18:31:04 +02:00
Lynix 45c947faf1 Core/PoolByteStream: Fix pool returning on Reset 2022-08-28 17:54:49 +02:00
SirLynix 50ed8b4028 Add initial support for skeletal entities / components 2022-08-27 03:07:48 +02:00
SirLynix 01f3f350fe Core/PluginLoader: Allows loading from environment folders 2022-08-27 02:58:34 +02:00
SirLynix 999593ca51 Fix compilation 2022-08-25 12:59:01 +02:00
SirLynix 4a55d40aec Skeleton: Improve skeleton copy performance (O(n²) => O(n)) 2022-08-25 12:59:01 +02:00
SirLynix 133caac5b5 Minor fixes 2022-08-25 12:59:01 +02:00
SirLynix 8d39441bd1 Utility/Skeleton: Add GetRootJoint method 2022-08-25 12:59:01 +02:00
SirLynix 7ada266917 Graphics: Add PredefinedSkeletalData 2022-08-25 12:59:01 +02:00
SirLynix 3a366cc1e4 Core: Rewrite plugin system 2022-08-25 12:59:01 +02:00
SirLynix b37af6da31 Final skeletal fixes 2022-08-25 12:59:01 +02:00
SirLynix a9801894e8 Merge fixes 2022-08-25 12:59:01 +02:00
SirLynix d60fce169a Fix merge 2022-08-25 12:59:01 +02:00
SirLynix b8ea79c40e Commit current work 2022-08-25 12:59:01 +02:00
SirLynix a7ab2fbaf4 Utility: Replace Skin* by SkinLinearBlend function 2022-08-25 12:59:01 +02:00
SirLynix e5e3026005 Push current work 2022-08-25 12:59:01 +02:00
SirLynix 6f1e72b2ac Merge fixes 2022-08-25 12:59:01 +02:00
SirLynix 104f60f3e7 Add support for GPU skinning (WIP) 2022-08-25 12:59:01 +02:00
SirLynix 507a4f16be Fix compilation 2022-08-17 20:22:49 +02:00
SirLynix c669c68533 Minor fixes 2022-08-17 20:13:00 +02:00
SirLynix f1549b934c Graphics: Add DebugDrawer support 2022-08-17 20:12:49 +02:00
SirLynix 4a5f866754 Renderer: Add DebugDrawer 2022-08-17 20:11:06 +02:00
SirLynix 099528758c OpenGLRenderer: Fix explicit texture/block binding (fixes GLSL ES 3.0 support) 2022-08-12 23:01:58 +02:00
SirLynix a108e6ce65 VulkanRenderer: Update headers and VMA 2022-08-10 00:24:13 +02:00
SirLynix 117f7c2a4b Renderer: Allow to enable or disable API validation layers using config 2022-08-10 00:04:46 +02:00
SirLynix 38e32025e9 Add a way to embed renderer backends code into NazaraRenderer 2022-08-07 20:19:04 +02:00
SirLynix 41523f8ca8 Fix compilation 2022-08-02 08:13:17 +02:00
SirLynix 27dab13484 Fix BoxLayout 2022-08-02 08:13:17 +02:00
SirLynix caa9d4c11e Remove ProgressBarWidget for now 2022-08-02 08:13:17 +02:00
SirLynix e51695274c Widgets: Fix ScrollAreaWidget 2022-08-02 08:13:17 +02:00
SirLynix 0fcf24f336 Widgets: Rework event dispatching 2022-08-02 08:13:17 +02:00
SirLynix 05c78da22a WIP 2022-08-02 08:13:17 +02:00
SirLynix 6004987dee Fix compilation with last nzsl version 2022-07-27 23:15:08 +02:00
Lynix bff356f7df PhysicallyBasedMaterial: Fix AmbientColor/SpecularColor 2022-07-19 20:03:05 +02:00
Lynix ad8b46db38 Rename Diffuse to BaseColor 2022-07-19 20:02:01 +02:00
Lynix 75015862dc Fix PBR example 2022-07-18 22:34:14 +02:00
SirLynix bcdb0f98f0 Move Cook-Torrance functions to a separate module 2022-07-18 22:04:44 +02:00
SirLynix b2fad27618 Fix basic material and add demo 2022-07-18 22:04:44 +02:00
SirLynix ccd7885213 Fix compilation 2022-07-18 22:04:44 +02:00
SirLynix 3e21b4bea6 Add PBR rendering (WIP) 2022-07-18 22:04:44 +02:00
SirLynix 8f4c828d0c Fix warning 2022-07-16 14:17:14 +02:00
SirLynix 6882163693 Update for latest NZSL version 2022-07-16 14:17:04 +02:00
SirLynix 96599d1116 Graphics: Add LinearSlicedSprite class 2022-07-12 08:45:02 +02:00
SirLynix 6203d5f0d1 Graphics/SlicedSprite: Fix GetTopLeftCorner linking 2022-07-12 08:44:43 +02:00
SirLynix 63e74b4f47 Physics2D/RigidBody2D: Fix crash when moving an already moved value 2022-07-07 08:50:44 +02:00
SirLynix 3507ec570f Network: Fix ENetPacket 2022-07-07 08:50:18 +02:00
SirLynix 1b678defae Add system graph (wip) 2022-07-02 19:45:50 +02:00
SirLynix 4d24be2ae9 Utility/NodeComponent: Use entt::handle for SetParent 2022-07-02 19:45:33 +02:00
SirLynix d5f70279a1 Utility: Add velocity component and system 2022-07-02 19:43:58 +02:00
SirLynix 99b4397d78 Core: Add Lifetime component and system 2022-07-02 19:43:02 +02:00
SirLynix a61ebb7806 OpenGLRenderer: enable GL_TEXTURE_CUBE_MAP_SEAMLESS on OpenGL
to match other API behavior
2022-07-02 19:28:20 +02:00
SirLynix 2b4075dc9b OpenGLRenderer: Fix incorrect warning on max storage buffer supported 2022-07-02 19:27:39 +02:00
SirLynix 2e894336e5 VulkanRenderer: Fix minUniformBufferOffsetAlignment limit 2022-06-28 20:21:33 +02:00
SirLynix 87cb72217e ShaderNode: Fix compilation 2022-06-28 12:40:12 +02:00
SirLynix 4f08e7d848 Improve readability of tangent computing 2022-06-28 08:58:08 +02:00
SirLynix cefa620b20 PhongMaterial: Move TBN computation to fragment shader 2022-06-28 08:56:43 +02:00
SirLynix 9f360f6675 Graphics: Watch dev files in debug for changes 2022-06-28 08:56:14 +02:00
SirLynix 87012a4a52 GraphicalMesh: Handle missing index buffer 2022-06-28 08:55:48 +02:00
SirLynix 093d9d344e Renderer: Add support for storage buffers 2022-06-17 20:15:16 +02:00
SirLynix 813314b5d5 UberShader: Handle case where entry points come from imported modules 2022-06-17 19:07:40 +02:00
SirLynix 6f18a02999 Add fullscreen vertex shader module 2022-06-16 19:26:57 +02:00
SirLynix 62ba4f172b Graphics/GraphicalMesh: Allow to update submeshes 2022-06-16 18:19:48 +02:00
SirLynix 2cc4944f58 Fix compilation 2022-06-16 18:19:19 +02:00
SirLynix 8e8bee7037 Temp fix for NZSL update 2022-06-15 20:26:14 +02:00
Jérôme Leclercq a237102de9
Music: fix concurrent access on destruction 2022-06-07 22:47:54 +02:00
Lynix 916fecbf37 ShaderNode: Fix compilation 2022-06-07 20:59:54 +02:00
SirLynix 16922a9519 Audio/Music: Fix datarace 2022-06-07 20:18:26 +02:00
SirLynix c7b6d83bbc Last nzsl version update 2022-06-07 20:18:16 +02:00
SirLynix 510ef8c41e Update shaders to new import syntax 2022-06-05 18:51:46 +02:00
SirLynix 49ba0c1ca2 Restore Widgets resources 2022-05-27 13:08:28 +02:00
Jérôme Leclercq 03e2801dbe Split engine to packages NazaraUtils and NZSL (#375)
* Move code to NazaraUtils and NZSL packages

* Reorder includes

* Tests: Remove glslang and spirv-tools deps

* Tests: Remove glslang init

* Remove NazaraUtils tests and fix Vector4Test

* Fix Linux compilation

* Update msys2-build.yml

* Fix assimp package

* Update xmake.lua

* Update xmake.lua

* Fix shader compilation on MinGW

* Final fixes

* The final fix 2: the fix strikes back!

* Disable cache on CI

* The return of the fix™️
2022-05-25 19:36:10 +02:00
SirLynix 5544d336ab Shader: Fix index remapping when importing a text shader in a precompiled shader 2022-05-12 23:08:21 +02:00
SirLynix 6469ab5fde Utility: Refactor some algorithms 2022-05-12 18:15:20 +02:00
SirLynix 7c2b8e0576 Core/File: Add WriteWhole static function 2022-05-12 18:11:41 +02:00
SirLynix a8e69882fb Core/PluginManager: Fix plugin loading under Linux 2022-05-09 13:19:44 +02:00
SirLynix b0ecb64f19 OpenGLRenderer: Fix loading of glSpecializeShader 2022-05-09 13:19:31 +02:00
Lynix 5f389ef0a4 Core/File: Add ReadWhole 2022-05-08 15:50:29 +02:00
Lynix 3c8b4c2587 Audio: Fix loading of OpenAL 2022-05-08 15:44:59 +02:00
Lynix 17b1c2407d Audio/AudioSource: Add GetSampleOffsetAndLatency 2022-05-08 15:44:41 +02:00
SirLynix 41712a3f18 Minor fixes 2022-05-08 13:21:20 +02:00
SirLynix 4794073b73 Audio: Add support for AL_SOFT_source_latency 2022-05-08 13:20:55 +02:00
SirLynix 00f11a74dc ShaderCompiler: Don't return success if compilation failed 2022-05-07 15:30:44 +02:00
SirLynix 21a38fb31b Audio: Add some fixes and tests 2022-05-06 12:41:02 +02:00
SirLynix 81085508ec Minor fixes 2022-05-05 20:20:44 +02:00
SirLynix 973b589b08 Shader: Fix conditional statement handling in partial compilation mode 2022-05-05 20:19:27 +02:00
SirLynix e62969999a ShaderCompiler: Add --log-format option 2022-05-05 20:18:34 +02:00
SirLynix 106d629342 Shader: Update SPIRV data 2022-05-05 20:17:32 +02:00
Alexandre Janniaux f146661a76 VulkanRenderer: implement metal view
The metal view backing the MoltenVK compatibility wrapper is written in
Obj-C.

It would have been possible to use the Objective-C runtime in C++ but
the code is less performant (the symbol binding is done at first use
instead of the beginning of the program) and actually harder to get
right.

Note that MoltenVK is not linked to the loader, so the libMoltenVK.dylib
object must be available for loading.
2022-05-04 22:12:01 +02:00
Jérôme Leclercq e6c74fbc5f Physics2D/Constraint2D: Add method GetLastImpulse 2022-05-01 17:37:11 +02:00
SirLynix 13f765fc0d Utility: Fix GIF loading 2022-04-27 18:24:00 +02:00
SirLynix 2a091d25b7 Utility: Add ImageStream and GIF support 2022-04-27 18:24:00 +02:00
SirLynix 3d15f3578b Utility: Use UInt64 to store index/vertex instead of size_t 2022-04-23 23:12:40 +02:00
SirLynix 8cd1f2d590 Update AlgorithmUtility.cpp 2022-04-23 22:29:07 +02:00
SirLynix 0f58117b76 Fix compilation on macOS 2022-04-23 22:23:07 +02:00
SirLynix e1d2063bf0 Audio/DummyAudioSource: Fix status after Stop() call 2022-04-23 16:43:08 +02:00
SirLynix 2389a2fe53 Platform/WindowManager: Rename to WindowBackend 2022-04-23 16:26:59 +02:00
SirLynix e7274b24e9 Core/Color: Switch formal from RGBA8 to RGBA32F 2022-04-23 16:08:15 +02:00
SirLynix de53c88c01 Utility/Algorithm: Use UInt64 for index count and vertex count 2022-04-23 14:07:26 +02:00
SirLynix a10682628d Warning fixes 2022-04-23 12:25:54 +02:00
SirLynix 1fc226dd7e Shader/IndexRemapperVisitor: Fix small issue 2022-04-23 12:15:23 +02:00
SirLynix 947cc96923 Audio/Music: Fix Play() call after music stopped 2022-04-21 18:25:42 +02:00
SirLynix e11644a81d Shader/IndexRemapperVisitor: Fix unhandled cases 2022-04-20 01:02:42 +02:00
SirLynix 5a7bd44744 Graphics/MaterialPass: Fix option values in release 2022-04-19 19:16:03 +02:00
SirLynix e5f552ef47 Shader: Fix import of non-compiled module 2022-04-19 19:15:49 +02:00
SirLynix 36e5356c22 Shader: Fix import of already compiled module 2022-04-19 18:32:17 +02:00
SirLynix 7fccfbb63e Minor fixes 2022-04-19 18:32:16 +02:00
SirLynix c209552f81 Math/Matrix4: Rework "transform matrix" support 2022-04-19 18:32:16 +02:00
SirLynix 02ffbcc50b Shader: Fix scoping on unrolled for-each 2022-04-19 18:32:16 +02:00
SirLynix b52a380839 Shader: Fix unroll duplicate identifier error with GLSL 2022-04-19 18:32:16 +02:00
SirLynix 6e47553b16 OpenGLRenderer: Fix integer vertex attribute handling 2022-04-19 18:32:16 +02:00
SirLynix effe384c0b Utility/MD5Mesh: Fix shader reading 2022-04-19 18:32:16 +02:00
SirLynix cd08d97ac6 Graphics: Fix submesh rendering 2022-04-19 18:32:16 +02:00
SirLynix 138f2b88b3 Fix buffering issues 2022-04-19 13:38:44 +02:00
SirLynix 22f58fdbf5 Add stream buffering (WIP) 2022-04-09 18:22:57 +02:00
SirLynix ca9854d06a Graphics/FrameGraph: Fix pipeline barrier from output to input 2022-04-08 13:36:07 +02:00
SirLynix b7493f01bf Formats: Rename parameter to skip loader
From SkipNative to SkipBuiltin
2022-04-08 13:35:47 +02:00
SirLynix f19178d904 Fix X11 polluting namespace with unity build 2022-04-08 08:49:36 +02:00
SirLynix ad80f3e0ec Utility: Switch static unordered_set to constexpr 2022-04-07 08:42:10 +02:00
SirLynix 447cdfddc9 Shader: Error fixes 2022-04-06 09:06:02 +02:00
SirLynix 8784ec9b47 Add shader compiler (nzslc) and use it 2022-04-06 09:04:09 +02:00