Commit Graph

108 Commits

Author SHA1 Message Date
Almamu
50d3bced8e fix: hopefully fix running from arch's package 2024-06-06 21:40:13 +02:00
Almamu
953ef01749 feat: conditionally enable wayland and x11 support 2024-05-11 17:19:42 +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
Alexis Maiquez
84f6018e1a Added application state to keep track of enable/disable audio and volume changes when things go fullscreen
Removed .clang-format as it's not useful

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-23 09:10:51 +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
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
26f6156f34 MPV should respect volume levels now
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-07 11:29:57 +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
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
4dc3a4bc01 Added g_PointerPositionLast
Improved delay calculation for parallax (should prevent backgrounds from flickering with big delays)
Fixed g_TexelSize having the wrong value and g_TexelSizeHalf not being defined

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-01 18:40: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
cec1baef30 Added explanations on the properties part of the backgrounds
Any --set-property will now output something when a value is being applied to ease debugging

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-01-31 22:44:27 +01:00
Alexis Maiquez
9cddb56f60 Added support for setting values to properties from command-line to modify how backgrounds look
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-01-31 22:07:59 +01:00
Alexis Maiquez
cf37fe388c Added support for usersettings in the bloom
Added casting for integer to double in json loading
Added support for dumping all available properties

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-01-31 21:37:38 +01:00
Alexis Maiquez
e16d54bba3 Added an extra path for background loading
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-12-05 10:36:42 +01:00
Alexis Maiquez
087a0976ae Added support for taking a screenshot after wallpaper's up (useful for pywal and other ricing rools)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-05 11:00:51 +01:00
Alexis Maiquez
fa67fa5b00 Fixed bloom effect not being properly applied
Added support for userparameter on the clearcolor of the scene
Scenes should draw into the full framebuffer

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-05 10:50:55 +01:00
Alexis Maiquez
672ea47d23 Bumped up to OpenGL 3.3
Added base VAO
Fixed scene image align issues and things being flipped vertically under specific situations

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-04 18:41:23 +01:00
Alexis Maiquez
08586dcab6 Added some extra debugging for when glewInit fails, should make it easy to debug #128
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-04 00:37:31 +01:00
Alexis Maiquez
b5b7824233 Better approach on rendering the bloom effect, uses one less draw call
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-03 23:32:49 +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
261bc696df Added some object labels in opengl so they're reflected on RenderDoc while on debug
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-11-02 09:28:42 +01:00
Alexis Maiquez
597e3035ad Added missing include in main.cpp
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-10-28 07:41:50 +02:00
Alexis Maiquez
70d815c183 Properly detect texture sizes so effects using smaller mask textures are properly applied
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-10-28 05:06:21 +02:00
Alexis Maiquez
d6561268d6 Added support for gifscene.pkg files (essentially the same as normal scene.pkg) fixes startup of #118
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-07-14 22:29:11 +02:00
Alexis Maiquez
ec6164c4cf ~ fix audio thread not stopping when a signal for stopping is received
should fix #107

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-06-10 14:19:46 +02:00
Alexis Maiquez Murcia
46ea8e8f03 + Added support for using background's ID so it's directly loaded from a steam installation directly (implements #101)
~ Updated readme with the new possibilities

Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2022-06-01 23:04:59 +02:00
Alexis Maiquez
6808f31cd6 Handle XIO errors to keep the background running as much as possible, should fix #91
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-05-08 14:14:36 +02:00
Alexis Maiquez
eb14099c4c Removed SDL_mixer in favour of ffmpeg for audio decoding
Added extra option for general audio volume

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-05-08 03:37:32 +02:00
Alexis Maiquez Murcia
3ed1459568 If SDL initialization fails, the background will still start but show an error to let the user know why the sound doesn't work
Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2022-04-04 21:04:26 +02:00
Alexis Maiquez Murcia
aa3db15ec6 Added some automatic detection for the assets folder from the Steam installation:
~/.steam/steam/steamapps/cocmmon/wallpaper_engine/assets
~/.local/share/Steam/steamapps/common/wallpaper_engine/assets
<Current's binary location>/assets

Should improve/fix #82

Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2022-04-04 20:27:42 +02:00
Alexis Maiquez
34635ba6ac ~ fixed video background playback being broken
~ CTexture should properly pick up the right width and height for animated backgrounds too

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-03-01 00:29:26 +01:00
Alexis Maiquez
f4955f1531 - removed dependency on std::filesystem
~ moved some things into CContext so main is a bit cleaner
~ moved wallpaper object creation into CWallpaper so main is a bit cleaner

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-28 14:54:45 +01:00
Alexis Maiquez
009321572e - removed custom glfw3 from the project as it's not needed anymore
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-28 02:31:51 +01:00
Alexis Maiquez
5bc0525493 ~ reorganized context initialization so opengl is ready
~ moved pixmap, gc and image creation to the initialization
  TODO: SUPPORT SCREEN SIZE CHANGES (THIS MIGHT NEED REINITIALIZATION OF THINGS)
~ moved fbo creation to initialization as it won't change anymore
~ reverted render code to the original loop as now the framebuffer is exactly as big as the whole display
~ moved glReadPixels off the wallpaper as that's code is exclusively used for screen rendering and not general rendering
~ XChangeProperty forces the update of the background, otherwise the compositor stops refreshing the screen and the background gets stuck
~ updated viewport variables to be integers instead of floats
~ reverted frame rendering code to be simpler and added the option to specify a framebuffer as target instead of screen

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-28 02:03:47 +01:00
Hynak
e56f128592 Added signal handling if the user terminates the program 2022-02-25 14:38:03 -05:00
Hynak
b2d4dd128d Hide GLFW for X Render 2022-02-25 14:27:56 -05:00
Alexis Maiquez
d5745b1cfa ~ Make use of the resolved path after startup and ensure it ends with a trailing slash.
Should fix @C0nvert 's issues on #59

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-18 19:02:55 +01:00
Alexis Maiquez
d5586b168b + Added checks for directories and ensuring specified wallpaper folder exists before initialization, fixes #70
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-11 15:50:54 +01:00
Alexis Maiquez
20c4ad3652 + Added better logging for asset loading errors and some extra information, should help get better information on #59
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-01-31 19:40:22 +01:00
Alexis Maiquez
a66bc26f1d ~ Fix issue #66, command-line parameters were not parsed properly
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-01-31 17:49:48 +01:00
Alexis Maiquez
f5ed023725 Fixed frame limiter to work properly with GLFW
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-01-25 00:17:14 +01:00
Alexis Maiquez
18ab051d47 ~ Fix background setup not working properly after the implementation of mouse support
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-12-04 23:44:17 +01:00
Alexis Maiquez
b55f2e8bf4 + Added PKGV0015 support
+ Added basic support for mouse position on shaders (still needs to be adjusted for backgrounds that are too big for the screen)
  (this makes XRAY effects work)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-12-03 02:02:46 +01:00