Commit Graph

81 Commits

Author SHA1 Message Date
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
Alexis Maiquez
28f0868caa Check for XSetIOErrorExitHandler so old Xlib versions can work just fine
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-05-08 14:47:34 +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
746d0943ff Fix warnings on cmake execution to make it easier to understand the output of the process
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-05-01 23:36:36 +02: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
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
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
Alexis Maiquez
7db3618350 + Added parsing for shader constants that have extra information
+ Added support for slider properties

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-11-29 13:56:50 +01:00
Alexis Maiquez
5828b2ee80 + added some extra documentation on rendering based on observations and trial and error
~ deprecated --dir --pkg options, the software will automatically detect the background we're loading
+ first draft of FBO support, there's still some extra work to do
~ texture header is now hidden behind getters so the textures can be any kind of source
~ proper setting of resolution and translation variables for textures
~ simplified call flow for any pass rendering, removing render functions on effect and material
~ framebuffer setup has to happen before object setup in the scene

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-27 01:39:23 +02:00
Alexis Maiquez
6c8187324e - removed -fpermissive from the C++ flags compiler as it was screwing up the compilation
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-10 15:51:05 +02:00
Alexis Maiquez
0225cac917 ~ changed glfw to use a custom library version until upstream adds proper support for this
~ brought back proper background rendering and position detection

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-08 19:09:43 +02:00
Alexis Maiquez
b152913d90 - removed useless variable types that are not being used anymore
~ updated some strings to ensure the type-checking matches
+ added support for integer <-> float casting on constants
+ added support for vec2 variables

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-04 15:44:39 +02:00
Alexis Maiquez
65bfbe1493 + added some default values for TextureMipmap as they were not being set automatically by the compiler sometimes (and thus breaking the texture load)
+ added helper to parse vector4 data from json
- removed some old, commented out code
+ added support for getting textures from the shader's code too (fixes masks on some backgrounds)
+ added support for shader varibles with default values from shader's source code

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-04 15:02:11 +02:00
Alexis Maiquez
16ed2f30de + added FreeImage for loading all the non-compiled textures (jpg, pngs, etc)
+ set proper glViewport instead of hardcoded 1920 by 1080 (this might require some changing and instead do a glViewport of the screen/window size and then scaling the backbuffers)
~ set proper texture size for pingpong buffers (to work with the viewport fixes)
- removed FREE_IMAGE_FORMAT as it's already included in the FreeImage library

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-02 23:59:00 +02:00
Alexis Maiquez
dd76439901 ~ fixed a_TexCoord variable not having the correct values
- removed irrlicht functions and types from the active codebase so it's no longer required at compile time (CContext still there as the code might be still be useful)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-31 02:29:28 +02:00
Alexis Maiquez
291b7e364a - removed/commented out most irrlicht-specific code
~ written close to equivalent versions in OpenGL code using GLM and GLFW
~ written replacements for texture and package loading to not use irrlicht anymore
~ updated shader compiler as we now don't need to replace attributes anymore
+ added support for texture flags in the texture header (as they're needed for opengl to get proper information)

TODO: REWRITE VIDEO PLAYER SUPPORT AS THIS UPDATE EFFECTIVELY BREAKS IT

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-08-31 01:14:08 +02:00
Alexis Maiquez Murcia
79e9ead2ee Merge branch 'data-separation' of github.com:Almamu/linux-wallpaperengine into data-separation
# Conflicts:
#	CMakeLists.txt
#	src/WallpaperEngine/Core/Objects/Particles/Initializers/CRotationRandom.cpp
#	src/WallpaperEngine/Core/Objects/Particles/Initializers/CRotationRandom.h
#	src/WallpaperEngine/Core/Projects/CProperty.cpp
#	src/WallpaperEngine/Render/CScene.cpp
#	src/WallpaperEngine/Render/Objects/CSound.cpp
#	src/WallpaperEngine/Render/Objects/CSound.h

Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2020-07-06 20:26:04 +02:00
Alexis Maiquez Murcia
7d7c51a3bc ~ moved camera initialization before the actual items initialization
+ added PKGV0007 to the list of supported packages (experimental)
+ added support for parsing properties of type bolean
+ added parsing of a missing particle initializer (turbulentvelocityrandom)
+ added back sound playinh which was left out when rewritting

Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
2020-07-06 20:05:15 +02:00
IceCryptonym
5d5ce361fe
Initial video support without audio (#14)
* Adds FFmpeg to CMake
* Refactors to allow support for other wallpaper types
* Updates README.md for compilation requirements
* Initial video support without audio
* Properly support different wallpapers
* Fixes videos not rendering
* Nitpicks
* Moves code related to rendering from Core::CVideo to Render::CVideo
2020-04-27 18:50:17 +02:00
Alexis Maiquez
cbe79b535b ~ changed wrong class name crom CPassess to CPass
+ added parsing of bind section for shader passes
~ various new classes to properly handle texture targets, shader passes and materials

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-11 15:32:57 +02:00
Alexis Maiquez
5e94fc7bab + added parsing of dependencies for objects
+ added fbos parsing from effect files
~ cleaned up effect parsing code
~ support for texture target parsing in materials for texture render targets
~ changed way of modifying textures from passes to a more abstracted way
~ moved shader constants to it's own namespace

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-11 09:15:50 +02:00
Alexis Maiquez
318a99d5ca + added vector3 support for shader constants (looks like strings were vector3 after all)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 15:01:59 +02:00
Alexis Maiquez
4358e7c173 - removed shader string constants, shaders do not have any, for future reference, these might be vectors or colors
+ shader constants now should be correctly applied as values for variables whenever possible

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 14:54:49 +02:00
Alexis Maiquez
dc36adb200 + added mouse input handling and mouse position variable to shaders
+ added vector2 pointer class for shader parameters

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 13:55:12 +02:00