Commit Graph

105 Commits

Author SHA1 Message Date
Alexis Maiquez
7bffcded09
feat: make custom version of glslang to improve shader compatibility + random improvements (#291)
* feat: added glslang and spirv-core for handling shaders, should provide better results than current systems

* fix: brought back proper include placement, should fix some shaders not working

* chore: dial down required version to 330

* fix: crash when taking screenshot

* fix: use glReadnPixels for X11 copying to be more memory safe

* chore: reverted part of last commit

* chore: delay initialization of browser until it's used once

* chore: do not initialize web browser unless explicitly needed

* chore: cleanup filesystem functions to use containers directly

* chore: memory cleanup fixes

* chore: fix glReadPixels for older opengl versions

* chore: remove shader patches as they shouldn't be needed anymore

* chore: initialise variables

* chore: update deps, actions and readme

* chore: make use of custon glslang and SPIRV-Cross

* Revert "chore: update deps, actions and readme"

This reverts commit c3fbc9340b.

* chore: update actions to include submodules

* chore: do not depend on SPIRV-Tools

* fix: added log10 macro

* feat: update to latest glslang (swizzle and vec2/vec3/vec4 implicit casting to float)

* revert: delayed initialization of cef was causing issues, reverted

* chore: re-organized web wallpaper support to use custom scheme and better handle multiprocessing

* chore: make use of external repos for all deps instead of copying things manually and more cleanup work

* chore: wrong include file used in CGLSLContext.cpp

* chore: fix wayland generation folder not being present

* feat: somewhat support TEXB0004

* chore: improve function call matching and fallback to more lax method if no function is found

* chore: changed shader compilation slightly so they're passed onto glsl just once

* feat: swap android's fft implementation (which wasn't right) with kissfft's and fix update frequency issues

* chore: added missing dependency

* chore: added missing dep to PKGBUILD

* feat: add testing tools to run over all backgrounds and getting output data

* chore: jail CDirectory to the basepath and prevent accessing data outside of the main directory

* chore: process script now scales the previews so the html file is not too big

* chore: add showcase gallery to the README.md

* chore: update README

* chore: some readability improvements on code

* chore: fix segfault after code cleanup

* chore: make use of std::filesystem::canonical instead of basepath and slight typing changes on texture objects

* chore: fix path detection being wrong, make use of std::filesystem::path on CContainers

* chore: cleanup of the core part of the project

* chore: bring back std::move and make some methods const where it makes sense

* feat: added a pretty printer for easier debug and comparison between different versions of linux-wallpaperengine

* chore: refactored shader compilation code once more to be easier to follow and fixed the longstanding bug of #include not being added in the right place

* chore: more debug info for the pretty printer

* fix: some textures applied were not the right ones

* chore: properly set combos based on textures

* feat: take into account project properties for shader values
feat: proper parsing of combo values in shaders
fix: shader units weren't linked as they should
chore: more support for detecting shader things automatically

* fix: blending mode for passes using the wrong value
fix: shader uniforms from project properties should now be taken into account

* chore: use ubuntu 22 and ubuntu 24 as builders, ubuntu 20 is retired

* chore: use ubuntu 22 and ubuntu 24 as builders, ubuntu 20 is retired

* chore: hopefully fix github actions build

* refactor: simplified working with properties, constants and shader variables

* chore: remove a couple of todos that aren't needed anymore

* chore: simplify the texture detection a little bit, still work left to do

* fix: regression on texture setup not working properly

* fix: filenames with dots were not being handled properly

* chore: remove some uselesss messages

* chore: fixed std::string json values not casting anything to it as it was assumed

* fix: null user value for constants means it cannot be modified by the user

* chore: remove exception when a shader constant uses a non-existant property

* fix: angles can be an user setting too, also added detection for animation frames to show a warning

* fix: ensure variable information is not commented out by a line comment

* fix: shader includes weren't being processed properly

* chore: update to latest glslang and SPIRV-Cross to support non-integer array indices

* chore: make use of auto where it made sense

* feat: make use of in/out promotion on glslang-WallpaperEngine
feat: use glslang-WallpaperEngine linkin process as an extra validation

* chore: improve scripts for running the app

* chore: hide background structure dump behind a command-line switch

* chore: rewritten bloom effect as a json object inside C++ so it's easier to follow

* chore: removed deprecated parameters and switched to argparse instead of getopt
fix: clamping mode wasn't applied by background properly, only globally

* chore: removed help prompt from the output unless actually required

* fix: web subprocesses weren't launching due to parameter's parsing, temporal fix

* feat: added material command copy support

* feat: do not initialize some subsystems if they're disabled or not used by backgrounds

* chore: ignore type in combos as only seems to be used in the editor

* chore: update to latest glslang-WallpaperEngine changes

* chore: delete uniforms if they already exist before setting

* chore: more cleanup and fixes

* chore: more cleanup and fixes

* chore: more cleanup and fixes

* chore: update file functions to make use of shared_ptr/unique_ptr instead of copying things around

* chore: more changes to unique_ptr and shared_ptr

* chore: more changes to unique_ptr and shared_ptr

* chore: more changes to unique_ptr and shared_ptr
feat: improved render initialization process to make it easier and simpler to add new drivers (no more #ifdef in CWallpaperApplication.cpp)

* chore: change all is/as castings to use typeid so no string comparison takes place

* chore: more cleanup, default initialization of values wherever possible

* chore: moved more things to std::unique_ptr and std::shared_ptr

* chore: moved more things to std::unique_ptr and std::shared_ptr

* fix: browser context usage crashed the app

* chore: the setting controls fullscreen detection creation the same way audio works

* fix: ensure that at least one frame is rendered before detecting fullscreen windows

* chore: slight changes to output and documentation to properly reflect current build configuration

* chore: fix mipmap texture creation

* chore: fix pass uniforms not taking into account fragment shader's uniforms
chore: keep processed code in the shader sent to opengl so it appears on RenderDoc

* chore: formating issues by codefactor

* chore: do not use new to allocate the pretty printer

* fix: strchr wasn't properly done for window geometry

* chore: add recording mode for status page generation

* chore: update .gitignore

* chore: update script to make use of video generation instead of the old python scripts

* chore: also copy project.json so it can be used on the site too

* fix: regression on invisible images not being rendered

* feat: add option to disable camera parallax

* chore: add the reversing tools I have locally

* chore: mention some of the common issues in the README.md

* chore: take submodules into account for archlinux

* chore: missed cd "$pkgname" in arch's prepare step
2025-05-10 19:34:59 +02:00
Almamu
4a063d0b84 fix: #265 added aarch64 to the list of detected system processors for linux build 2024-11-08 10:24:22 +01:00
Almamu
dc1d40e8cf chore: add extra info on CEF version being downloaded for debugging system detection 2024-11-08 02:14:39 +01:00
Almamu
458605c218 chore: add extra info on CEF version being downloaded for debugging system detection 2024-11-08 02:13:27 +01:00
moetayuko
bdaf1ec6e4
implement wayland fullscreen detector (#261)
* feat: wayland fullscreen detector

* feat: pause mpv when fullscreen
2024-11-08 01:54:26 +01:00
Alexis Maiquez
1c12951a6a chore: update readme
chore: some X11 files were being included in wayland-only builds
2024-10-12 20:59:51 +02:00
Alexis Maiquez
7278f2f817 fix: replace FreeImage with stb_image and stb_image_write
fixes #204
2024-10-12 20:11:14 +02:00
Almamu
50d3bced8e fix: hopefully fix running from arch's package 2024-06-06 21:40:13 +02:00
Almamu
65f5c46a1c chore: added clang-tidy to linting.sh (needs cleanup first) 2024-05-11 19:32:46 +02:00
Almamu
0d36d6e222 fix: X11 support should not be enabled if partial installation is detected 2024-05-11 17:22:40 +02:00
Almamu
953ef01749 feat: conditionally enable wayland and x11 support 2024-05-11 17:19:42 +02:00
Almamu
ac62d5470a fix: CWebBrowserContext wasn't in the right place 2024-05-07 14:00:31 +02:00
Almamu
235cda8c94 chore: move cef initialization to its own context 2024-05-07 03:59:40 +02:00
Almamu
006d4ee3d0 chore: move wallpaper types to their own folder 2024-05-07 02:55:10 +02:00
Pasalc
ca3c73740c
Basic support for web wallpapers (#196)
* Updated gitignore

* Basic Web support

* Basic Cmake(not working)

* Working CEF

* Clean up Render/CWeb

* Download CEF in CMAKE

* Fixed compile error(excesive comma)

* Fixed CWeb compile error(scaling mode)

* Commented flag in CEF flag(-fno-rtti) which disabled dynamic cast

* Commented CEF compiler flags for MacOS

* Added third_party to gitignore

* Fixed libvulkan.so.1 error (deleted file entirely)

* Removed cefsimple, CefShutdown in signal, cleaned up cmake a bit

* Updated .gitignore

* Get render function to previous version

* Fixed typo in coment

* Fixed tab

* Removed shaders too

* Fix codefactor issues
2024-05-05 23:44:26 +02:00
Pasalc
11666abf32 Added scaling and clamp support 2023-11-13 21:38:56 +03:00
Alexis Maiquez
af72b8163b Enable wayland support automatically if all libraries are available instead of having an individual switch
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-05-07 21:31:51 +02:00
Alexis Maiquez
f21a6e64a7 Wayland implementation cleanup
Removed wayland-display in favour of screen-root, it should automatically switch between X11 and Wayland implementations
Removed all the window-server-specific code from CWallpaperApplication
Moved COutput from CWallpaperApplication to each CVideoDriver as the output is tied to the driver
Moved CFullScreenDetector from CWallpaperApplication to each CVideoDriver as the detection is tied to the video driver
Applied the Driver treatment to the Input, this way CInputContext doesn't depend on the driver used
Updated CRenderContext to be aware of viewport-specific context updates
Viewport information is now held inside COutputViewport instead of being a simple map
Merged CLayerSurface and SWaylandOutput, inheriting from the new COutputViewport to standarize the minimum requirements of a viewport
  (makeCurrent and swapOutput are common requirements, X11 was the outlier not needing these per-viewport)
Moved all the viewport-specific code of Wayland from CWaylandOpenGLDriver to It's own class CWaylandOutputViewport
Fixed an issue under Wayland where sometimes the background surfaces wouldn't get anything drawn because the CWaylandOutput wasn't reset
Updated screenshot-taking code to be standard for all drivers again

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-04-22 11:31:50 +02:00
vaxerski
c5b27cd3dc split mouse input by backend 2023-04-21 00:17:55 +01:00
vaxerski
c84ec9aedd Build protocols in cmake 2023-04-20 21:27:47 +01:00
vaxerski
4e03774cf8 use egl from cmake find opengl 2023-04-20 21:17:45 +01:00
vaxerski
0838ea2b00 check for wayland modules 2023-04-20 14:23:39 +01:00
vaxerski
8bae933073 better searching for egl 2023-04-20 14:22:03 +01:00
vaxerski
d13918697a added protocol making 2023-04-20 14:11:56 +01:00
vaxerski
ffeec7f1dd make wayland impl optional 2023-04-20 13:52:25 +01:00
vaxerski
e5b447bdc9 initial impl 2023-04-19 20:18:20 +01:00
Alexis Maiquez
a89d8ebb22 Added basic support for audio processing so backgrounds can react to sound playing in the system
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-26 18:18:21 +02:00
Alexis Maiquez
ca471c04fc Placed audio detectors in the right folder
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-24 02:51:17 +01:00
Alexis Maiquez
978f56cdca Added sound playback detection to mute when something else plays audio
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-24 02:36:42 +01:00
Alexis Maiquez
cc7ec0561d Separated X11 fullscreen code detection from the output driver as they don't have to work at the same time
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-23 23:38:23 +01:00
Alexis Maiquez
f499454957 Fixed identation problems
Added comments all over the codebase to explain things a bit better
Improved CApplicationContext to be a bit more self-explanatory
Abstracted CRenderContext access away into a helper that every render class should use

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-23 01:42:01 +01:00
Alexis Maiquez
b69ce8ba57 Added support for running multiple X11 backgrounds off the same instance
Window mode now has extra settings for setting the position and size
Fixed audio not muting when --silent was used

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-21 07:07:36 +01:00
Alexis Maiquez
37631e9c40 Upgraded to shader version 330
Added support for shader patches
Removed useless DEBUG define in favour of NDEBUG

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-11 03:21:45 +01:00
Alexis Maiquez
48a91ff297 More code cleanup
Input is now handled by context

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-08 14:57:17 +01:00
Alexis Maiquez
55760aee4d More code cleanup:
- Separated program args parsing and validation from initialization code
 - Application's main body in it's own class

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-07 04:17:51 +01:00
Alexis Maiquez
ecd8ff3757 Applied the same context-driver treatment to the audio subsystem (still needs some extra work to ensure all audio plays fine and a good cleanup)
Fixed README.md to properly reflect all dependencies in the command examples
Added support for audio looping

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-06 22:35:46 +01:00
Alexis Maiquez
59bff58f5c Updated README with mpv dependencies
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-05 06:15:48 +01:00
Alexis Maiquez
7079d12e2a Switched video backgrounds to mpv (should fix all the videos that weren't playing sound or had random issues)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-05 06:11:04 +01:00
Alexis Maiquez
a24b1923f6 Cleanup of code:
- use of auto in some places (more of this to come)
 - use for loops instead of iterators for most of the loops
 - extracted glfw/glew code into it's own class
 - make usage of std::filesystem instead of checking things with old C libraries

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-03 18:41:51 +01:00
Alexis Maiquez
d370e028ff Renamed CContext to CRenderContext to allow for the introduction of CAudioContext in following iterations
Improved logging and error reporting to be a bit more flexible

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-03 00:00:17 +01:00
Alexis Maiquez
92bdde2bd1 Renamed CUserSettingColor to CUserSettingVector3 as it makes more sense
CUserSettingVector3 are initializable with just one float value
Objects' origin and scale are now UserSettings too

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-01 03:10:38 +01:00
Alexis Maiquez
176470dad9 Image color and alpha can now be user-settings
Removed old Color structures not useful anymore

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-01 02:08:05 +01:00
Alexis Maiquez
fc150576eb Object and effect visibility can now be compared to project's properties
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-01-30 13:34:02 +01:00
Alexis Maiquez
62af627ffa Added some missing texture formats to the definition
Added some extra settings for debugging

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-01-29 21:15:26 +01:00
Alexis Maiquez
ed1efdcd66 Added parsing for text properties
Simplified how passes rendering works and separated it into a two stages process
  Setup (prepares shaders, uniforms, attributes, etc)
  Render (only performs the actual rendering)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-04 10:16:15 +01:00
Alexis Maiquez
cdaebbe893 Added support for camera bloom
Added support for virtual files

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-03 23:07:13 +01:00
Alexis Maiquez
c13d743022 Container access should happen through CContext
Textures now have a cache system that prevents loading them more than once

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-03 14:27:05 +01:00
Alexis Maiquez
91d8dbdaec Update binary name and provide a rudimentary fallback for old binary name (unsupported)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-08-24 03:28:36 +02:00
Alexis Maiquez
09effd0303 CFBO frame dummy values added
Added combo properties support
Bumped up GLSL version to 130 and added some extra definitions

This work goes on to #115, although the background won't start up yet because of shader compilation issues

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-07-14 22:12:46 +02:00
Alexis Maiquez
4561f5ca7f Raised minimum cmake version to 3.12, should fix errors about add_compile_definitions
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-07-14 20:01:41 +02:00